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

Unified Diff: chrome/browser/ui/cocoa/browser_window_layout.mm

Issue 2491343003: [Mac] Fix for fullscreen toolbar layout issues (Closed)
Patch Set: Fix for avi Created 4 years, 1 month 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: chrome/browser/ui/cocoa/browser_window_layout.mm
diff --git a/chrome/browser/ui/cocoa/browser_window_layout.mm b/chrome/browser/ui/cocoa/browser_window_layout.mm
index b9dc6328d96078f6ed13db66fb3950db546c4192..0ab98c7bdb859bfcac8aa3891e07db578b521884 100644
--- a/chrome/browser/ui/cocoa/browser_window_layout.mm
+++ b/chrome/browser/ui/cocoa/browser_window_layout.mm
@@ -280,8 +280,14 @@ const CGFloat kLocationBarRightOffset = 35;
// Lay out the toolbar.
if (parameters.hasToolbar) {
- output_.toolbarFrame = NSMakeRect(
- 0, maxY - parameters_.toolbarHeight, width, parameters_.toolbarHeight);
+ CGFloat toolbarY = maxY;
+ if (parameters_.inAnyFullscreen &&
+ parameters_.toolbarStyle == FullscreenToolbarStyle::TOOLBAR_NONE) {
+ toolbarY = parameters_.windowSize.height + fullscreenYOffset_;
+ }
+
+ output_.toolbarFrame = NSMakeRect(0, toolbarY - parameters_.toolbarHeight,
+ width, parameters_.toolbarHeight);
maxY = NSMinY(output_.toolbarFrame);
} else if (parameters_.hasLocationBar) {
CGFloat toolbarX = kLocBarLeftRightInset;
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller_private.mm ('k') | chrome/browser/ui/cocoa/fullscreen_toolbar_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698