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

Unified Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Issue 2816263003: Move spelling marker related functions from WebView to WebLocalFrame (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « third_party/WebKit/Source/web/WebLocalFrameImpl.h ('k') | third_party/WebKit/Source/web/WebViewImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
index 8c49fca693a7b5cbf3941506259ce80dce844b03..6b923d4bbd93112f699ab2ca22f8cd155a449da8 100644
--- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
+++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
@@ -116,6 +116,7 @@
#include "core/editing/PlainTextRange.h"
#include "core/editing/TextAffinity.h"
#include "core/editing/iterators/TextIterator.h"
+#include "core/editing/markers/DocumentMarkerController.h"
#include "core/editing/serializers/Serialization.h"
#include "core/editing/spellcheck/SpellChecker.h"
#include "core/frame/FrameView.h"
@@ -1114,6 +1115,23 @@ void WebLocalFrameImpl::RemoveSpellingMarkers() {
GetFrame()->GetSpellChecker().RemoveSpellingMarkers();
}
+void WebLocalFrameImpl::SpellingMarkerOffsetsForTest(
+ WebVector<unsigned>* offsets) {
+ Vector<unsigned> result;
+ const DocumentMarkerVector& document_markers =
+ GetFrame()->GetDocument()->Markers().Markers();
+ for (size_t i = 0; i < document_markers.size(); ++i)
+ result.push_back(document_markers[i]->StartOffset());
+ offsets->Assign(result);
+}
+
+void WebLocalFrameImpl::RemoveSpellingMarkersUnderWords(
+ const WebVector<WebString>& words) {
+ Vector<String> converted_words;
+ converted_words.Append(words.Data(), words.size());
+ GetFrame()->RemoveSpellingMarkersUnderWords(converted_words);
+}
+
bool WebLocalFrameImpl::HasSelection() const {
WebPluginContainerImpl* plugin_container =
PluginContainerFromFrame(GetFrame());
« no previous file with comments | « third_party/WebKit/Source/web/WebLocalFrameImpl.h ('k') | third_party/WebKit/Source/web/WebViewImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698