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)); |