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

Unified Diff: Source/web/WebLocalFrameImpl.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: Removed the removeSpellingMarkersUnderWords method from WebRemoteFrameImpl 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/web/WebLocalFrameImpl.cpp
diff --git a/Source/web/WebLocalFrameImpl.cpp b/Source/web/WebLocalFrameImpl.cpp
index b052ed726f259bcd1677e81f63d0948ac1b6407a..b64ef93d313bd404b4542acc78ac46e60eb5691b 100644
--- a/Source/web/WebLocalFrameImpl.cpp
+++ b/Source/web/WebLocalFrameImpl.cpp
@@ -1833,6 +1833,20 @@ void WebLocalFrameImpl::willDetachParent()
}
}
+void WebLocalFrameImpl::removeSpellingMarkersUnderWords(const WebVector<WebString>& words)
+{
+ Vector<String> transformedWords(words.size());
+
+ auto wordsBegin = words.data();
+ auto wordsEnd = words.data() + words.size();
+ auto transformedWordsBegin = transformedWords.begin();
+
+ std::transform(wordsBegin, wordsEnd, transformedWordsBegin,
+ [] (const WebString &webString) { return static_cast<String>(webString); });
groby-ooo-7-16 2014/07/30 21:13:27 Is blink switched to C11? Chrome style guide says
Klemen Forstnerič 2014/07/31 17:14:00 Whoops, my bad. I tried it and when it compiled I
groby-ooo-7-16 2014/08/01 00:13:23 Note: I don't know about blink. I would _assume_ i
Klemen Forstnerič 2014/08/01 21:58:17 No worries, lambda expressions are nice but if the
+
+ frame()->spellChecker().removeSpellingMarkersUnderWords(transformedWords);
+}
+
WebLocalFrameImpl* WebLocalFrameImpl::activeMatchFrame() const
{
ASSERT(!parent());

Powered by Google App Engine
This is Rietveld 408576698