diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-26 23:42:00 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-26 23:42:00 +0000 |
commit | 10ca595038a6d5e8c896f71c8cdff58aeccf81f1 (patch) | |
tree | 0983ef4746046ac4380b7aa1aa166faa2ea63c2e /chrome | |
parent | 83f6304d38954dd3d1c215d0f26fb78d57d963d4 (diff) | |
download | chromium_src-10ca595038a6d5e8c896f71c8cdff58aeccf81f1.zip chromium_src-10ca595038a6d5e8c896f71c8cdff58aeccf81f1.tar.gz chromium_src-10ca595038a6d5e8c896f71c8cdff58aeccf81f1.tar.bz2 |
Fix a DCHECK in certain cases when coming out of fullscreen mode. The frame gets to layout before the browser view, but it needs to know what the browser view's tabstrip layout is going to look like, or it will lay out wrong.
Review URL: http://codereview.chromium.org/27231
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10535 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/views/frame/browser_view.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/browser/views/frame/browser_view.cc b/chrome/browser/views/frame/browser_view.cc index 12a057c..ce2eb07 100644 --- a/chrome/browser/views/frame/browser_view.cc +++ b/chrome/browser/views/frame/browser_view.cc @@ -310,7 +310,10 @@ gfx::Rect BrowserView::GetFindBarBoundingBox() const { } int BrowserView::GetTabStripHeight() const { - return tabstrip_->height(); + // We want to return tabstrip_->height(), but we might be called in the midst + // of layout, when that hasn't yet been updated to reflect the current state. + // So return what the tabstrip height _ought_ to be right now. + return IsTabStripVisible() ? tabstrip_->GetPreferredSize().height() : 0; } bool BrowserView::IsToolbarVisible() const { |