diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-27 22:00:33 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-27 22:00:33 +0000 |
commit | fc1ca757c4b64d9e42cd1a20fb5de98355a58a12 (patch) | |
tree | 4e84e4e32b16a204c9126bc103597d410dc9d8b2 | |
parent | cc23a3d97f3573fe7d0abb856bd55014f2bb8cfe (diff) | |
download | chromium_src-fc1ca757c4b64d9e42cd1a20fb5de98355a58a12.zip chromium_src-fc1ca757c4b64d9e42cd1a20fb5de98355a58a12.tar.gz chromium_src-fc1ca757c4b64d9e42cd1a20fb5de98355a58a12.tar.bz2 |
Fix a small, subtle problem that caused an interactive_ui_test failure.
BUG=5054
Review URL: http://codereview.chromium.org/18865
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8758 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/views/toolbar_view.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/chrome/browser/views/toolbar_view.cc b/chrome/browser/views/toolbar_view.cc index 18922dd..fdfd2fd 100644 --- a/chrome/browser/views/toolbar_view.cc +++ b/chrome/browser/views/toolbar_view.cc @@ -479,9 +479,15 @@ gfx::Size BrowserToolbarView::GetPreferredSize() { return gfx::Size(0, normal_background.height()); } + // Note: We make sure to return the same value in the "no browser window" case + // as the "not maximized" case, so that when a popup is opened at a particular + // requested size, we'll report the same preferred size during the initial + // window size calculation (when there isn't yet a browser window) as when + // we're actually laying things out after setting up the browser window. This + // prevents the content area from being off by |kClientEdgeThickness| px. int client_edge_height = - (browser_->window() && !browser_->window()->IsMaximized()) ? - BrowserView::kClientEdgeThickness : 0; + (browser_->window() && browser_->window()->IsMaximized()) ? + 0 : BrowserView::kClientEdgeThickness; return gfx::Size(0, location_bar_->GetPreferredSize().height() + client_edge_height); } |