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 6987fcc95dab4f69a9d5887fe12e657529ad8d78..2013daaf56ef6ece851ca4dc4531c6ce76837099 100644 |
| --- a/content/browser/renderer_host/render_widget_host_view_aura.cc |
| +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc |
| @@ -446,7 +446,7 @@ gfx::NativeViewAccessible RenderWidgetHostViewAura::GetNativeViewAccessible() { |
| } |
| void RenderWidgetHostViewAura::MovePluginWindows( |
| - const gfx::Point& scroll_offset, |
| + const gfx::Vector2d& scroll_offset, |
| const std::vector<webkit::npapi::WebPluginGeometry>& plugin_window_moves) { |
| #if defined(OS_WIN) |
| // We need to clip the rectangle to the tab's viewport, otherwise we will draw |
| @@ -464,14 +464,14 @@ void RenderWidgetHostViewAura::MovePluginWindows( |
| for (size_t i = 0; i < moves.size(); ++i) { |
| gfx::Rect clip = moves[i].clip_rect; |
| - clip.Offset(moves[i].window_rect.origin()); |
| + clip.Offset(moves[i].window_rect.OffsetFromOrigin()); |
|
Peter Kasting
2012/10/30 01:14:14
Nit: Combine these two Offset() calls (2 places)
|
| clip.Offset(scroll_offset); |
| clip.Intersect(view_port); |
| clip.Offset(-moves[i].window_rect.x(), -moves[i].window_rect.y()); |
|
Peter Kasting
2012/10/30 01:14:14
Nit: -moves[i].window_rect.OffsetFromOrigin()
|
| - clip.Offset(-scroll_offset.x(), -scroll_offset.y()); |
| + clip.Offset(-scroll_offset); |
| moves[i].clip_rect = clip; |
| - moves[i].window_rect.Offset(view_bounds.origin()); |
| + moves[i].window_rect.Offset(view_bounds.OffsetFromOrigin()); |
| } |
| MovePluginWindowsHelper(parent, moves); |