summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/tab_contents
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-08 16:47:25 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-08 16:47:25 +0000
commit1c48e2f4b71bdedc8b6ef775c9e89456d91fd9d4 (patch)
tree5bbf79b348a676e85cf395974adb5f4864959019 /chrome/browser/views/tab_contents
parent182800f565fc7d5759c36a3983dddfe4ac62e4db (diff)
downloadchromium_src-1c48e2f4b71bdedc8b6ef775c9e89456d91fd9d4.zip
chromium_src-1c48e2f4b71bdedc8b6ef775c9e89456d91fd9d4.tar.gz
chromium_src-1c48e2f4b71bdedc8b6ef775c9e89456d91fd9d4.tar.bz2
Fixes bug in background tabs not getting sized correctly. We need to
set the size request, which triggers a layout. The old code wasn't updating the size request, so the hosting widget never changed the size. BUG=31132 TEST=see bug Review URL: http://codereview.chromium.org/523145 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35796 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/tab_contents')
-rw-r--r--chrome/browser/views/tab_contents/tab_contents_view_gtk.cc9
1 files changed, 8 insertions, 1 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 3ed8c75..b18c8c3 100644
--- a/chrome/browser/views/tab_contents/tab_contents_view_gtk.cc
+++ b/chrome/browser/views/tab_contents/tab_contents_view_gtk.cc
@@ -232,7 +232,14 @@ void TabContentsViewGtk::OnTabCrashed() {
void TabContentsViewGtk::SizeContents(const gfx::Size& size) {
// TODO(brettw) this is a hack and should be removed. See tab_contents_view.h.
- WasSized(size);
+
+ // We're contained in a fixed. To have the fixed relay us out to |size|, set
+ // the size request, which triggers OnSizeAllocate.
+ gtk_widget_set_size_request(GetNativeView(), size.width(), size.height());
+
+ // We need to send this immediately.
+ if (tab_contents()->render_widget_host_view())
+ tab_contents()->render_widget_host_view()->SetSize(size);
}
void TabContentsViewGtk::Focus() {