Index: third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp |
diff --git a/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp b/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp |
index 664da652785132d4723d465ec769d1e66b5916de..152dab55b8d6f8532e4a65e9db924445344654e1 100644 |
--- a/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp |
+++ b/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp |
@@ -802,9 +802,13 @@ void SpellChecker::didEndEditingOnTextField(Element* e) { |
m_spellCheckRequester->cancelCheck(); |
TextControlElement* textControlElement = toTextControlElement(e); |
HTMLElement* innerEditor = textControlElement->innerEditorElement(); |
+ removeSpellingAndGrammarMarkers(*innerEditor); |
+} |
+ |
+void SpellChecker::removeSpellingAndGrammarMarkers(HTMLElement& element) { |
yosin_UTC9
2017/01/26 04:55:48
Note: We want to make this function to have |const
|
DocumentMarker::MarkerTypes markerTypes(DocumentMarker::Spelling); |
markerTypes.add(DocumentMarker::Grammar); |
- for (Node& node : NodeTraversal::inclusiveDescendantsOf(*innerEditor)) |
+ for (Node& node : NodeTraversal::inclusiveDescendantsOf(element)) |
Xiaocheng
2017/01/26 05:12:33
This function still removes all markers from the e
yosin_UTC9
2017/01/26 05:44:02
Let me cancel my "lgtm". We need to support follow
Manuel Rego
2017/01/27 12:56:19
True, sorry about that. I was checking only one th
|
frame().document()->markers().removeMarkers(&node, markerTypes); |
} |