diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-09 21:21:24 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-09 21:21:24 +0000 |
commit | e6dc06f487f75f14160677b3ebf0951c89e15a59 (patch) | |
tree | 0708868dad5845925d0ca1d141a91efd926f2b83 /chrome | |
parent | 90b6707fe7bdd8dea5d908040e3a2c1f17feb838 (diff) | |
download | chromium_src-e6dc06f487f75f14160677b3ebf0951c89e15a59.zip chromium_src-e6dc06f487f75f14160677b3ebf0951c89e15a59.tar.gz chromium_src-e6dc06f487f75f14160677b3ebf0951c89e15a59.tar.bz2 |
Use the calculated dragged tab bounds when rendering the screenshot into the canvas.
BUG=15869
TEST=Drag a tab out of the Linux tab strip. There should be a light-blue border around the dragged tab contents.
Review URL: http://codereview.chromium.org/155317
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20314 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/gtk/tabs/dragged_tab_gtk.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/chrome/browser/gtk/tabs/dragged_tab_gtk.cc b/chrome/browser/gtk/tabs/dragged_tab_gtk.cc index 81012eb..8e829ec 100644 --- a/chrome/browser/gtk/tabs/dragged_tab_gtk.cc +++ b/chrome/browser/gtk/tabs/dragged_tab_gtk.cc @@ -292,11 +292,10 @@ void DraggedTabGtk::PaintScreenshotIntoCanvas(gfx::Canvas* canvas, if (!backing_store_) return; - gfx::Rect rect(0, 0, - contents_->allocation.width, contents_->allocation.height); + gfx::Rect rect(0, 0, target_bounds.width(), target_bounds.height()); SkBitmap bitmap = backing_store_->PaintRectToBitmap(rect); if (!bitmap.isNull()) - canvas->DrawBitmapInt(bitmap, 0, renderer_->bounds().height()); + canvas->DrawBitmapInt(bitmap, target_bounds.x(), target_bounds.y()); } // static |