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

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 a nit. 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
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());
+ }
sadrul 2014/12/12 17:13:49 Instead of this, why not include the bounds with t
jennyz 2014/12/12 23:14:45 Do you mean include |node_bounds| in call to Focus
sadrul 2014/12/15 18:37:16 I mean including the bounds in WebViewClient::focu
jennyz 2014/12/15 23:24:55 As we chatted, this will need to make change in bl
+ Send(new ViewHostMsg_FocusedNodeChanged(routing_id_, IsEditableNode(node),
+ node_bounds));
FOR_EACH_OBSERVER(RenderViewObserver, observers_, FocusedNodeChanged(node));
« content/public/browser/render_view_host.h ('K') | « content/public/browser/render_view_host.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698