Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4426)

Unified Diff: chrome/browser/views/toolbar_view.cc

Issue 18865: Fix a small, subtle problem that caused an interactive_ui_test failure.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/toolbar_view.cc
===================================================================
--- chrome/browser/views/toolbar_view.cc (revision 8726)
+++ chrome/browser/views/toolbar_view.cc (working copy)
@@ -479,9 +479,15 @@
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);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698