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

Unified Diff: chrome/browser/cocoa/bookmark_bar_controller.mm

Issue 155444: Mac pop-up window happier-ness.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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 | chrome/browser/cocoa/bookmark_bar_controller_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/bookmark_bar_controller.mm
===================================================================
--- chrome/browser/cocoa/bookmark_bar_controller.mm (revision 20638)
+++ chrome/browser/cocoa/bookmark_bar_controller.mm (working copy)
@@ -122,9 +122,15 @@
NSRect webframe = [webContentView_ frame];
if (apply) {
superframe.size.height += kBookmarkBarSuperviewHeightAdjustment;
- superframe.origin.y -= kBookmarkBarSuperviewHeightAdjustment;
+ // TODO(jrg): y=0 if we add the bookmark bar before the parent
+ // view (toolbar) is placed in the view hierarchy. A different
+ // CL, where the bookmark bar is extracted from the toolbar nib,
+ // may fix this awkwardness.
+ if (superframe.origin.y > 0) {
+ superframe.origin.y -= kBookmarkBarSuperviewHeightAdjustment;
+ webframe.size.height -= kBookmarkBarWebframeHeightAdjustment;
+ }
frame.size.height += kBookmarkBarHeight;
- webframe.size.height -= kBookmarkBarWebframeHeightAdjustment;
} else {
superframe.size.height -= kBookmarkBarSuperviewHeightAdjustment;
superframe.origin.y += kBookmarkBarSuperviewHeightAdjustment;
« no previous file with comments | « no previous file | chrome/browser/cocoa/bookmark_bar_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698