Bug 1297847 - fix titlebar button locations across titlebar/lwtheme/devedition state, r?mconley,mstange draft
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Thu, 25 Aug 2016 17:16:08 +0100
changeset 405530 7676f40bac5240bff9e153665a4b657b47efe379
parent 405457 7963ebdd52b93f96b812eff2eab8d94097147b9c
child 529465 22eb830fe5d4c3f00b4658ad830b7c43de8ca5de
push id27514
push usergijskruitbosch@gmail.com
push dateThu, 25 Aug 2016 16:16:37 +0000
reviewersmconley, mstange
bugs1297847
milestone51.0a1
Bug 1297847 - fix titlebar button locations across titlebar/lwtheme/devedition state, r?mconley,mstange MozReview-Commit-ID: C9nPYMgi5NX
browser/base/content/browser.css
browser/themes/osx/browser.css
--- a/browser/base/content/browser.css
+++ b/browser/base/content/browser.css
@@ -238,26 +238,16 @@ toolbar[customizing] > .overflow-button 
 
 #titlebar-secondary-buttonbox:-moz-locale-dir(rtl),
 #titlebar-buttonbox-container:-moz-locale-dir(ltr),
 .titlebar-placeholder[type="caption-buttons"]:-moz-locale-dir(ltr),
 .titlebar-placeholder[type="fullscreen-button"]:-moz-locale-dir(rtl) {
   -moz-box-ordinal-group: 0;
 }
 
-/* In private windows, the #titlebar-content is higher because of the
- * private browsing indicator. With the margin-top the titlebar buttons
- * align to the top correctly in that case, but only if we don't stretch
- * the box they're in because the container is too high, so we override
- * the default alignment value (stretch).
- */
-#main-window[tabsintitlebar] > #titlebar > #titlebar-content > #titlebar-buttonbox-container {
-  -moz-box-align: start;
-}
-
 %else
 /* On non-OSX, these should be start-aligned */
 #titlebar-buttonbox-container {
   -moz-box-align: start;
 }
 %endif
 
 %if !defined(MOZ_WIDGET_GTK)
--- a/browser/themes/osx/browser.css
+++ b/browser/themes/osx/browser.css
@@ -113,23 +113,27 @@
  */
 #main-window[tabsintitlebar] > #titlebar {
   min-height: calc(var(--tab-min-height) + var(--space-above-tabbar) - var(--tab-toolbar-navbar-overlap));
 }
 
 /**
  * We also vertically center the window buttons.
  */
+#titlebar-buttonbox-container {
+  -moz-box-align: start;
+}
+
 #main-window[tabsintitlebar] > #titlebar > #titlebar-content > #titlebar-buttonbox-container,
 #main-window[tabsintitlebar] > #titlebar > #titlebar-content > #titlebar-secondary-buttonbox > #titlebar-fullscreen-button {
   margin-top: @windowButtonMarginTop@;
 }
 
-#main-window:not([tabsintitlebar]) > #titlebar > #titlebar-content > #titlebar-buttonbox-container:-moz-lwtheme,
-#main-window:not([tabsintitlebar]) > #titlebar > #titlebar-content > #titlebar-secondary-buttonbox > #titlebar-fullscreen-button:-moz-lwtheme {
+#main-window:not([tabsintitlebar]) > #titlebar > #titlebar-content > #titlebar-buttonbox-container,
+#main-window:not([tabsintitlebar]) > #titlebar > #titlebar-content > #titlebar-secondary-buttonbox > #titlebar-fullscreen-button {
   margin-top: 3px;
 }
 
 #main-window[customize-entered] > #titlebar {
   -moz-appearance: none;
 }
 
 /** End titlebar **/