diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index a2c67ed8504..f445f232ebe 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -4640,8 +4640,15 @@ var TabsOnTop = { #ifdef MENUBAR_CAN_AUTOHIDE function updateAppButtonDisplay() { - document.getElementById("appmenu-button-container").hidden = - document.getElementById("toolbar-menubar").getAttribute("autohide") != "true"; + var menubarHidden = + document.getElementById("toolbar-menubar").getAttribute("autohide") == "true"; + + document.getElementById("appmenu-button-container").hidden = !menubarHidden; + + if (menubarHidden) + document.documentElement.setAttribute("chromemargin", "0,-1,-1,-1"); + else + document.documentElement.removeAttribute("chromemargin"); } #endif diff --git a/browser/base/content/win6BrowserOverlay.xul b/browser/base/content/win6BrowserOverlay.xul new file mode 100644 index 00000000000..c2dbaf3fb34 --- /dev/null +++ b/browser/base/content/win6BrowserOverlay.xul @@ -0,0 +1,44 @@ + +# -*- Mode: HTML -*- +# +# ***** BEGIN LICENSE BLOCK ***** +# Version: MPL 1.1/GPL 2.0/LGPL 2.1 +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# The Original Code is mozilla.org Code. +# +# The Initial Developer of the Original Code is the Mozilla Foundation. +# Portions created by the Initial Developer are Copyright (C) 2010 +# the Initial Developer. All Rights Reserved. +# +# Contributor(s): +# Dão Gottwald (Original Author) +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 2 or later (the "GPL"), or +# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +# in which case the provisions of the GPL or the LGPL are applicable instead +# of those above. If you wish to allow use of your version of this file only +# under the terms of either the GPL or the LGPL, and not to allow others to +# use your version of this file under the terms of the MPL, indicate your +# decision by deleting the provisions above and replace them with the notice +# and other provisions required by the GPL or the LGPL. If you do not delete +# the provisions above, a recipient may use your version of this file under +# the terms of any one of the MPL, the GPL or the LGPL. +# +# ***** END LICENSE BLOCK ***** + + + + diff --git a/browser/base/jar.mn b/browser/base/jar.mn index 6b1051af84d..21fdaa9cca8 100644 --- a/browser/base/jar.mn +++ b/browser/base/jar.mn @@ -6,6 +6,9 @@ browser.jar: % overlay chrome://global/content/console.xul chrome://browser/content/jsConsoleOverlay.xul % overlay chrome://mozapps/content/update/updates.xul chrome://browser/content/softwareUpdateOverlay.xul #endif +#ifdef XP_WIN +% overlay chrome://browser/content/browser.xul chrome://browser/content/win6BrowserOverlay.xul os=WINNT osversion>=6 +#endif % overlay chrome://global/content/viewSource.xul chrome://browser/content/viewSourceOverlay.xul % overlay chrome://global/content/viewPartialSource.xul chrome://browser/content/viewSourceOverlay.xul % style chrome://global/content/customizeToolbar.xul chrome://browser/content/browser.css @@ -59,6 +62,9 @@ browser.jar: * content/browser/softwareUpdateOverlay.xul (content/softwareUpdateOverlay.xul) #endif * content/browser/viewSourceOverlay.xul (content/viewSourceOverlay.xul) +#ifdef XP_WIN +* content/browser/win6BrowserOverlay.xul (content/win6BrowserOverlay.xul) +#endif # the following files are browser-specific overrides * content/browser/license.html (/toolkit/content/license.html) % override chrome://global/content/license.html chrome://browser/content/license.html