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

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: sync 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..b348fd9ecddd358288389feedc0020bf014a1bba 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,10 @@ void SpellCheckProvider::EnableSpellcheck(bool enable) {
if (!render_view()->GetWebView())
return;
- WebFrame* frame = render_view()->GetWebView()->focusedFrame();
+ WebLocalFrame* frame = render_view()->GetWebView()->focusedFrame();
+ if (!frame)
dcheng 2016/06/13 17:29:45 This seems like the code is doing the wrong thing:
yabinh 2016/06/16 07:12:57 Most of the null checks is unnecessary, except for
+ return;
+
frame->enableContinuousSpellChecking(enable);
if (!enable)
frame->removeSpellingMarkers();
« no previous file with comments | « no previous file | components/printing/renderer/print_web_view_helper.cc » ('j') | content/renderer/render_view_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698