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

Unified Diff: chrome/renderer/spellchecker/spellcheck_provider.cc

Issue 2012823003: Move IME related functions from WebFrame to WebLocalFrame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove null check in spellcheck_provider.cc and add some log Created 4 years, 6 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: chrome/renderer/spellchecker/spellcheck_provider.cc
diff --git a/chrome/renderer/spellchecker/spellcheck_provider.cc b/chrome/renderer/spellchecker/spellcheck_provider.cc
index 5afa759ab0294426830951448e60ed19fb6828bb..f27d423f5bd266d28686fca745d7a1303cecfac6 100644
--- a/chrome/renderer/spellchecker/spellcheck_provider.cc
+++ b/chrome/renderer/spellchecker/spellcheck_provider.cc
@@ -16,14 +16,14 @@
#include "third_party/WebKit/public/platform/WebVector.h"
#include "third_party/WebKit/public/web/WebDocument.h"
#include "third_party/WebKit/public/web/WebElement.h"
-#include "third_party/WebKit/public/web/WebFrame.h"
+#include "third_party/WebKit/public/web/WebLocalFrame.h"
#include "third_party/WebKit/public/web/WebTextCheckingCompletion.h"
#include "third_party/WebKit/public/web/WebTextCheckingResult.h"
#include "third_party/WebKit/public/web/WebTextDecorationType.h"
#include "third_party/WebKit/public/web/WebView.h"
using blink::WebElement;
-using blink::WebFrame;
+using blink::WebLocalFrame;
using blink::WebString;
using blink::WebTextCheckingCompletion;
using blink::WebTextCheckingResult;
@@ -112,7 +112,7 @@ bool SpellCheckProvider::OnMessageReceived(const IPC::Message& message) {
void SpellCheckProvider::FocusedNodeChanged(const blink::WebNode& unused) {
#if defined(USE_BROWSER_SPELLCHECKER)
- WebFrame* frame = render_view()->GetWebView()->focusedFrame();
+ WebLocalFrame* frame = render_view()->GetWebView()->focusedFrame();
WebElement element = frame->document().isNull() ? WebElement() :
frame->document().focusedElement();
bool enabled = !element.isNull() && element.isEditable();
@@ -290,7 +290,11 @@ void SpellCheckProvider::EnableSpellcheck(bool enable) {
if (!render_view()->GetWebView())
return;
- WebFrame* frame = render_view()->GetWebView()->focusedFrame();
+ WebLocalFrame* frame = render_view()->GetWebView()->focusedFrame();
+ if (!frame)
+ LOG(ERROR) << "hyb: not local frame";
yabinh 2016/06/22 13:34:49 Remove the null check to see what will happen.
dcheng 2016/07/01 06:53:16 OK, so I think this is because Spellcheck uses Ren
dcheng 2016/07/01 09:12:04 Please clean up the logging here and in FocusContr
+ // return;
+
frame->enableContinuousSpellChecking(enable);
if (!enable)
frame->removeSpellingMarkers();

Powered by Google App Engine
This is Rietveld 408576698