Bug 1442829: Remove macBrowserOverlay.xul. r?gijs draft
authorBrendan Dahl <brendan.dahl@gmail.com>
Mon, 19 Mar 2018 08:57:12 -0700
changeset 769433 81483ec8862df6b4c492a18c4f5be4d337f79a0d
parent 769320 4f1014eb5039bdfdd7a39fb7785d102df1994a6f
push id103124
push userbmo:bdahl@mozilla.com
push dateMon, 19 Mar 2018 16:09:03 +0000
reviewersgijs
bugs1442829
milestone61.0a1
Bug 1442829: Remove macBrowserOverlay.xul. r?gijs Move all of the overlay pieces into an include file except for the DTD's that could not be put there. Inline the DTD's into the files where they were used. Update comments in macWindow.inc.xul and browser.xul to more accurately reflect the current state. MozReview-Commit-ID: HZIeSf29Yl
browser/base/content/aboutDialog.xul
browser/base/content/browser-doctype.inc
browser/base/content/browser.js
browser/base/content/browser.xul
browser/base/content/browserMountPoints.inc
browser/base/content/hiddenWindow.xul
browser/base/content/macBrowserOverlay.xul
browser/base/content/macWindow.inc.xul
browser/base/content/moz.build
browser/base/content/pageinfo/pageInfo.xul
browser/base/jar.mn
browser/components/places/content/places.xul
browser/components/shell/content/setDesktopBackground.xul
toolkit/mozapps/update/content/updates.xul
--- a/browser/base/content/aboutDialog.xul
+++ b/browser/base/content/aboutDialog.xul
@@ -9,42 +9,39 @@
 <?xml-stylesheet href="chrome://branding/content/aboutDialog.css" type="text/css"?>
 
 <!DOCTYPE window [
 <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
 %brandDTD;
 <!ENTITY % aboutDialogDTD SYSTEM "chrome://browser/locale/aboutDialog.dtd" >
 %aboutDialogDTD;
 #ifdef XP_MACOSX
-<!ENTITY % baseMenuOverlayDTD SYSTEM "chrome://browser/locale/baseMenuOverlay.dtd">
-%baseMenuOverlayDTD;
+#include browser-doctype.inc
 #endif
 ]>
 
-#ifdef XP_MACOSX
-<?xul-overlay href="chrome://browser/content/macBrowserOverlay.xul"?>
-#endif
-
 <window xmlns:html="http://www.w3.org/1999/xhtml"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         id="aboutDialog"
         windowtype="Browser:About"
         onload="init(event);"
 #ifdef MOZ_UPDATER
         onunload="onUnload(event);"
 #endif
 #ifdef XP_MACOSX
         inwindowmenu="false"
 #else
         title="&aboutDialog.title;"
 #endif
         role="dialog"
         aria-describedby="version distribution distributionId communityDesc contributeDesc trademark"
         >
-
+#ifdef XP_MACOSX
+#include macWindow.inc.xul
+#endif
   <script type="application/javascript" src="chrome://browser/content/aboutDialog.js"/>
 #ifdef MOZ_UPDATER
   <script type="application/javascript" src="chrome://browser/content/aboutDialog-appUpdater.js"/>
 #endif
   <vbox id="aboutDialogContainer">
     <hbox id="clientBox">
       <vbox id="leftBox" flex="1"/>
       <vbox id="rightBox" flex="1">
@@ -145,12 +142,9 @@
       <description id="trademark">&trademarkInfo.part1;</description>
     </vbox>
   </vbox>
 
   <keyset>
     <key keycode="VK_ESCAPE" oncommand="window.close();"/>
   </keyset>
 
-#ifdef XP_MACOSX
-#include browserMountPoints.inc
-#endif
 </window>
--- a/browser/base/content/browser-doctype.inc
+++ b/browser/base/content/browser-doctype.inc
@@ -1,9 +1,8 @@
-<!DOCTYPE window [
 <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
 %brandDTD;
 <!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd" >
 %browserDTD;
 <!ENTITY % baseMenuDTD SYSTEM "chrome://browser/locale/baseMenuOverlay.dtd" >
 %baseMenuDTD;
 <!ENTITY % charsetDTD SYSTEM "chrome://global/locale/charsetMenu.dtd" >
 %charsetDTD;
@@ -18,10 +17,8 @@
 <!ENTITY % aboutHomeDTD SYSTEM "chrome://browser/locale/aboutHome.dtd">
 %aboutHomeDTD;
 <!ENTITY % syncBrandDTD SYSTEM "chrome://browser/locale/syncBrand.dtd">
 %syncBrandDTD;
 <!ENTITY % reportphishDTD SYSTEM "chrome://browser/locale/safebrowsing/report-phishing.dtd">
 %reportphishDTD;
 <!ENTITY % editBookmarkOverlayDTD SYSTEM "chrome://browser/locale/places/editBookmarkOverlay.dtd">
 %editBookmarkOverlayDTD;
-]>
-
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -1969,17 +1969,17 @@ var gBrowserInit = {
           .XULBrowserWindow = null;
     window.QueryInterface(Ci.nsIDOMChromeWindow).browserDOMWindow = null;
   },
 };
 
 if (AppConstants.platform == "macosx") {
   // nonBrowserWindowStartup(), nonBrowserWindowDelayedStartup(), and
   // nonBrowserWindowShutdown() are used for non-browser windows in
-  // macBrowserOverlay
+  // macWindow.inc.xul
   gBrowserInit.nonBrowserWindowStartup = function() {
     // Disable inappropriate commands / submenus
     var disabledItems = ["Browser:SavePage",
                          "Browser:SendLink", "cmd_pageSetup", "cmd_print", "cmd_find", "cmd_findAgain",
                          "viewToolbarsMenu", "viewSidebarMenuMenu", "Browser:Reload",
                          "viewFullZoomMenu", "pageStyleMenu", "charsetMenu", "View:PageSource", "View:FullScreen",
                          "viewHistorySidebar", "Browser:AddBookmarkAs", "Browser:BookmarkAllTabs",
                          "View:PageInfo"];
--- a/browser/base/content/browser.xul
+++ b/browser/base/content/browser.xul
@@ -15,17 +15,19 @@
 <?xml-stylesheet href="chrome://browser/skin/downloads/downloads.css"?>
 <?xml-stylesheet href="chrome://browser/skin/places/places.css"?>
 <?xml-stylesheet href="chrome://browser/skin/places/editBookmark.css"?>
 <?xml-stylesheet href="chrome://browser/skin/" type="text/css"?>
 <?xml-stylesheet href="chrome://browser/content/tabbrowser.css" type="text/css"?>
 
 # All DTD information is stored in a separate file so that it can be shared by
 # hiddenWindow.xul.
+<!DOCTYPE window [
 #include browser-doctype.inc
+]>
 
 <window id="main-window"
         xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns:svg="http://www.w3.org/2000/svg"
         xmlns:html="http://www.w3.org/1999/xhtml"
         xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         onload="gBrowserInit.onLoad()" onunload="gBrowserInit.onUnload()" onclose="return WindowIsClosing();"
@@ -55,19 +57,19 @@
         windowtype="navigator:browser"
         macanimationtype="document"
         screenX="4" screenY="4"
         fullscreenbutton="true"
         sizemode="normal"
         retargetdocumentfocus="urlbar"
         persist="screenX screenY width height sizemode">
 
-# All JS files which are not content (only) dependent that browser.xul
-# wishes to include *must* go into the global-scripts.inc file
-# so that they can be shared by macBrowserOverlay.xul.
+# All JS files which are needed by browser.xul and other top level windows to
+# support MacOS specific features *must* go into the global-scripts.inc file so
+# that they can be shared with macWindow.inc.xul.
 #include global-scripts.inc
 
 <script type="application/javascript">
   Services.scriptloader.loadSubScript("chrome://global/content/contentAreaUtils.js", this);
   Services.scriptloader.loadSubScript("chrome://browser/content/tabbrowser.js", this);
 
   ChromeUtils.defineModuleGetter(window,
     "PlacesUtils", "resource://gre/modules/PlacesUtils.jsm");
@@ -79,18 +81,19 @@
   ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
   XPCOMUtils.defineLazyScriptGetter(window, "PlacesTreeView",
     "chrome://browser/content/places/treeView.js");
   XPCOMUtils.defineLazyScriptGetter(window,
     ["PlacesInsertionPoint", "PlacesController", "PlacesControllerDragHelper"],
      "chrome://browser/content/places/controller.js");
 </script>
 
-# All sets except for popupsets (commands, keys, stringbundles and broadcasters) *must* go into the
-# browser-sets.inc file for sharing with hiddenWindow.xul.
+# All sets except for popupsets (commands, keys, stringbundles and broadcasters)
+# *must* go into the browser-sets.inc file so that they can be shared with other
+# top level windows in macWindow.inc.xul.
 #define FULL_BROWSER_WINDOW
 #include browser-sets.inc
 #undef FULL_BROWSER_WINDOW
 
   <popupset id="mainPopupSet">
     <menupopup id="tabContextMenu"
                onpopupshowing="if (event.target == this) TabContextMenu.updateContextMenu(this);"
                onpopuphidden="if (event.target == this) TabContextMenu.contextTab = null;">
@@ -626,18 +629,18 @@
              mode="icons"
 #ifdef MENUBAR_CAN_AUTOHIDE
              toolbarname="&menubarCmd.label;"
              accesskey="&menubarCmd.accesskey;"
              autohide="true"
 #endif
              context="toolbar-context-menu">
       <toolbaritem id="menubar-items" align="center">
-# The entire main menubar is placed into browser-menubar.inc, so that it can be shared by
-# hiddenWindow.xul.
+# The entire main menubar is placed into browser-menubar.inc, so that it can be
+# shared with other top level windows in macWindow.inc.xul.
 #include browser-menubar.inc
       </toolbaritem>
 
 #ifdef CAN_DRAW_IN_TITLEBAR
 #ifndef XP_MACOSX
       <hbox class="titlebar-placeholder" type="caption-buttons" ordinal="1000"
             skipintoolbarset="true"/>
 #endif
deleted file mode 100644
--- a/browser/base/content/browserMountPoints.inc
+++ /dev/null
@@ -1,8 +0,0 @@
-<commandset id="mainCommandSet"/>
-<commandset id="placesCommands"/>
-
-<broadcasterset id="mainBroadcasterSet"/>
-
-<keyset id="mainKeyset"/>
-
-<menubar id="main-menubar"/>
\ No newline at end of file
--- a/browser/base/content/hiddenWindow.xul
+++ b/browser/base/content/hiddenWindow.xul
@@ -1,25 +1,23 @@
 <?xml version="1.0"?>
 # -*- Mode: HTML -*-
 #
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 #ifdef XP_MACOSX
-<?xul-overlay href="chrome://browser/content/macBrowserOverlay.xul"?>
 <?xml-stylesheet href="chrome://browser/skin/webRTC-indicator.css" type="text/css"?>
 
 <!DOCTYPE window [
-<!ENTITY % baseMenuOverlayDTD SYSTEM "chrome://browser/locale/baseMenuOverlay.dtd">
-%baseMenuOverlayDTD;
+#include browser-doctype.inc
 ]>
 
 <window id="main-window"
         xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
-#include browserMountPoints.inc
+#include macWindow.inc.xul
 
 </window>
 
 #endif
rename from browser/base/content/macBrowserOverlay.xul
rename to browser/base/content/macWindow.inc.xul
--- a/browser/base/content/macBrowserOverlay.xul
+++ b/browser/base/content/macWindow.inc.xul
@@ -1,31 +1,25 @@
-<?xml version="1.0"?>
 # -*- Mode: HTML -*-
 #
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 #define MAC_NON_BROWSER_WINDOW
 
-<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-<?xml-stylesheet href="chrome://browser/content/places/places.css" type="text/css"?>
-
-# All DTD information is stored in a separate file so that it can be shared by
-# hiddenWindow.xul.
-#include browser-doctype.inc
+# This include file should only contain things that are needed to support MacOS
+# specific features that are needed for all top level windows. If the feature is
+# also needed in browser.xul, it should go in one of the various include files
+# below that are shared with browser.xul. When including this file,
+# browser-doctype.inc must also be included.
 
-<overlay id="hidden-overlay"
-        xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
-# All JS files which are not content (only) dependent that browser.xul
-# wishes to include *must* go into the global-scripts.inc file
-# so that they can be shared by this overlay.
+# All JS files which are needed by browser.xul and other top level windows to
+# support MacOS specific features *must* go into the global-scripts.inc file so
+# that they can be shared with browser.xul.
 #include global-scripts.inc
 
 <script type="application/javascript">
   function OpenBrowserWindowFromDockMenu(options) {
     let win = OpenBrowserWindow(options);
     win.addEventListener("load", function listener() {
       win.removeEventListener("load", listener);
       let dockSupport = Cc["@mozilla.org/widget/macdocksupport;1"]
@@ -49,29 +43,28 @@
   ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
   XPCOMUtils.defineLazyScriptGetter(window, "PlacesTreeView",
     "chrome://browser/content/places/treeView.js");
   XPCOMUtils.defineLazyScriptGetter(window,
     ["PlacesInsertionPoint", "PlacesController", "PlacesControllerDragHelper"],
      "chrome://browser/content/places/controller.js");
 </script>
 
-# All sets except for popupsets (commands, keys, stringbundles and broadcasters) *must* go into the 
-# browser-sets.inc file for sharing with hiddenWindow.xul.
+# All sets except for popupsets (commands, keys, stringbundles and broadcasters)
+# *must* go into the browser-sets.inc file so that they can be shared with
+# browser.xul
 #include browser-sets.inc
 
-# The entire main menubar is placed into browser-menubar.inc, so that it can be shared by 
-# hiddenWindow.xul.
+# The entire main menubar is placed into browser-menubar.inc, so that it can be
+# shared with browser.xul.
 #include browser-menubar.inc
 
 <!-- Dock menu -->
 <popupset>
   <menupopup id="menu_mac_dockmenu">
     <!-- The command cannot be cmd_newNavigator because we need to activate
          the application. -->
     <menuitem label="&newNavigatorCmd.label;" oncommand="OpenBrowserWindowFromDockMenu();"
               id="macDockMenuNewWindow" />
     <menuitem label="&newPrivateWindow.label;" oncommand="OpenBrowserWindowFromDockMenu({private: true});"
               id="macDockMenuNewPrivateWindow" />
   </menupopup>
 </popupset>
-
-</overlay>
--- a/browser/base/content/moz.build
+++ b/browser/base/content/moz.build
@@ -147,17 +147,17 @@ with Files("contentSearch*"):
     BUG_COMPONENT = ("Firefox", "Search")
 
 with Files("*.svg"):
     BUG_COMPONENT = ("Firefox", "Theme")
 
 with Files("hiddenWindow.xul"):
     BUG_COMPONENT = ("Firefox", "Device Permissions")
 
-with Files("macBrowserOverlay.xul"):
+with Files("macWindow.inc.xul"):
     BUG_COMPONENT = ("Firefox", "Shell Integration")
 
 with Files("tabbrowser*"):
     BUG_COMPONENT = ("Firefox", "Tabbed Browser")
 
 with Files("webext-panels*"):
     BUG_COMPONENT = ("Toolkit", "WebExtensions: Frontend")
 
--- a/browser/base/content/pageinfo/pageInfo.xul
+++ b/browser/base/content/pageinfo/pageInfo.xul
@@ -5,35 +5,34 @@
 
 <?xml-stylesheet href="chrome://browser/content/pageinfo/pageInfo.css" type="text/css"?>
 <?xml-stylesheet href="chrome://browser/skin/pageInfo.css" type="text/css"?>
 
 <!DOCTYPE window [
   <!ENTITY % pageInfoDTD SYSTEM "chrome://browser/locale/pageInfo.dtd">
   %pageInfoDTD;
 #ifdef XP_MACOSX
-  <!ENTITY % baseMenuOverlayDTD SYSTEM "chrome://browser/locale/baseMenuOverlay.dtd">
-  %baseMenuOverlayDTD;
+#include ../browser-doctype.inc
 #endif
 ]>
 
-#ifdef XP_MACOSX
-<?xul-overlay href="chrome://browser/content/macBrowserOverlay.xul"?>
-#endif
-
 <window id="main-window"
   xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
   windowtype="Browser:page-info"
   onload="onLoadPageInfo()"
   onunload="onUnloadPageInfo()"
   align="stretch"
   screenX="10" screenY="10"
   width="&pageInfoWindow.width;" height="&pageInfoWindow.height;"
   persist="screenX screenY width height sizemode">
 
+#ifdef XP_MACOSX
+#include ../macWindow.inc.xul
+#endif
+
   <script type="application/javascript" src="chrome://global/content/globalOverlay.js"/>
   <script type="application/javascript" src="chrome://global/content/contentAreaUtils.js"/>
   <script type="application/javascript" src="chrome://global/content/treeUtils.js"/>
   <script type="application/javascript" src="chrome://browser/content/pageinfo/pageInfo.js"/>
   <script type="application/javascript" src="chrome://browser/content/pageinfo/feeds.js"/>
   <script type="application/javascript" src="chrome://browser/content/pageinfo/permissions.js"/>
   <script type="application/javascript" src="chrome://browser/content/pageinfo/security.js"/>
   <script type="application/javascript" src="chrome://browser/content/utilityOverlay.js"/>
@@ -411,13 +410,9 @@
       </groupbox>
       <hbox pack="end">
         <button command="cmd_help" label="&helpButton.label;" dlgtype="help"/>
       </hbox>
     </vbox>
     <!-- Others added by overlay -->
   </deck>
 
-#ifdef XP_MACOSX
-#include ../browserMountPoints.inc
-#endif
-
 </window>
--- a/browser/base/jar.mn
+++ b/browser/base/jar.mn
@@ -119,19 +119,16 @@ browser.jar:
         content/browser/utilityOverlay.js             (content/utilityOverlay.js)
         content/browser/web-panels.js                 (content/web-panels.js)
 *       content/browser/web-panels.xul                (content/web-panels.xul)
         content/browser/webext-panels.js              (content/webext-panels.js)
 *       content/browser/webext-panels.xul             (content/webext-panels.xul)
         content/browser/nsContextMenu.js              (content/nsContextMenu.js)
 # XXX: We should exclude this one as well (bug 71895)
 *       content/browser/hiddenWindow.xul              (content/hiddenWindow.xul)
-#ifdef XP_MACOSX
-*       content/browser/macBrowserOverlay.xul         (content/macBrowserOverlay.xul)
-#endif
 #ifndef XP_MACOSX
 *       content/browser/webrtcIndicator.xul           (content/webrtcIndicator.xul)
         content/browser/webrtcIndicator.js            (content/webrtcIndicator.js)
 #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
         content/browser/blockedSite.xhtml               (content/blockedSite.xhtml)
--- a/browser/components/places/content/places.xul
+++ b/browser/components/places/content/places.xul
@@ -7,35 +7,31 @@
 <?xml-stylesheet href="chrome://browser/content/places/places.css"?>
 <?xml-stylesheet href="chrome://browser/content/places/organizer.css"?>
 
 <?xml-stylesheet href="chrome://global/skin/"?>
 <?xml-stylesheet href="chrome://browser/skin/places/places.css"?>
 <?xml-stylesheet href="chrome://browser/skin/places/organizer.css"?>
 <?xml-stylesheet href="chrome://browser/skin/places/editBookmark.css"?>
 
-#ifdef XP_MACOSX
-<?xul-overlay href="chrome://browser/content/macBrowserOverlay.xul"?>
-#endif
 <?xul-overlay href="chrome://browser/content/downloads/allDownloadsViewOverlay.xul"?>
 
 <!DOCTYPE window [
 <!ENTITY % placesDTD SYSTEM "chrome://browser/locale/places/places.dtd">
 %placesDTD;
 <!ENTITY % downloadsDTD SYSTEM "chrome://browser/locale/downloads/downloads.dtd">
 %downloadsDTD;
 <!ENTITY % editMenuOverlayDTD SYSTEM "chrome://global/locale/editMenuOverlay.dtd">
 %editMenuOverlayDTD;
 <!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd">
 %browserDTD;
 <!ENTITY % editBookmarkOverlayDTD SYSTEM "chrome://browser/locale/places/editBookmarkOverlay.dtd">
 %editBookmarkOverlayDTD;
 #ifdef XP_MACOSX
-<!ENTITY % baseMenuOverlayDTD SYSTEM "chrome://browser/locale/baseMenuOverlay.dtd">
-%baseMenuOverlayDTD;
+#include ../../../base/content/browser-doctype.inc
 #endif
 ]>
 
 <window id="places"
         title="&places.library.title;"
         windowtype="Places:Organizer"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         xmlns:html="http://www.w3.org/1999/xhtml"
@@ -44,23 +40,25 @@
         width="&places.library.width;" height="&places.library.height;"
         screenX="10" screenY="10"
         toggletoolbar="true"
         persist="width height screenX screenY sizemode">
 
   <script type="application/javascript"
           src="chrome://browser/content/places/places.js"/>
 #ifndef XP_MACOSX
-  <!-- On Mac, these are included via macBrowserOverlay.xul -> browser.js -> defineLazyScriptGetter -->
+  <!-- On Mac, this is included via macWindow.inc.xul -> global-scripts.inc -> browser.js -> defineLazyScriptGetter -->
   <script type="application/javascript"
           src="chrome://browser/content/places/editBookmark.js"/>
+  <!-- On Mac, thes are included via macWindow.inc.xul -> global-scripts.inc -->
   <script type="application/javascript"
           src="chrome://global/content/globalOverlay.js"/>
   <script type="application/javascript"
           src="chrome://browser/content/utilityOverlay.js"/>
+  <!-- On Mac, these are included via macWindow.inc.xul -->
   <script type="application/javascript"><![CDATA[
     ChromeUtils.defineModuleGetter(window,
       "PlacesUtils", "resource://gre/modules/PlacesUtils.jsm");
     ChromeUtils.defineModuleGetter(window,
       "PlacesUIUtils", "resource:///modules/PlacesUIUtils.jsm");
     ChromeUtils.defineModuleGetter(window,
       "PlacesTransactions", "resource://gre/modules/PlacesTransactions.jsm");
 
@@ -74,17 +72,17 @@
 #endif
 
   <stringbundleset id="placesStringSet">
     <stringbundle id="brandStrings" src="chrome://branding/locale/brand.properties"/>
   </stringbundleset>
 
 
 #ifdef XP_MACOSX
-#include ../../../base/content/browserMountPoints.inc
+#include ../../../base/content/macWindow.inc.xul
 #else
 #include ../../../../toolkit/content/editMenuCommands.inc.xul
 #include placesCommands.inc.xul
 #endif
 
   <commandset id="organizerCommandSet">
     <command id="OrganizerCommand_find:all"
              oncommand="PlacesSearchBox.findAll();"/>
--- a/browser/components/shell/content/setDesktopBackground.xul
+++ b/browser/components/shell/content/setDesktopBackground.xul
@@ -7,39 +7,38 @@
 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> 
 <?xml-stylesheet href="chrome://browser/skin/setDesktopBackground.css" type="text/css"?>
 
 
 <!DOCTYPE dialog [
 <!ENTITY % setDesktopBackgroundDTD SYSTEM "chrome://browser/locale/setDesktopBackground.dtd">
 %setDesktopBackgroundDTD;
 #ifdef XP_MACOSX
-<!ENTITY % baseMenuOverlayDTD SYSTEM "chrome://browser/locale/baseMenuOverlay.dtd">
-%baseMenuOverlayDTD;
+#include ../../../base/content/browser-doctype.inc
 #endif
 ]>
 
-#ifdef XP_MACOSX
-<?xul-overlay href="chrome://browser/content/macBrowserOverlay.xul"?>
-#endif
-
 <dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         xmlns:html="http://www.w3.org/1999/xhtml"
         windowtype="Shell:SetDesktopBackground"
 #ifndef XP_MACOSX
         buttons="accept,cancel"
 #else
         buttons="accept"
 #endif
         buttonlabelaccept="&setDesktopBackground.title;"
         onload="gSetBackground.load();"
         ondialogaccept="gSetBackground.setDesktopBackground();"
         title="&setDesktopBackground.title;"
         style="width: 30em;">
 
+#ifdef XP_MACOSX
+#include ../../../base/content/macWindow.inc.xul
+#endif
+
     <stringbundle id="backgroundBundle"
                   src="chrome://browser/locale/shellservice.properties"/>
     <script type="application/javascript" src="chrome://browser/content/utilityOverlay.js"/>
     <script type="application/javascript" src="chrome://browser/content/setDesktopBackground.js"/>
     <script type="application/javascript" src="chrome://global/content/contentAreaUtils.js"/>
 
 #ifndef XP_MACOSX
     <hbox align="center">
@@ -80,13 +79,9 @@
               oncommand="gSetBackground.setDesktopBackground();"/>
       <button id="showDesktopPreferences"
               label="&openDesktopPrefs.label;"
               oncommand="gSetBackground.showDesktopPrefs();"
               hidden="true"/>
     </hbox>
 #endif
 
-#ifdef XP_MACOSX
-#include ../../../base/content/browserMountPoints.inc
-#endif
-
 </dialog>
--- a/toolkit/mozapps/update/content/updates.xul
+++ b/toolkit/mozapps/update/content/updates.xul
@@ -8,38 +8,37 @@
 <?xml-stylesheet href="chrome://mozapps/content/update/updates.css"?>
 <?xml-stylesheet href="chrome://mozapps/skin/update/updates.css"?>
 
 <!DOCTYPE wizard [
 <!ENTITY % updateDTD SYSTEM "chrome://mozapps/locale/update/updates.dtd">
 <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
 %updateDTD;
 %brandDTD;
+#if defined(XP_MACOSX) && MOZ_BUILD_APP == browser
+#include ../../../../browser/base/content/browser-doctype.inc
+#endif
 ]>
 
-#if defined(XP_MACOSX) && MOZ_BUILD_APP == browser
-<?xul-overlay href="chrome://browser/content/macBrowserOverlay.xul"?>
-#endif
-
 <wizard id="updates"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         title="&updateWizard.title;"
         windowtype="Update:Wizard"
         style="width: auto; height: auto"
         onwizardfinish="gUpdates.onWizardFinish();"
         onwizardcancel="gUpdates.onWizardCancel();"
         onwizardnext="gUpdates.onWizardNext();"
         onload="gUpdates.onLoad();"
         onunload="gUpdates.onUnload();">
 
   <script type="application/javascript" src="chrome://global/content/contentAreaUtils.js"/>
   <script type="application/javascript" src="chrome://mozapps/content/update/updates.js"/>
 
 #if defined(XP_MACOSX) && MOZ_BUILD_APP == browser
-#include ../../../../browser/base/content/browserMountPoints.inc
+#include ../../../../browser/base/content/macWindow.inc.xul
 #endif
 
   <stringbundleset id="updateSet">
     <stringbundle id="brandStrings" src="chrome://branding/locale/brand.properties"/>
     <stringbundle id="updateStrings" src="chrome://mozapps/locale/update/updates.properties"/>
   </stringbundleset>
 
   <wizardpage id="dummy" pageid="dummy" firstpage="true"/>