Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Unified Diff: content/browser/renderer_host/render_widget_host_view_win.cc

Issue 11269022: Add Vector2d classes that represent offsets, instead of using Point. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more vector use fixes Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_widget_host_view_win.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_win.cc b/content/browser/renderer_host/render_widget_host_view_win.cc
index 33d9832cf69ce6f50d356cc756e60ada57f9d7c9..5d8d44913bc764e23c879d2c873ee8b3bfa53b2b 100644
--- a/content/browser/renderer_host/render_widget_host_view_win.cc
+++ b/content/browser/renderer_host/render_widget_host_view_win.cc
@@ -637,7 +637,7 @@ RenderWidgetHostViewWin::GetNativeViewAccessible() {
}
void RenderWidgetHostViewWin::MovePluginWindows(
- const gfx::Point& scroll_offset,
+ const gfx::Vector2d& scroll_offset,
const std::vector<webkit::npapi::WebPluginGeometry>& plugin_window_moves) {
MovePluginWindowsHelper(m_hWnd, plugin_window_moves);
}
@@ -814,9 +814,8 @@ void RenderWidgetHostViewWin::Redraw() {
RedrawWindow(NULL, damage_region, RDW_UPDATENOW | RDW_NOCHILDREN);
// Send the invalid rect in screen coordinates.
- gfx::Rect screen_rect = GetViewBounds();
gfx::Rect invalid_screen_rect(damage_bounds);
- invalid_screen_rect.Offset(screen_rect.x(), screen_rect.y());
+ invalid_screen_rect.Offset(GetViewBounds().OffsetFromOrigin());
PaintPluginWindowsHelper(m_hWnd, invalid_screen_rect);
}

Powered by Google App Engine
This is Rietveld 408576698