diff options
author | dpolukhin@chromium.org <dpolukhin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-17 22:03:26 +0000 |
---|---|---|
committer | dpolukhin@chromium.org <dpolukhin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-17 22:03:26 +0000 |
commit | 0323ee417e0fd25c3647dfc8d97f7261945ecb63 (patch) | |
tree | 0d68387b567956707a29135e8cf00977c47b02fd /chrome/browser/tab_contents | |
parent | 6de0bcf0025517c4f31eafce162d90588c609103 (diff) | |
download | chromium_src-0323ee417e0fd25c3647dfc8d97f7261945ecb63.zip chromium_src-0323ee417e0fd25c3647dfc8d97f7261945ecb63.tar.gz chromium_src-0323ee417e0fd25c3647dfc8d97f7261945ecb63.tar.bz2 |
Prevent resizing tab content to 0.
BUG=33440
TEST=Content of duplicated tab should be visible on Chrome OS.
Review URL: http://codereview.chromium.org/616002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39275 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r-- | chrome/browser/tab_contents/tab_contents.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc index 001f26d..359a6c9 100644 --- a/chrome/browser/tab_contents/tab_contents.cc +++ b/chrome/browser/tab_contents/tab_contents.cc @@ -2682,7 +2682,13 @@ void TabContents::BeforeUnloadFiredFromRenderManager( void TabContents::UpdateRenderViewSizeForRenderManager() { // TODO(brettw) this is a hack. See TabContentsView::SizeContents. - view_->SizeContents(view_->GetContainerSize()); + gfx::Size size = view_->GetContainerSize(); + // 0x0 isn't a valid window size (minimal window size is 1x1) but it may be + // here during container initialization and normal window size will be set + // later. In case of tab duplication this resizing to 0x0 prevents setting + // normal size later so just ignore it. + if (!size.IsEmpty()) + view_->SizeContents(size); } DOMUI* TabContents::CreateDOMUIForRenderManager(const GURL& url) { |