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

Unified Diff: Source/core/editing/SpellChecker.cpp

Issue 419563003: Adding a word to dictionary should remove spelling markers (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressed comment Created 6 years, 5 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
Index: Source/core/editing/SpellChecker.cpp
diff --git a/Source/core/editing/SpellChecker.cpp b/Source/core/editing/SpellChecker.cpp
index fb57b8b84a4eb81d8e87258c962b7c053072a98d..b878f684e3d837d0f2528022cc3c543edac62141 100644
--- a/Source/core/editing/SpellChecker.cpp
+++ b/Source/core/editing/SpellChecker.cpp
@@ -824,6 +824,17 @@ void SpellChecker::removeSpellingMarkers()
m_frame.document()->markers().removeMarkers(DocumentMarker::MisspellingMarkers());
}
+void SpellChecker::removeSpellingMarkersUnderWords(const Vector<String> &words)
dcheng 2014/08/05 20:30:38 & should be by type (in the declaration as well)
Klemen Forstnerič 2014/08/07 17:47:28 Done.
+{
+ Document* document = m_frame.document();
+ DocumentMarkerController& markerController = document->markers();
+
+ MarkerRemoverPredicate removerPredicate(document, words);
+ markerController.removeMarkers(removerPredicate);
+
+ markerController.repaintMarkers();
+}
+
void SpellChecker::spellCheckAfterBlur()
{
if (!m_frame.selection().selection().isContentEditable())

Powered by Google App Engine
This is Rietveld 408576698