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) { |
DocumentMarker::MarkerTypes markerTypes(DocumentMarker::Spelling); |
markerTypes.add(DocumentMarker::Grammar); |
- for (Node& node : NodeTraversal::inclusiveDescendantsOf(*innerEditor)) |
+ for (Node& node : NodeTraversal::inclusiveDescendantsOf(element)) |
frame().document()->markers().removeMarkers(&node, markerTypes); |
} |