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

Unified Diff: components/autofill/content/renderer/page_click_tracker.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
« no previous file with comments | « chrome/renderer/spellchecker/spellcheck_provider.cc ('k') | content/public/renderer/render_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/content/renderer/page_click_tracker.cc
diff --git a/components/autofill/content/renderer/page_click_tracker.cc b/components/autofill/content/renderer/page_click_tracker.cc
index 9e2f649f023a15a00f2f7c6b42e5231b8242d565..59adae197965679bb713d57b7fccdd4accc51ad6 100644
--- a/components/autofill/content/renderer/page_click_tracker.cc
+++ b/components/autofill/content/renderer/page_click_tracker.cc
@@ -46,12 +46,14 @@ const WebInputElement GetTextWebInputElement(const WebNode& node) {
// Checks to see if a text field was the previously selected node and is now
// losing its focus.
bool DidSelectedTextFieldLoseFocus(const WebNode& newly_clicked_node) {
- blink::WebNode focused_node = newly_clicked_node.document().focusedNode();
+ blink::WebElement focused_element =
+ newly_clicked_node.document().focusedElement();
- if (focused_node.isNull() || GetTextWebInputElement(focused_node).isNull())
+ if (focused_element.isNull() ||
+ GetTextWebInputElement(focused_element).isNull())
return false;
- return focused_node != newly_clicked_node;
+ return focused_element != newly_clicked_node;
}
} // namespace
@@ -86,7 +88,7 @@ void PageClickTracker::DidHandleMouseEvent(const WebMouseEvent& event) {
if (input_element.isNull())
return;
- bool is_focused = (last_node_clicked_ == render_view()->GetFocusedNode());
+ bool is_focused = (last_node_clicked_ == render_view()->GetFocusedElement());
listener_->InputElementClicked(input_element, was_focused_, is_focused);
}
@@ -134,7 +136,7 @@ void PageClickTracker::handleEvent(const WebDOMEvent& event) {
return;
last_node_clicked_ = node;
Ilya Sherman 2014/02/26 21:28:54 nit: node -> element? Please consider updating al
- was_focused_ = (node.document().focusedNode() == last_node_clicked_);
+ was_focused_ = (node.document().focusedElement() == last_node_clicked_);
}
void PageClickTracker::HandleTextFieldMaybeLosingFocus(
« no previous file with comments | « chrome/renderer/spellchecker/spellcheck_provider.cc ('k') | content/public/renderer/render_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698