Bug 1372535 - On Mac, remove the window drag space when sizemode!=fullscreen rather than sizemode==maximized. r?johann draft
authorDão Gottwald <dao@mozilla.com>
Wed, 14 Jun 2017 12:51:40 +0200
changeset 593963 ac7b218bba3d775af6cd418a050604d91f4e0a29
parent 593303 a8f8e440d627d686fa8898483aa9c5da928a8fa4
child 633297 eaaa335b493e70e6fc5df579cb32bd9b08dafd76
push id63896
push userdgottwald@mozilla.com
push dateWed, 14 Jun 2017 10:52:01 +0000
reviewersjohann
bugs1372535
milestone56.0a1
Bug 1372535 - On Mac, remove the window drag space when sizemode!=fullscreen rather than sizemode==maximized. r?johann macOS doesn't really have a maximized mode; it has a "zoomed" mode which we treat as "maximized" sizemode, and it has a fullscreen mode. When you zoom a window, it's supposed to resize to its "natural" or "best" size, which is for most apps the smallest size that does not require scrolling. In Firefox we just say that filling the whole screen is our "best" size. But if a window is zoomed, you can still move it by dragging its title bar. For example, you may want to do that if you want to move it to a different screen. Mac apps usually don't change their appearance at all if they enter the "zoomed" size. They only do that if you make the window fullscreen. The native full screen mode on Mac is much closer to the maximized mode on Windows than the zoomed mode is. Recent versions of macOS have changed the default action of the green window button to be fullscreen instead of zoom. You can now only zoom windows by double clicking the title bar or clicking the green button while holding Alt. MozReview-Commit-ID: IBu2fBNeuil
browser/themes/shared/browser.inc.css
--- a/browser/themes/shared/browser.inc.css
+++ b/browser/themes/shared/browser.inc.css
@@ -1,24 +1,25 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 %ifdef MOZ_PHOTON_THEME
 %ifdef CAN_DRAW_IN_TITLEBAR
 /* Add space for dragging the window */
-%ifdef MENUBAR_CAN_AUTOHIDE
-:root[tabsintitlebar][sizemode=normal] #toolbar-menubar[autohide=true] ~ #TabsToolbar {
+%ifdef MOZ_WIDGET_COCOA
+:root[tabsintitlebar]:not([sizemode=fullscreen]) #TabsToolbar
+%elifdef MENUBAR_CAN_AUTOHIDE
+:root[tabsintitlebar][sizemode=normal] #toolbar-menubar[autohide=true] ~ #TabsToolbar
+%else
+:root[tabsintitlebar][sizemode=normal] #TabsToolbar
+%endif
+{
   padding-inline-start: 40px;
 }
-%else
-:root[tabsintitlebar][sizemode=normal] #TabsToolbar {
-  padding-inline-start: 40px;
-}
-%endif
 %endif
 
 /* Go button */
 .urlbar-go-button {
   padding: 0 3px;
   list-style-image: url("chrome://browser/skin/reload-stop-go.png");
 }