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

Unified Diff: Source/web/WebViewImpl.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 dcheng's comment Created 6 years, 4 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/web/WebViewImpl.cpp
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp
index 3209b7da59060cf7058ce836b96ed9277f365b4c..09212866013f50832e8aadf1db4c46d9b6687f8b 100644
--- a/Source/web/WebViewImpl.cpp
+++ b/Source/web/WebViewImpl.cpp
@@ -3373,6 +3373,19 @@ void WebViewImpl::spellingMarkers(WebVector<uint32_t>* markers)
markers->assign(result);
}
+void WebViewImpl::removeSpellingMarkersUnderWords(const WebVector<WebString>& words)
+{
+ for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree().traverseNext()) {
+ if (!frame->isLocalFrame())
+ continue;
+
+ LocalFrame* localFrame = static_cast<LocalFrame*>(frame);
+ WebLocalFrameImpl* webLocalFrame =
+ WebLocalFrameImpl::fromFrame(localFrame);
+ webLocalFrame->removeSpellingMarkersUnderWords(words);
+ }
+}
+
WebDragOperation WebViewImpl::dragTargetDragEnterOrOver(const WebPoint& clientPoint, const WebPoint& screenPoint, DragAction dragAction, int keyModifiers)
{
ASSERT(m_currentDragData);

Powered by Google App Engine
This is Rietveld 408576698