diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-12 00:12:14 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-12 00:12:14 +0000 |
commit | 95e859b7af698105e1ce63793c67c9a358b7f329 (patch) | |
tree | 9c7a3011b0b1f0d31b961954f2dc573b37433c2e /chrome/browser | |
parent | a15a6421c27899acfa4eaef7eb1121c97f24a452 (diff) | |
download | chromium_src-95e859b7af698105e1ce63793c67c9a358b7f329.zip chromium_src-95e859b7af698105e1ce63793c67c9a358b7f329.tar.gz chromium_src-95e859b7af698105e1ce63793c67c9a358b7f329.tar.bz2 |
Fixes bug in background tabs not getting sized correctly. The bug
turned out to be that TabContentsView::GetContainerBounds() was
returning the actual bounds, not the requested bounds, which are not
always the same. We need to return the requested bounds from this
call, otherwise bad things happen.
BUG=31132
TEST=see bug
Review URL: http://codereview.chromium.org/549009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35974 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/views/tab_contents/tab_contents_view_gtk.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/browser/views/tab_contents/tab_contents_view_gtk.cc b/chrome/browser/views/tab_contents/tab_contents_view_gtk.cc index b18c8c3..79f246b 100644 --- a/chrome/browser/views/tab_contents/tab_contents_view_gtk.cc +++ b/chrome/browser/views/tab_contents/tab_contents_view_gtk.cc @@ -211,6 +211,11 @@ gfx::NativeWindow TabContentsViewGtk::GetTopLevelNativeWindow() const { void TabContentsViewGtk::GetContainerBounds(gfx::Rect* out) const { GetBounds(out, false); + + // Callers expect the requested bounds not the actual bounds. For example, + // during init callers expect 0x0, but Gtk layout enforces a min size of 1x1. + out->set_width(GetNativeView()->requisition.width); + out->set_height(GetNativeView()->requisition.height); } void TabContentsViewGtk::StartDragging(const WebDropData& drop_data, |