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

Unified Diff: trunk/src/chrome/browser/ui/cocoa/browser_window_controller_private.mm

Issue 13006019: Revert 190584 "Alternate NTP Mac: Show overlay at fixed position" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 9 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
Index: trunk/src/chrome/browser/ui/cocoa/browser_window_controller_private.mm
===================================================================
--- trunk/src/chrome/browser/ui/cocoa/browser_window_controller_private.mm (revision 190730)
+++ trunk/src/chrome/browser/ui/cocoa/browser_window_controller_private.mm (working copy)
@@ -206,8 +206,8 @@
DCHECK_LE(maxY, NSMaxY(contentBounds) + yOffset);
// Place the toolbar at the top of the reserved area.
- CGFloat toolbarTopY = maxY;
maxY = [self layoutToolbarAtMinX:minX maxY:maxY width:width];
+ CGFloat toolbarBottomY = maxY;
// If we're not displaying the bookmark bar below the infobar, then it goes
// immediately below the toolbar.
@@ -251,13 +251,8 @@
toolbarToWebContentsOffset_ = 0;
contentAreaTop = maxY;
} else {
- CGFloat minToolbarHeight = 0;
- if ([self hasToolbar]) {
- minToolbarHeight = [toolbarController_
- desiredHeightForCompression:bookmarks::kBookmarkBarOverlap];
- }
- contentAreaTop = toolbarTopY - minToolbarHeight;
- toolbarToWebContentsOffset_ = contentAreaTop - maxY;
+ toolbarToWebContentsOffset_ = toolbarBottomY - maxY;
+ contentAreaTop = toolbarBottomY;
}
[self updateContentOffsets];
@@ -847,6 +842,8 @@
}
- (CGFloat)toolbarDividerOpacity {
+ if ([self currentInstantUIState] != browser_window_controller::kInstantUINone)
+ return 1;
return [bookmarkBarController_ toolbarDividerOpacity];
}

Powered by Google App Engine
This is Rietveld 408576698