Chromium Code Reviews| 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(); |