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

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

Issue 165233003: Replace WebDocument::focusedNode to focusedElement (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix nits Created 6 years, 10 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 191a6860c4a94f27362241a9bbe73e0720dcfe4c..2775a1c5079938aa8f5bc95ae7ce74a62919963f 100644
--- a/chrome/renderer/spellchecker/spellcheck_provider.cc
+++ b/chrome/renderer/spellchecker/spellcheck_provider.cc
@@ -13,6 +13,7 @@
#include "chrome/renderer/spellchecker/spellcheck.h"
#include "content/public/renderer/render_view.h"
#include "third_party/WebKit/public/platform/WebVector.h"
+#include "third_party/WebKit/public/web/WebElement.h"
#include "third_party/WebKit/public/web/WebFrame.h"
#include "third_party/WebKit/public/web/WebTextCheckingCompletion.h"
#include "third_party/WebKit/public/web/WebTextCheckingResult.h"
@@ -109,9 +110,9 @@ bool SpellCheckProvider::OnMessageReceived(const IPC::Message& message) {
void SpellCheckProvider::FocusedNodeChanged(const blink::WebNode& unused) {
#if defined(OS_MACOSX)
bool enabled = false;
- blink::WebNode node = render_view()->GetFocusedNode();
- if (!node.isNull())
- enabled = render_view()->IsEditableNode(node);
+ blink::WebElement element = render_view()->GetFocusedElement();
+ if (!element.isNull())
+ enabled = render_view()->IsEditableNode(element);
bool checked = false;
if (enabled && render_view()->GetWebView()) {

Powered by Google App Engine
This is Rietveld 408576698