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

Unified Diff: content/renderer/input_tag_speech_dispatcher.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: content/renderer/input_tag_speech_dispatcher.cc
diff --git a/content/renderer/input_tag_speech_dispatcher.cc b/content/renderer/input_tag_speech_dispatcher.cc
index 36788c74ad957e26120be71f45b94516383dc05e..092eb2ea2e4a1023172fc86fba39e84c0f86cbbc 100644
--- a/content/renderer/input_tag_speech_dispatcher.cc
+++ b/content/renderer/input_tag_speech_dispatcher.cc
@@ -127,11 +127,10 @@ void InputTagSpeechDispatcher::OnSpeechRecognitionToggleSpeechInput() {
if (document.isNull())
return;
- WebNode focused_node = document.focusedNode();
- if (focused_node.isNull() || !focused_node.isElementNode())
+ blink::WebElement element = document.focusedElement();
+ if (element.isNull())
return;
- blink::WebElement element = focused_node.to<blink::WebElement>();
blink::WebInputElement* input_element = blink::toWebInputElement(&element);
if (!input_element)
return;

Powered by Google App Engine
This is Rietveld 408576698