Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(263)

Unified Diff: third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp

Issue 2830043002: [DMC #1.92] Move DMC::RemoveMarkersUnderWords() to DMListEditor (Closed)
Patch Set: Update Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/markers/DocumentMarkerListEditor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp
diff --git a/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp
index e6dbcb8760ed4e85883fed9b8b86c66b347c5bd1..c612887554884e8f9328da52fddddbbd1b9d1192 100644
--- a/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp
+++ b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp
@@ -494,22 +494,11 @@ void DocumentMarkerController::RemoveSpellingMarkersUnderWords(
continue;
MarkerLists* markers = node_markers.value;
for (DocumentMarker::MarkerType type : DocumentMarker::AllMarkers()) {
- Member<MarkerList>& list = ListForType(markers, type);
+ MarkerList* list = ListForType(markers, type);
if (!list)
continue;
- bool removed_markers = false;
- for (size_t j = list->size(); j > 0; --j) {
- const DocumentMarker& marker = *list->at(j - 1);
-
- const unsigned start = marker.StartOffset();
- const unsigned length = marker.EndOffset() - marker.StartOffset();
-
- const String marker_text = ToText(node).data().Substring(start, length);
- if (words.Contains(marker_text)) {
- list->erase(j - 1);
- removed_markers = true;
- }
- }
+ bool removed_markers = DocumentMarkerListEditor::RemoveMarkersUnderWords(
+ list, ToText(node).data(), words);
if (removed_markers && type == DocumentMarker::kTextMatch)
InvalidatePaintForTickmarks(node);
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/markers/DocumentMarkerListEditor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698