| Index: content/browser/renderer_host/render_widget_host_view_aura.cc
|
| diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
| index a762af3d07b90ffde7aa976afbd69d9776720f49..508ae90e472c19683073aa2263ec6d6b8b3ce764 100644
|
| --- a/content/browser/renderer_host/render_widget_host_view_aura.cc
|
| +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
| @@ -1424,15 +1424,16 @@ void RenderWidgetHostViewAura::ExtendSelectionAndDelete(
|
| rfh->ExtendSelectionAndDelete(before, after);
|
| }
|
|
|
| -void RenderWidgetHostViewAura::EnsureCaretInRect(const gfx::Rect& rect) {
|
| - gfx::Rect intersected_rect(
|
| - gfx::IntersectRects(rect, window_->GetBoundsInScreen()));
|
| +void RenderWidgetHostViewAura::EnsureCaretNotInRect(const gfx::Rect& rect) {
|
| + gfx::Rect rect_in_local_space = ConvertRectFromScreen(rect);
|
| + gfx::Rect hiding_area_in_this_window =
|
| + gfx::IntersectRects(rect_in_local_space, window_->bounds());
|
|
|
| - if (intersected_rect.IsEmpty())
|
| + if (hiding_area_in_this_window.IsEmpty())
|
| return;
|
|
|
| host_->ScrollFocusedEditableNodeIntoRect(
|
| - ConvertRectFromScreen(intersected_rect));
|
| + gfx::SubtractRects(window_->bounds(), hiding_area_in_this_window));
|
| }
|
|
|
| bool RenderWidgetHostViewAura::IsTextEditCommandEnabled(
|
|
|