Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 1406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1417 return true; | 1417 return true; |
| 1418 } | 1418 } |
| 1419 | 1419 |
| 1420 void RenderWidgetHostViewAura::ExtendSelectionAndDelete( | 1420 void RenderWidgetHostViewAura::ExtendSelectionAndDelete( |
| 1421 size_t before, size_t after) { | 1421 size_t before, size_t after) { |
| 1422 RenderFrameHostImpl* rfh = GetFocusedFrame(); | 1422 RenderFrameHostImpl* rfh = GetFocusedFrame(); |
| 1423 if (rfh) | 1423 if (rfh) |
| 1424 rfh->ExtendSelectionAndDelete(before, after); | 1424 rfh->ExtendSelectionAndDelete(before, after); |
| 1425 } | 1425 } |
| 1426 | 1426 |
| 1427 void RenderWidgetHostViewAura::EnsureCaretInRect(const gfx::Rect& rect) { | 1427 void RenderWidgetHostViewAura::EnsureCaretNotInRect(const gfx::Rect& rect) { |
| 1428 gfx::Rect intersected_rect( | 1428 gfx::Rect hiding_area_in_this_window(ConvertRectFromScreen( |
| 1429 gfx::IntersectRects(rect, window_->GetBoundsInScreen())); | 1429 gfx::IntersectRects(rect, window_->GetBoundsInScreen()))); |
|
sadrul
2016/12/08 03:34:45
I was thinking this would be:
gfx::Rect rect_in_
yhanada
2016/12/08 03:47:49
Sorry, I misunderstood what you meant. Done.
| |
| 1430 | 1430 |
| 1431 if (intersected_rect.IsEmpty()) | 1431 if (hiding_area_in_this_window.IsEmpty()) |
| 1432 return; | 1432 return; |
| 1433 | 1433 |
| 1434 host_->ScrollFocusedEditableNodeIntoRect( | 1434 host_->ScrollFocusedEditableNodeIntoRect( |
| 1435 ConvertRectFromScreen(intersected_rect)); | 1435 gfx::SubtractRects(window_->bounds(), hiding_area_in_this_window)); |
| 1436 } | 1436 } |
| 1437 | 1437 |
| 1438 bool RenderWidgetHostViewAura::IsTextEditCommandEnabled( | 1438 bool RenderWidgetHostViewAura::IsTextEditCommandEnabled( |
| 1439 ui::TextEditCommand command) const { | 1439 ui::TextEditCommand command) const { |
| 1440 return false; | 1440 return false; |
| 1441 } | 1441 } |
| 1442 | 1442 |
| 1443 void RenderWidgetHostViewAura::SetTextEditCommandForNextKeyEvent( | 1443 void RenderWidgetHostViewAura::SetTextEditCommandForNextKeyEvent( |
| 1444 ui::TextEditCommand command) {} | 1444 ui::TextEditCommand command) {} |
| 1445 | 1445 |
| (...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2388 | 2388 |
| 2389 void RenderWidgetHostViewAura::SetPopupChild( | 2389 void RenderWidgetHostViewAura::SetPopupChild( |
| 2390 RenderWidgetHostViewAura* popup_child_host_view) { | 2390 RenderWidgetHostViewAura* popup_child_host_view) { |
| 2391 popup_child_host_view_ = popup_child_host_view; | 2391 popup_child_host_view_ = popup_child_host_view; |
| 2392 event_handler_->SetPopupChild( | 2392 event_handler_->SetPopupChild( |
| 2393 popup_child_host_view, | 2393 popup_child_host_view, |
| 2394 popup_child_host_view ? popup_child_host_view->event_handler() : nullptr); | 2394 popup_child_host_view ? popup_child_host_view->event_handler() : nullptr); |
| 2395 } | 2395 } |
| 2396 | 2396 |
| 2397 } // namespace content | 2397 } // namespace content |
| OLD | NEW |