New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 686850 link

Starred by 0 users

Issue metadata

Status: WontFix
Owner:
Last visit > 30 days ago
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 672259



Sign in to add a comment

DocumentMarkerController doesn't support nested markers

Project Member Reported by rlanday@chromium.org, Jan 30 2017

Issue description

addMarkers() tries to keep the marker list sorted by start offset:
https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp?q=documentmarkercontroller&sq=package:chromium&l=749

But removeMarkers() assumes the list is sorted by end offset:
https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp?q=documentmarkercontroller&sq=package:chromium&l=379

Perhaps this has been working with the ways markers are currently used, it certainly does not work properly if the markers can be nested.

I think we should just remove all the code that tries to keep this list sorted or assumes it's sorted, I'm not convinced that this is a worthwhile optimization and it seems to be buggy.
 
Summary: DocumentMarkerController doesn't support nested markers (was: DocumentMarkerController::removeMarkers() is buggy)
Ah, there's a comment right before DocumentMarkerController::addMarker() that markers of the same type are not supposed to be nested...I definitely need this to support suggestions though so I'm going to have to refactor this a little.
Status: WontFix (was: Assigned)
SuggestionMarkerListImpl will support this when I add it

Sign in to add a comment