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

Unified Diff: content/browser/renderer_host/render_widget_host_view_gtk.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: RenderText fixup 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_gtk.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_gtk.cc b/content/browser/renderer_host/render_widget_host_view_gtk.cc
index 849166352e763dde1af6f899436ad911b78b620f..395331267daa7af78a73df6230e017b1125d230c 100644
--- a/content/browser/renderer_host/render_widget_host_view_gtk.cc
+++ b/content/browser/renderer_host/render_widget_host_view_gtk.cc
@@ -758,7 +758,7 @@ gfx::NativeViewAccessible RenderWidgetHostViewGtk::GetNativeViewAccessible() {
}
void RenderWidgetHostViewGtk::MovePluginWindows(
- const gfx::Point& scroll_offset,
+ const gfx::Vector2d& scroll_offset,
const std::vector<webkit::npapi::WebPluginGeometry>& moves) {
for (size_t i = 0; i < moves.size(); ++i) {
plugin_container_manager_.MovePluginContainer(moves[i]);
@@ -1041,12 +1041,14 @@ void RenderWidgetHostViewGtk::CopyFromCompositingSurface(
skia::PlatformBitmap* output) {
base::ScopedClosureRunner scoped_callback_runner(base::Bind(callback, false));
- const gfx::Rect bounds = GetViewBounds();
+ gfx::Rect src_subrect_in_view = src_subrect;
+ src_subrect_in_view.Offset(GetViewBounds().OffsetFromOrigin());
+
ui::XScopedImage image(XGetImage(ui::GetXDisplay(), ui::GetX11RootWindow(),
- bounds.x() + src_subrect.x(),
- bounds.y() + src_subrect.y(),
- src_subrect.width(),
- src_subrect.height(),
+ src_subrect_in_view.x(),
+ src_subrect_in_view.y(),
+ src_subrect_in_view.width(),
+ src_subrect_in_view.height(),
AllPlanes, ZPixmap));
if (!image.get())
return;

Powered by Google App Engine
This is Rietveld 408576698