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

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

Issue 2838733002: Fix DocumentMarkerController::RemoveSpellingMarkersUnderWords (Closed)
Patch Set: 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/DocumentMarkerControllerTest.cpp » ('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 cdb98a30896cb1db02e89065cec3f65ecd6b0c35..0a20380f96a91b4f422e836952e953aefd428b04 100644
--- a/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp
+++ b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp
@@ -491,17 +491,16 @@ void DocumentMarkerController::RemoveSpellingMarkersUnderWords(
const Vector<String>& words) {
for (auto& node_markers : markers_) {
const Node& node = *node_markers.key;
- if (!node.IsTextNode()) // MarkerRemoverPredicate requires a Text node.
+ if (!node.IsTextNode())
yosin_UTC9 2017/04/25 01:32:54 Q: My understanding is all |Node| in |markers_| ar
continue;
MarkerLists* markers = node_markers.value;
- for (DocumentMarker::MarkerType type : DocumentMarker::AllMarkers()) {
+ for (DocumentMarker::MarkerType type :
+ DocumentMarker::MisspellingMarkers()) {
MarkerList* list = ListForType(markers, type);
if (!list)
continue;
- bool removed_markers = DocumentMarkerListEditor::RemoveMarkersUnderWords(
+ DocumentMarkerListEditor::RemoveMarkersUnderWords(
list, ToText(node).data(), words);
- if (removed_markers && type == DocumentMarker::kTextMatch)
yosin_UTC9 2017/04/25 01:32:53 Nice!
- InvalidatePaintForTickmarks(node);
}
}
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/markers/DocumentMarkerControllerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698