Bug 878436 - Update Lion Fullscreen window styling offsets to avoid themes shifting position. r=timdream a=sylvestre
authorMatthew Noorenberghe <mozilla@noorenberghe.ca>
Fri, 04 Apr 2014 14:29:31 -0700
changeset 183637 4d27870d3fdc
parent 183636 a2fccb7d55f7
child 183638 577e8eb4980b
push id3429
push usermozilla@noorenberghe.ca
push date2014-04-04 22:11 +0000
treeherdermozilla-beta@4d27870d3fdc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstimdream, sylvestre
bugs878436
milestone29.0
Bug 878436 - Update Lion Fullscreen window styling offsets to avoid themes shifting position. r=timdream a=sylvestre

Based on investigation by Nils Maier [:nmaier].
browser/themes/osx/browser.css
--- a/browser/themes/osx/browser.css
+++ b/browser/themes/osx/browser.css
@@ -2743,18 +2743,18 @@ toolbarbutton.chevron > .toolbarbutton-m
  *
  * Because of Bug 941309, we make sure this pseudoelement always exists,
  * but we only make it visible when we need it.
  */
 #navigator-toolbox::before {
   content: '';
   display: block;
   -moz-appearance: toolbar;
-  height: calc(@tabHeight@ + 1px);
-  margin-bottom: calc(-1px - @tabHeight@);
+  height: @tabHeight@;
+  margin-bottom: -@tabHeight@;
   visibility: hidden;
 }
 
 #main-window:not(:-moz-any([privatebrowsingmode=temporary],[customizing])) #navigator-toolbox[inFullscreen]:not(:-moz-lwtheme)::before,
 #main-window:not(:-moz-any([privatebrowsingmode=temporary],[customizing],[tabsintitlebar])) #navigator-toolbox:not(:-moz-lwtheme)::before {
   visibility: visible;
 }
 
@@ -3851,29 +3851,27 @@ toolbarbutton.chevron > .toolbarbutton-m
   border-left-style: solid;
   border-top-left-radius: .3em;
   margin-left: 1em;
 }
 
 /* Lion Fullscreen window styling */
 @media (-moz-mac-lion-theme) {
   #navigator-toolbox[inFullscreen]:not(:-moz-lwtheme)::before {
-    height: calc(@tabHeight@ + 11px) !important;
+    /* Adjust by the full element height of #titlebar, since that element is
+     * not displayed in native full-screen.
+     * Also add the height of the tabs, since we're calculating the
+     * total height of this pseudo-element, not just the top-padding. */
+    height: calc(@tabHeight@ + @spaceAboveTabbar@) !important;
   }
   #main-window[inFullscreen][privatebrowsingmode=temporary],
   #main-window[inFullscreen]:-moz-lwtheme {
-    /* This additional padding matches the change in height in the pseudo-element
-     * above. */
-    padding-top: 11px;
-  }
-  #main-window[inFullscreen]:not([privatebrowsingmode=temporary]):-moz-lwtheme {
-    /* In combination with the previous rule, forces the top 22px of the
-     * background image to be hidden, so the image doesn't jump around with
-     * the loss of the titlebar. */
-    background-position: right -11px;
+    /* Adjust by the full element height of #titlebar, since that element is
+     * not displayed in native full-screen. */
+    padding-top: @spaceAboveTabbar@;
   }
 }
 
 #full-screen-warning-message {
   background-image: url("chrome://browser/skin/fullscreen-darknoise.png");
   color: white;
   border-radius: 4px;
   margin-top: 30px;