Bug 878436 - Update Lion Fullscreen window styling offsets to avoid themes shifting position. r=timdream
authorMatthew Noorenberghe <mozilla@noorenberghe.ca>
Fri, 21 Mar 2014 15:44:00 -0700
changeset 176406 d97d25f58092b8cc7719b4363e08bd687c4e72a7
parent 176405 38fe3c6e2f4addcbf22a671930de7ecf47182911
child 176407 0593a10769328f01cc492602b2d2d442f452b59e
push id26523
push userryanvm@gmail.com
push dateTue, 01 Apr 2014 20:31:03 +0000
treeherdermozilla-central@734e0f2b5083 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstimdream
bugs878436
milestone31.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 878436 - Update Lion Fullscreen window styling offsets to avoid themes shifting position. r=timdream Based on investigation by Nils Maier [:nmaier].
browser/themes/osx/browser.css
--- a/browser/themes/osx/browser.css
+++ b/browser/themes/osx/browser.css
@@ -2760,18 +2760,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;
 }
 
@@ -3896,29 +3896,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;