Chromium Code Reviews| 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..fcddd875208443f5dce2078bd9df4c46921887b6 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( |
| +void RenderWidgetHostViewAura::EnsureCaretNotInRect(const gfx::Rect& rect) { |
| + gfx::Rect hiding_area_in_this_window( |
| gfx::IntersectRects(rect, window_->GetBoundsInScreen())); |
| - if (intersected_rect.IsEmpty()) |
| + if (hiding_area_in_this_window.IsEmpty()) |
| return; |
| host_->ScrollFocusedEditableNodeIntoRect( |
| - ConvertRectFromScreen(intersected_rect)); |
| + ConvertRectFromScreen(gfx::SubtractRects(window_->GetBoundsInScreen(), |
| + hiding_area_in_this_window))); |
|
sadrul
2016/12/08 00:57:29
If you change |rect| from screen-space to local-sp
yhanada
2016/12/08 03:31:36
Done.
|
| } |
| bool RenderWidgetHostViewAura::IsTextEditCommandEnabled( |