From c4e93f1c43a77b4fa88b7cafddc6ef8195eedf24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20O=E2=80=99Shannessy?= Date: Tue, 10 Jul 2012 21:08:06 -0700 Subject: [PATCH] Bug 714186 - Add padding to top of windows when fullscreen on Lion. r=fryn ui-r=shorlander --- browser/base/content/browser-fullScreen.js | 7 ++++++- browser/themes/pinstripe/browser.css | 14 ++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/browser/base/content/browser-fullScreen.js b/browser/base/content/browser-fullScreen.js index 3b7d3622aff8..a80f01c59f43 100644 --- a/browser/base/content/browser-fullScreen.js +++ b/browser/base/content/browser-fullScreen.js @@ -27,8 +27,13 @@ var FullScreen = { // If we're leaving fullscreen, then we'll go through the exit code below to // make sure toolbars are made visible in the case of DOM fullscreen. if (enterFS && this.useLionFullScreen) { - if (document.mozFullScreen) + if (document.mozFullScreen) { this.showXULChrome("toolbar", false); + } + else { + gNavToolbox.setAttribute("inFullscreen", true); + document.documentElement.setAttribute("inFullscreen", true); + } return; } diff --git a/browser/themes/pinstripe/browser.css b/browser/themes/pinstripe/browser.css index 88a1a001577b..518c842aa2a2 100644 --- a/browser/themes/pinstripe/browser.css +++ b/browser/themes/pinstripe/browser.css @@ -2737,6 +2737,20 @@ panel[dimmed="true"] { position: relative; } +/* Lion Fullscreen window styling */ +@media (-moz-mac-lion-theme) { + #navigator-toolbox[inFullscreen][tabsontop="true"]:not(:-moz-lwtheme)::before { + height: 36px; + } + #main-window[inFullscreen]:-moz-lwtheme { + /* This additional padding matches the change in height in the pseudo-element + * above. The rules combined force the top 22px of the background image to + * be hidden, so there image doesn't jump around with the loss of the titlebar */ + padding-top: 11px; + background-position: right -11px; + } +} + #devtools-sidebar-box { background-color: -moz-Field; }