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

Unified Diff: content/renderer/render_view_impl.cc

Issue 790413002: Focus following for the non-editable controls on web page in magnifier mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix nits. Created 6 years 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 | « content/public/browser/focused_node_details.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index fe560484ed17550d6c517bf0fcfc1d99e6f5a7e5..5e82ac074e4d951cbb82fe8212ce046334831838 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -1928,7 +1928,13 @@ void RenderViewImpl::focusPrevious() {
void RenderViewImpl::focusedNodeChanged(const WebNode& node) {
has_scrolled_focused_editable_node_into_rect_ = false;
- Send(new ViewHostMsg_FocusedNodeChanged(routing_id_, IsEditableNode(node)));
+ gfx::Rect node_bounds;
+ if (!node.isNull() && node.isElementNode()) {
+ WebNode web_node = const_cast<WebNode&>(node);
+ node_bounds = gfx::Rect(web_node.to<WebElement>().boundsInViewportSpace());
+ }
+ Send(new ViewHostMsg_FocusedNodeChanged(routing_id_, IsEditableNode(node),
+ node_bounds));
FOR_EACH_OBSERVER(RenderViewObserver, observers_, FocusedNodeChanged(node));
« no previous file with comments | « content/public/browser/focused_node_details.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698