Bug 1439766 - Replace editMenuOverlay.xul by inlining and preprocessing. r?gijs draft
authorBrendan Dahl <brendan.dahl@gmail.com>
Thu, 22 Feb 2018 15:48:24 -0800
changeset 760535 dd2cb444c8af6fae8eb8636d418c99d9b012f9fa
parent 759663 02aa9c921aedfd0e768a92a6a8c5cba1b14191c1
push id100692
push userbmo:bdahl@mozilla.com
push dateTue, 27 Feb 2018 21:58:11 +0000
reviewersgijs
bugs1439766
milestone60.0a1
Bug 1439766 - Replace editMenuOverlay.xul by inlining and preprocessing. r?gijs The overlay elements with children of editMenuOverlay.xul are moved into include files (editMenuCommands.inc.xul and editMenuKeys.inc.xul). For the other single elements in the overlay, the attributes are inlined wherever they are used. MozReview-Commit-ID: 792cuzUvQxT
browser/base/content/browser-sets.inc
browser/base/content/browser.xul
browser/base/content/macBrowserOverlay.xul
browser/base/content/web-panels.xul
browser/base/content/webext-panels.xul
browser/components/downloads/content/contentAreaDownloadsView.xul
browser/components/places/content/bookmarksPanel.xul
browser/components/places/content/history-panel.xul
browser/components/places/content/places.xul
browser/components/places/jar.mn
devtools/client/debugger/debugger.xul
devtools/client/framework/toolbox.xul
devtools/client/jar.mn
devtools/client/scratchpad/scratchpad.xul
devtools/client/storage/storage.xul
devtools/client/styleeditor/styleeditor.xul
devtools/client/webconsole/webconsole.xul
devtools/client/webide/content/jar.mn
devtools/client/webide/content/webide.xul
toolkit/content/editMenuCommands.inc.xul
toolkit/content/editMenuKeys.inc.xul
toolkit/content/editMenuOverlay.xul
toolkit/content/jar.mn
toolkit/content/tests/chrome/bug366992_window.xul
tools/lint/eslint/eslint-plugin-mozilla/lib/environments/browser-window.js
--- a/browser/base/content/browser-sets.inc
+++ b/browser/base/content/browser-sets.inc
@@ -32,18 +32,17 @@
     <command id="cmd_print" oncommand="PrintUtils.printWindow(window.gBrowser.selectedBrowser.outerWindowID, window.gBrowser.selectedBrowser);"/>
     <command id="cmd_printPreview" oncommand="PrintUtils.printPreview(PrintPreviewListener);"/>
     <command id="cmd_close" oncommand="BrowserCloseTabOrWindow(event);"/>
     <command id="cmd_closeWindow" oncommand="BrowserTryToCloseWindow()"/>
     <command id="cmd_toggleMute" oncommand="gBrowser.selectedTab.toggleMuteAudio()"/>
     <command id="cmd_CustomizeToolbars" oncommand="gCustomizeMode.enter()"/>
     <command id="cmd_quitApplication" oncommand="goQuitApplication()"/>
 
-
-    <commandset id="editMenuCommands"/>
+#include ../../../toolkit/content/editMenuCommands.inc.xul
 
     <command id="View:PageSource" oncommand="BrowserViewSource(window.gBrowser.selectedBrowser);" observes="canViewSource"/>
     <command id="View:PageInfo" oncommand="BrowserPageInfo();"/>
     <command id="View:FullScreen" oncommand="BrowserFullScreen();"/>
     <command id="View:ReaderView" oncommand="ReaderParent.toggleReaderMode(event);"/>
     <command id="cmd_find"
              oncommand="gFindBar.onFindCommand();"
              observes="isImage"/>
--- a/browser/base/content/browser.xul
+++ b/browser/base/content/browser.xul
@@ -10,17 +10,16 @@
 <?xml-stylesheet href="chrome://browser/content/downloads/downloads.css"?>
 <?xml-stylesheet href="chrome://browser/content/places/places.css" type="text/css"?>
 <?xml-stylesheet href="chrome://browser/content/usercontext/usercontext.css" type="text/css"?>
 <?xml-stylesheet href="chrome://browser/skin/controlcenter/panel.css" type="text/css"?>
 <?xml-stylesheet href="chrome://browser/skin/customizableui/panelUI.css" type="text/css"?>
 <?xml-stylesheet href="chrome://browser/skin/downloads/downloads.css"?>
 <?xml-stylesheet href="chrome://browser/skin/" type="text/css"?>
 
-<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
 <?xul-overlay href="chrome://browser/content/baseMenuOverlay.xul"?>
 <?xul-overlay href="chrome://browser/content/places/placesOverlay.xul"?>
 
 # All DTD information is stored in a separate file so that it can be shared by
 # hiddenWindow.xul.
 #include browser-doctype.inc
 
 <window id="main-window"
--- a/browser/base/content/macBrowserOverlay.xul
+++ b/browser/base/content/macBrowserOverlay.xul
@@ -5,17 +5,16 @@
 # 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"?>
 
-<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
 <?xul-overlay href="chrome://browser/content/baseMenuOverlay.xul"?>
 <?xul-overlay href="chrome://browser/content/places/placesOverlay.xul"?>
 
 # All DTD information is stored in a separate file so that it can be shared by
 # hiddenWindow.xul.
 #include browser-doctype.inc
 
 <overlay id="hidden-overlay"
--- a/browser/base/content/web-panels.xul
+++ b/browser/base/content/web-panels.xul
@@ -1,17 +1,16 @@
 <?xml version="1.0"?>
 
 # -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
 # 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/.
 
 <?xml-stylesheet href="chrome://browser/skin/" type="text/css"?> 
-<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
 <?xul-overlay href="chrome://browser/content/places/placesOverlay.xul"?>
 
 <!DOCTYPE page [
 <!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd">
 %browserDTD;
 <!ENTITY % textcontextDTD SYSTEM "chrome://global/locale/textcontext.dtd">
 %textcontextDTD;
 ]>
@@ -52,13 +51,13 @@
                onpopuphiding="if (event.target != this)
                                 return;
                               gContextMenu.hiding();
                               gContextMenu = null;">
 #include browser-context.inc
     </menupopup>
   </popupset>
 
-  <commandset id="editMenuCommands"/> 
+#include ../../../toolkit/content/editMenuCommands.inc.xul
   <browser id="web-panels-browser" persist="cachedurl" type="content" flex="1"
            context="contentAreaContextMenu" tooltip="aHTMLTooltip"
            onclick="window.parent.contentAreaClick(event, true);"/>
 </page>
--- a/browser/base/content/webext-panels.xul
+++ b/browser/base/content/webext-panels.xul
@@ -2,17 +2,16 @@
 
 # -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
 # 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/.
 
 <?xml-stylesheet href="chrome://browser/skin/" type="text/css"?>
 <?xml-stylesheet href="chrome://browser/content/usercontext/usercontext.css" type="text/css"?>
-<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
 <?xul-overlay href="chrome://browser/content/places/placesOverlay.xul"?>
 
 <!DOCTYPE page [
 <!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd">
 %browserDTD;
 <!ENTITY % textcontextDTD SYSTEM "chrome://global/locale/textcontext.dtd">
 %textcontextDTD;
 ]>
@@ -75,10 +74,10 @@
                  level="parent"
 #ifdef XP_WIN
                  consumeoutsideclicks="false" ignorekeys="shortcuts"
 #endif
         />
     </menulist>
   </popupset>
 
-  <commandset id="editMenuCommands"/>
+#include ../../../toolkit/content/editMenuCommands.inc.xul
 </page>
--- a/browser/components/downloads/content/contentAreaDownloadsView.xul
+++ b/browser/components/downloads/content/contentAreaDownloadsView.xul
@@ -5,40 +5,41 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 <?xml-stylesheet href="chrome://global/skin/"?>
 <?xml-stylesheet href="chrome://browser/content/downloads/contentAreaDownloadsView.css"?>
 <?xml-stylesheet href="chrome://browser/skin/downloads/contentAreaDownloadsView.css"?>
 
 <?xul-overlay href="chrome://browser/content/downloads/allDownloadsViewOverlay.xul"?>
 
-<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
-
 <!DOCTYPE window [
 <!ENTITY % downloadsDTD SYSTEM "chrome://browser/locale/downloads/downloads.dtd">
 %downloadsDTD;
+<!ENTITY % editMenuDTD SYSTEM "chrome://global/locale/editMenuOverlay.dtd">
+%editMenuDTD;
 ]>
 
 <window id="contentAreaDownloadsView"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         title="&downloads.title;"
         onload="ContentAreaDownloadsView.init();">
 
   <script type="application/javascript"
           src="chrome://global/content/globalOverlay.js"/>
   <script type="application/javascript"
           src="chrome://browser/content/downloads/contentAreaDownloadsView.js"/>
 
-  <commandset id="editMenuCommands"/>
+#include ../../../../toolkit/content/editMenuCommands.inc.xul
 
-  <keyset id="editMenuKeys">
+#include ../../../../toolkit/content/editMenuKeys.inc.xul
 #ifdef XP_MACOSX
+  <keyset id="editMenuKeysExtra">
     <key id="key_delete2" keycode="VK_BACK" command="cmd_delete"/>
+  </keyset>
 #endif
-  </keyset>
 
   <stack flex="1">
     <richlistbox id="downloadsRichListBox"/>
     <description id="downloadsListEmptyDescription"
                  value="&downloadsListEmpty.label;"
                  mousethrough="always"/>
   </stack>
   <commandset id="downloadCommands"/>
--- a/browser/components/places/content/bookmarksPanel.xul
+++ b/browser/components/places/content/bookmarksPanel.xul
@@ -1,34 +1,33 @@
 <?xml version="1.0"?> <!-- -*- Mode: SGML; indent-tabs-mode: nil; -*- -->
 <!-- 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/. -->
 
 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
 <?xml-stylesheet href="chrome://browser/content/places/places.css"?>
 <?xml-stylesheet href="chrome://browser/skin/places/places.css"?>
-<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
 <?xul-overlay href="chrome://browser/content/places/placesOverlay.xul"?>
 
 <!DOCTYPE page SYSTEM "chrome://browser/locale/places/places.dtd">
 
 <page id="bookmarksPanel"
       xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
       xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
       onload="init();"
       onunload="SidebarUtils.setMouseoverURL('');">
 
   <script type="application/javascript"
           src="chrome://browser/content/bookmarks/sidebarUtils.js"/>
   <script type="application/javascript"
           src="chrome://browser/content/bookmarks/bookmarksPanel.js"/>
 
   <commandset id="placesCommands"/>
-  <commandset id="editMenuCommands"/>
+#include ../../../../toolkit/content/editMenuCommands.inc.xul
   <menupopup id="placesContext"/>
 
   <!-- Bookmarks and history tooltip -->
   <tooltip id="bhTooltip"/>
 
   <hbox id="sidebar-search-container" align="center">
     <textbox id="search-box" flex="1" type="search"
              placeholder="&bookmarksSearch.placeholder;"
--- a/browser/components/places/content/history-panel.xul
+++ b/browser/components/places/content/history-panel.xul
@@ -3,45 +3,48 @@
 # 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/.
 
 <?xml-stylesheet href="chrome://browser/content/places/places.css"?>
 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
 <?xml-stylesheet href="chrome://browser/skin/places/places.css"?>
 
-<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
 <?xul-overlay href="chrome://browser/content/places/placesOverlay.xul"?>
 
 <!DOCTYPE page [
 <!ENTITY % placesDTD SYSTEM "chrome://browser/locale/places/places.dtd">
 %placesDTD;
+<!ENTITY % editMenuDTD SYSTEM "chrome://global/locale/editMenuOverlay.dtd">
+%editMenuDTD;
 ]>
 
 <!-- we need to keep id="history-panel" for upgrade and switching
      between versions of the browser -->
 
 <page id="history-panel" orient="vertical"
       xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
       onload="HistorySidebarInit();"
       onunload="SidebarUtils.setMouseoverURL('');">
 
   <script type="application/javascript"
           src="chrome://browser/content/bookmarks/sidebarUtils.js"/>
   <script type="application/javascript"
           src="chrome://browser/content/places/history-panel.js"/>
 
-  <commandset id="editMenuCommands"/>
+#include ../../../../toolkit/content/editMenuCommands.inc.xul
+
   <commandset id="placesCommands"/>
 
-  <keyset id="editMenuKeys">
+#include ../../../../toolkit/content/editMenuKeys.inc.xul
 #ifdef XP_MACOSX
+  <keyset id="editMenuKeysExtra">
     <key id="key_delete2" keycode="VK_BACK" command="cmd_delete"/>
+  </keyset>
 #endif
-  </keyset>
 
   <!-- required to overlay the context menu -->
   <menupopup id="placesContext"/>
 
   <!-- Bookmarks and history tooltip -->
   <tooltip id="bhTooltip"/>
 
   <hbox id="sidebar-search-container">
--- a/browser/components/places/content/places.xul
+++ b/browser/components/places/content/places.xul
@@ -12,17 +12,16 @@
 <?xml-stylesheet href="chrome://browser/skin/places/organizer.css"?>
 
 <?xul-overlay href="chrome://browser/content/places/editBookmarkOverlay.xul"?>
 
 #ifdef XP_MACOSX
 <?xul-overlay href="chrome://browser/content/macBrowserOverlay.xul"?>
 #else
 <?xul-overlay href="chrome://browser/content/baseMenuOverlay.xul"?>
-<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
 <?xul-overlay href="chrome://browser/content/places/placesOverlay.xul"?>
 #endif
 
 <!DOCTYPE window [
 <!ENTITY % placesDTD SYSTEM "chrome://browser/locale/places/places.dtd">
 %placesDTD;
 <!ENTITY % editMenuOverlayDTD SYSTEM "chrome://global/locale/editMenuOverlay.dtd">
 %editMenuOverlayDTD;
@@ -53,17 +52,17 @@
   <stringbundleset id="placesStringSet">
     <stringbundle id="brandStrings" src="chrome://branding/locale/brand.properties"/>
   </stringbundleset>
 
 
 #ifdef XP_MACOSX
 #include ../../../base/content/browserMountPoints.inc
 #else
-  <commandset id="editMenuCommands"/>
+#include ../../../../toolkit/content/editMenuCommands.inc.xul
   <commandset id="placesCommands"/>
 #endif
 
   <commandset id="organizerCommandSet">
     <command id="OrganizerCommand_find:all"
              oncommand="PlacesSearchBox.findAll();"/>
     <command id="OrganizerCommand_export"
              oncommand="PlacesOrganizer.exportBookmarks();"/>
@@ -124,21 +123,22 @@
          modifiers="accel"/>
     <key id="placesKey_goForwardKb2"
          key="&goForwardCmd.commandKey;"
          command="OrganizerCommand:Forward"
          modifiers="accel"/>
 #endif
   </keyset>
 
-  <keyset id="editMenuKeys">
+#include ../../../../toolkit/content/editMenuKeys.inc.xul
 #ifdef XP_MACOSX
+  <keyset id="editMenuKeysExtra">
     <key id="key_delete2" keycode="VK_BACK" command="cmd_delete"/>
+  </keyset>
 #endif
-  </keyset>
 
   <popupset id="placesPopupset">
     <menupopup id="placesContext"/>
     <menupopup id="placesColumnsContext"
                onpopupshowing="ViewMenu.fillWithColumns(event, null, null, 'checkbox', null);"
                oncommand="ViewMenu.showHideColumn(event.target); event.stopPropagation();"/>
   </popupset>
 
--- a/browser/components/places/jar.mn
+++ b/browser/components/places/jar.mn
@@ -19,14 +19,14 @@ browser.jar:
     content/browser/places/controller.js                 (content/controller.js)
     content/browser/places/treeView.js                   (content/treeView.js)
     content/browser/places/browserPlacesViews.js         (content/browserPlacesViews.js)
 # keep the Places version of the history sidebar at history/history-panel.xul
 # to prevent having to worry about between versions of the browser
 *   content/browser/history/history-panel.xul            (content/history-panel.xul)
     content/browser/places/history-panel.js              (content/history-panel.js)
 # ditto for the bookmarks sidebar
-    content/browser/bookmarks/bookmarksPanel.xul         (content/bookmarksPanel.xul)
+*   content/browser/bookmarks/bookmarksPanel.xul         (content/bookmarksPanel.xul)
     content/browser/bookmarks/bookmarksPanel.js          (content/bookmarksPanel.js)
     content/browser/bookmarks/sidebarUtils.js            (content/sidebarUtils.js)
     content/browser/places/editBookmarkOverlay.xul       (content/editBookmarkOverlay.xul)
     content/browser/places/editBookmarkOverlay.js        (content/editBookmarkOverlay.js)
 *   content/browser/places/downloadsViewOverlay.xul      (content/downloadsViewOverlay.xul)
--- a/devtools/client/debugger/debugger.xul
+++ b/devtools/client/debugger/debugger.xul
@@ -5,18 +5,19 @@
 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
 <?xml-stylesheet href="chrome://devtools/content/shared/widgets/widgets.css" type="text/css"?>
 <?xml-stylesheet href="chrome://devtools/content/debugger/debugger.css" type="text/css"?>
 <?xml-stylesheet href="chrome://devtools/skin/widgets.css" type="text/css"?>
 <?xml-stylesheet href="chrome://devtools/skin/debugger.css" type="text/css"?>
 <!DOCTYPE window [
   <!ENTITY % debuggerDTD SYSTEM "chrome://devtools/locale/debugger.dtd">
   %debuggerDTD;
+  <!ENTITY % editMenuDTD SYSTEM "chrome://global/locale/editMenuOverlay.dtd">
+  %editMenuDTD;
 ]>
-<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
 
 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         xmlns:html="http://www.w3.org/1999/xhtml"
         macanimationtype="document"
         fullscreenbutton="true"
         screenX="4" screenY="4"
         width="960" height="480"
         persist="screenX screenY width height sizemode">
@@ -32,17 +33,17 @@
   <script type="text/javascript" src="views/watch-expressions-view.js"/>
   <script type="text/javascript" src="views/global-search-view.js"/>
   <script type="text/javascript" src="views/toolbar-view.js"/>
   <script type="text/javascript" src="views/options-view.js"/>
   <script type="text/javascript" src="views/stack-frames-view.js"/>
   <script type="text/javascript" src="views/stack-frames-classic-view.js"/>
   <script type="text/javascript" src="views/filter-view.js"/>
 
-  <commandset id="editMenuCommands"/>
+#include ../../../toolkit/content/editMenuCommands.inc.xul
 
   <commandset id="debuggerCommands"></commandset>
 
   <popupset id="debuggerPopupset">
     <menupopup id="sourceEditorContextMenu"
                onpopupshowing="goUpdateGlobalEditMenuItems()">
       <menuitem id="se-dbg-cMenu-addBreakpoint"
                 label="&debuggerUI.seMenuBreak;"
@@ -56,19 +57,21 @@
                 label="&debuggerUI.seEditMenuCondBreak;"
                 key="addConditionalBreakpointKey"
                 command="addConditionalBreakpointCommand"/>
       <menuitem id="se-dbg-cMenu-addAsWatch"
                 label="&debuggerUI.seMenuAddWatch;"
                 key="addWatchExpressionKey"
                 command="addWatchExpressionCommand"/>
       <menuseparator/>
-      <menuitem id="cMenu_copy"/>
+      <menuitem id="cMenu_copy" label="&copyCmd.label;"
+                accesskey="&copyCmd.accesskey;" command="cmd_copy"/>
       <menuseparator/>
-      <menuitem id="cMenu_selectAll"/>
+      <menuitem id="cMenu_selectAll" label="&selectAllCmd.label;"
+                accesskey="&selectAllCmd.accesskey;" command="cmd_selectAll"/>
       <menuseparator/>
       <menuitem id="se-dbg-cMenu-findFile"
                 label="&debuggerUI.searchFile;"
                 accesskey="&debuggerUI.searchFile.accesskey;"
                 key="fileSearchKey"
                 command="fileSearchCommand"/>
       <menuitem id="se-dbg-cMenu-findGlobal"
                 label="&debuggerUI.searchGlobal;"
--- a/devtools/client/framework/toolbox.xul
+++ b/devtools/client/framework/toolbox.xul
@@ -1,18 +1,16 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- 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/. -->
 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
 <?xml-stylesheet href="chrome://devtools/skin/toolbox.css" type="text/css"?>
 <?xml-stylesheet href="resource://devtools/client/shared/components/NotificationBox.css" type="text/css"?>
 
-<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
-
 <!DOCTYPE window [
 <!ENTITY % toolboxDTD SYSTEM "chrome://devtools/locale/toolbox.dtd" >
 %toolboxDTD;
 <!ENTITY % editMenuStrings SYSTEM "chrome://global/locale/editMenuOverlay.dtd">
 %editMenuStrings;
 <!ENTITY % globalKeysDTD SYSTEM "chrome://global/locale/globalKeys.dtd">
 %globalKeysDTD;
 ]>
@@ -24,29 +22,35 @@
           src="chrome://devtools/content/shared/theme-switching.js"/>
   <script type="application/javascript"
           src="chrome://global/content/viewSourceUtils.js"/>
 
   <script type="application/javascript" src="chrome://global/content/globalOverlay.js"/>
   <script type="application/javascript"
           src="chrome://devtools/content/framework/toolbox-init.js"/>
 
-  <commandset id="editMenuCommands"/>
-  <keyset id="editMenuKeys"/>
+#include ../../../toolkit/content/editMenuCommands.inc.xul
+#include ../../../toolkit/content/editMenuKeys.inc.xul
 
   <popupset>
     <menupopup id="toolbox-textbox-context-popup">
-      <menuitem id="cMenu_undo"/>
+      <menuitem id="cMenu_undo" label="&undoCmd.label;"
+                accesskey="&undoCmd.accesskey;" command="cmd_undo"/>
       <menuseparator/>
-      <menuitem id="cMenu_cut"/>
-      <menuitem id="cMenu_copy"/>
-      <menuitem id="cMenu_paste"/>
-      <menuitem id="cMenu_delete"/>
+      <menuitem id="cMenu_cut" label="&cutCmd.label;"
+                accesskey="&cutCmd.accesskey;" command="cmd_cut"/>
+      <menuitem id="cMenu_copy" label="&copyCmd.label;"
+                accesskey="&copyCmd.accesskey;" command="cmd_copy"/>
+      <menuitem id="cMenu_paste" label="&pasteCmd.label;"
+                accesskey="&pasteCmd.accesskey;" command="cmd_paste"/>
+      <menuitem id="cMenu_delete" label="&deleteCmd.label;"
+                accesskey="&deleteCmd.accesskey;" command="cmd_delete"/>
       <menuseparator/>
-      <menuitem id="cMenu_selectAll"/>
+      <menuitem id="cMenu_selectAll" label="&selectAllCmd.label;"
+                accesskey="&selectAllCmd.accesskey;" command="cmd_selectAll"/>
     </menupopup>
   </popupset>
 
   <vbox id="toolbox-container" flex="1">
     <div xmlns="http://www.w3.org/1999/xhtml" id="toolbox-notificationbox"/>
     <div xmlns="http://www.w3.org/1999/xhtml" id="toolbox-toolbar-mount" />
     <vbox flex="1" class="theme-body">
       <!-- Set large flex to allow the toolbox-panel-webconsole to have a
--- a/devtools/client/jar.mn
+++ b/devtools/client/jar.mn
@@ -5,39 +5,39 @@
 devtools.jar:
 %   content devtools %content/
     content/shared/vendor/d3.js (shared/vendor/d3.js)
     content/shared/vendor/dagre-d3.js (shared/vendor/dagre-d3.js)
     content/shared/widgets/widgets.css (shared/widgets/widgets.css)
     content/shared/widgets/VariablesView.xul (shared/widgets/VariablesView.xul)
     content/webconsole/webconsole.html (webconsole/webconsole.html)
     content/webconsole/browserconsole.xul (webconsole/browserconsole.xul)
-    content/webconsole/webconsole.xul (webconsole/webconsole.xul)
-    content/scratchpad/scratchpad.xul (scratchpad/scratchpad.xul)
+*   content/webconsole/webconsole.xul (webconsole/webconsole.xul)
+*   content/scratchpad/scratchpad.xul (scratchpad/scratchpad.xul)
     content/scratchpad/scratchpad.js (scratchpad/scratchpad.js)
     content/shared/splitview.css (shared/splitview.css)
     content/shared/theme-switching.js (shared/theme-switching.js)
     content/shared/frame-script-utils.js (shared/frame-script-utils.js)
-    content/styleeditor/styleeditor.xul (styleeditor/styleeditor.xul)
-    content/storage/storage.xul (storage/storage.xul)
+*   content/styleeditor/styleeditor.xul (styleeditor/styleeditor.xul)
+*   content/storage/storage.xul (storage/storage.xul)
     content/inspector/inspector.js (inspector/inspector.js)
     content/inspector/markup/markup.xhtml (inspector/markup/markup.xhtml)
     content/animationinspector/animation-controller.js (animationinspector/animation-controller.js)
     content/animationinspector/animation-panel.js (animationinspector/animation-panel.js)
     content/animationinspector/animation-inspector.xhtml (animationinspector/animation-inspector.xhtml)
     content/sourceeditor/codemirror/addon/dialog/dialog.css (sourceeditor/codemirror/addon/dialog/dialog.css)
     content/sourceeditor/codemirror/addon/hint/show-hint.js (sourceeditor/codemirror/addon/hint/show-hint.js)
     content/sourceeditor/codemirror/addon/tern/tern.js (sourceeditor/codemirror/addon/tern/tern.js)
     content/sourceeditor/codemirror/codemirror.bundle.js (sourceeditor/codemirror/codemirror.bundle.js)
     content/sourceeditor/codemirror/lib/codemirror.css (sourceeditor/codemirror/lib/codemirror.css)
     content/sourceeditor/codemirror/mozilla.css (sourceeditor/codemirror/mozilla.css)
     content/sourceeditor/codemirror/cmiframe.html (sourceeditor/codemirror/cmiframe.html)
     content/sourceeditor/codemirror/old-debugger.css (sourceeditor/codemirror/old-debugger.css)
     content/debugger/new/index.html (debugger/new/index.html)
-    content/debugger/debugger.xul (debugger/debugger.xul)
+*   content/debugger/debugger.xul (debugger/debugger.xul)
     content/debugger/debugger.css (debugger/debugger.css)
     content/debugger/debugger-controller.js (debugger/debugger-controller.js)
     content/debugger/debugger-view.js (debugger/debugger-view.js)
     content/debugger/views/workers-view.js (debugger/views/workers-view.js)
     content/debugger/views/variable-bubble-view.js (debugger/views/variable-bubble-view.js)
     content/debugger/views/watch-expressions-view.js (debugger/views/watch-expressions-view.js)
     content/debugger/views/global-search-view.js (debugger/views/global-search-view.js)
     content/debugger/views/toolbar-view.js (debugger/views/toolbar-view.js)
@@ -78,17 +78,17 @@ devtools.jar:
     content/performance/views/details-memory-flamegraph.js (performance/views/details-memory-flamegraph.js)
     content/performance/views/recordings.js (performance/views/recordings.js)
     content/memory/memory.xhtml (memory/memory.xhtml)
     content/memory/initializer.js (memory/initializer.js)
     content/commandline/commandlineoutput.xhtml (commandline/commandlineoutput.xhtml)
     content/commandline/commandlinetooltip.xhtml (commandline/commandlinetooltip.xhtml)
     content/framework/toolbox-window.xul (framework/toolbox-window.xul)
     content/framework/toolbox-options.xhtml (framework/toolbox-options.xhtml)
-    content/framework/toolbox.xul (framework/toolbox.xul)
+*   content/framework/toolbox.xul (framework/toolbox.xul)
     content/framework/toolbox-init.js (framework/toolbox-init.js)
     content/framework/options-panel.css (framework/options-panel.css)
     content/framework/toolbox-process-window.xul (framework/toolbox-process-window.xul)
     content/framework/toolbox-process-window.js (framework/toolbox-process-window.js)
     content/framework/dev-edition-promo/dev-edition-promo.xul (framework/dev-edition-promo/dev-edition-promo.xul)
 *   content/framework/dev-edition-promo/dev-edition-promo.css (framework/dev-edition-promo/dev-edition-promo.css)
     content/framework/dev-edition-promo/dev-edition-logo.png (framework/dev-edition-promo/dev-edition-logo.png)
     content/inspector/inspector.xhtml (inspector/inspector.xhtml)
--- a/devtools/client/scratchpad/scratchpad.xul
+++ b/devtools/client/scratchpad/scratchpad.xul
@@ -10,34 +10,33 @@
 <!ENTITY % editMenuStrings SYSTEM "chrome://global/locale/editMenuOverlay.dtd">
 %editMenuStrings;
 <!ENTITY % sourceEditorStrings SYSTEM "chrome://devtools/locale/sourceeditor.dtd">
 %sourceEditorStrings;
 ]>
 
 <?xml-stylesheet href="chrome://global/skin/global.css"?>
 <?xml-stylesheet href="chrome://devtools/skin/scratchpad.css"?>
-<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
 
 <window id="main-window"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         title="&window.title;"
         windowtype="devtools:scratchpad"
         macanimationtype="document"
         fullscreenbutton="true"
         screenX="4" screenY="4"
         width="640" height="480"
         persist="screenX screenY width height sizemode">
 
 <script type="application/javascript"
         src="chrome://devtools/content/shared/theme-switching.js"/>
 <script type="application/javascript" src="chrome://global/content/globalOverlay.js"/>
 <script type="application/javascript" src="chrome://devtools/content/scratchpad/scratchpad.js"/>
 
-<commandset id="editMenuCommands"/>
+#include ../../../toolkit/content/editMenuCommands.inc.xul
 
 <commandset id="sourceEditorCommands">
   <command id="cmd_find" oncommand=";"/>
   <command id="cmd_findAgain" oncommand=";"/>
   <command id="cmd_gotoLine" oncommand=";"/>
 </commandset>
 
 <commandset id="sp-commandset">
@@ -63,18 +62,17 @@
   <command id="sp-cmd-reloadAndRun" oncommand=";"/>
   <command id="sp-cmd-evalFunction" oncommand=";"/>
   <command id="sp-cmd-errorConsole" oncommand=";" disabled="true"/>
   <command id="sp-cmd-webConsole" oncommand=";"/>
   <command id="sp-cmd-documentationLink" oncommand=";"/>
   <command id="sp-cmd-hideSidebar" oncommand=";"/>
 </commandset>
 
-<keyset id="editMenuKeys"/>
-
+#include ../../../toolkit/content/editMenuKeys.inc.xul
 <keyset id="sp-keyset">
   <key id="sp-key-window"
        key="&newWindowCmd.commandkey;"
        command="sp-cmd-newWindow"
        modifiers="accel"/>
   <key id="sp-key-open"
        key="&openFileCmd.commandkey;"
        command="sp-cmd-openFile"
@@ -186,27 +184,43 @@
                 accesskey="&closeCmd.accesskey;"
                 command="sp-cmd-close"/>
     </menupopup>
   </menu>
 
   <menu id="sp-edit-menu" label="&editMenu.label;"
         accesskey="&editMenu.accesskey;">
     <menupopup id="sp-menu_editpopup">
-      <menuitem id="menu_undo"/>
-      <menuitem id="menu_redo"/>
+      <menuitem id="menu_undo" label="&undoCmd.label;"
+                key="key_undo" accesskey="&undoCmd.accesskey;"
+                command="cmd_undo"/>
+      <menuitem id="menu_redo" label="&redoCmd.label;"
+                key="key_redo" accesskey="&redoCmd.accesskey;"
+                command="cmd_redo"/>
       <menuseparator/>
-      <menuitem id="menu_cut"/>
-      <menuitem id="menu_copy"/>
-      <menuitem id="menu_paste"/>
+      <menuitem id="menu_cut" label="&cutCmd.label;"
+                key="key_cut" accesskey="&cutCmd.accesskey;"
+                command="cmd_cut"/>
+      <menuitem id="menu_copy" label="&copyCmd.label;"
+                key="key_copy" accesskey="&copyCmd.accesskey;"
+                command="cmd_copy"/>
+      <menuitem id="menu_paste" label="&pasteCmd.label;"
+                key="key_paste" accesskey="&pasteCmd.accesskey;"
+                command="cmd_paste"/>
       <menuseparator/>
-      <menuitem id="menu_selectAll"/>
+      <menuitem id="menu_selectAll" label="&selectAllCmd.label;"
+                key="key_selectAll" accesskey="&selectAllCmd.accesskey;"
+                command="cmd_selectAll"/>
       <menuseparator/>
-      <menuitem id="menu_find"/>
-      <menuitem id="menu_findAgain"/>
+      <menuitem id="menu_find" label="&findCmd.label;"
+                key="key_find" accesskey="&findCmd.accesskey;"
+                command="cmd_find"/>
+      <menuitem id="menu_findAgain" label="&findAgainCmd.label;"
+                key="key_findAgain" accesskey="&findAgainCmd.accesskey;"
+                command="cmd_findAgain"/>
       <menuseparator/>
       <menuitem id="se-menu-gotoLine"
           label="&gotoLineCmd.label;"
           accesskey="&gotoLineCmd.accesskey;"
           key="key_gotoLine"
           command="cmd_gotoLine"/>
       <menuitem id="sp-menu-pprint"
           label="&pprint.label;"
@@ -349,22 +363,27 @@
                  class="devtools-toolbarbutton"
                  label="&pprint.label;"
                  command="sp-cmd-pprint"/>
 </toolbar>
 
 
 <popupset id="scratchpad-popups">
   <menupopup id="scratchpad-text-popup">
-    <menuitem id="cMenu_cut"/>
-    <menuitem id="cMenu_copy"/>
-    <menuitem id="cMenu_paste"/>
-    <menuitem id="cMenu_delete"/>
+    <menuitem id="cMenu_cut" label="&cutCmd.label;"
+              accesskey="&cutCmd.accesskey;" command="cmd_cut"/>
+    <menuitem id="cMenu_copy" label="&copyCmd.label;"
+              accesskey="&copyCmd.accesskey;" command="cmd_copy"/>
+    <menuitem id="cMenu_paste" label="&pasteCmd.label;"
+              accesskey="&pasteCmd.accesskey;" command="cmd_paste"/>
+    <menuitem id="cMenu_delete" label="&deleteCmd.label;"
+              accesskey="&deleteCmd.accesskey;" command="cmd_delete"/>
     <menuseparator/>
-    <menuitem id="cMenu_selectAll"/>
+    <menuitem id="cMenu_selectAll" label="&selectAllCmd.label;"
+              accesskey="&selectAllCmd.accesskey;" command="cmd_selectAll"/>
     <menuseparator/>
     <menuitem id="sp-text-run"
               label="&run.label;"
               accesskey="&run.accesskey;"
               key="sp-key-run"
               command="sp-cmd-run"/>
     <menuitem id="sp-text-inspect"
               label="&inspect.label;"
--- a/devtools/client/storage/storage.xul
+++ b/devtools/client/storage/storage.xul
@@ -8,25 +8,23 @@
 <?xml-stylesheet href="chrome://devtools/skin/storage.css" type="text/css"?>
 <?xml-stylesheet href="resource://devtools/client/shared/components/SidebarToggle.css" type="text/css"?>
 
 <!DOCTYPE window [
   <!ENTITY % storageDTD SYSTEM "chrome://devtools/locale/storage.dtd">
   %storageDTD;
 ]>
 
-<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
-
 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
   <script type="application/javascript"
           src="chrome://devtools/content/shared/theme-switching.js"/>
   <script type="text/javascript" src="chrome://global/content/globalOverlay.js"/>
 
-  <commandset id="editMenuCommands"/>
+#include ../../../toolkit/content/editMenuCommands.inc.xul
 
   <popupset id="storagePopupSet">
     <menupopup id="storage-tree-popup">
       <menuitem id="storage-tree-popup-delete-all"
                 label="&storage.popupMenu.deleteAllLabel;"/>
       <menuitem id="storage-tree-popup-delete-all-session-cookies"
                 label="&storage.popupMenu.deleteAllSessionCookiesLabel;"/>
       <menuitem id="storage-tree-popup-delete"/>
--- a/devtools/client/styleeditor/styleeditor.xul
+++ b/devtools/client/styleeditor/styleeditor.xul
@@ -15,17 +15,16 @@
 
 <?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
 <?xml-stylesheet href="chrome://devtools/content/shared/widgets/widgets.css" type="text/css"?>
 <?xml-stylesheet href="chrome://devtools/content/shared/splitview.css" type="text/css"?>
 <?xml-stylesheet href="chrome://devtools/skin/chart.css" type="text/css"?>
 <?xml-stylesheet href="chrome://devtools/skin/widgets.css" type="text/css"?>
 <?xml-stylesheet href="chrome://devtools/skin/splitview.css" type="text/css"?>
 <?xml-stylesheet href="chrome://devtools/skin/styleeditor.css" type="text/css"?>
-<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
 
 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         xmlns:html="http://www.w3.org/1999/xhtml"
         id="style-editor-chrome-window">
 
   <script type="application/javascript"
           src="chrome://devtools/content/shared/theme-switching.js"/>
   <script type="application/javascript" src="chrome://global/content/globalOverlay.js"/>
@@ -37,28 +36,35 @@
       ['cmd_undo', 'cmd_redo', 'cmd_cut', 'cmd_paste',
        'cmd_delete', 'cmd_find', 'cmd_findAgain'].forEach(goUpdateCommand);
     }
   </script>
 
   <popupset id="style-editor-popups">
     <menupopup id="sourceEditorContextMenu"
                onpopupshowing="goUpdateSourceEditorMenuItems()">
-      <menuitem id="cMenu_undo"/>
+      <menuitem id="cMenu_undo" label="&undoCmd.label;"
+                accesskey="&undoCmd.accesskey;" command="cmd_undo"/>
       <menuseparator/>
-      <menuitem id="cMenu_cut"/>
-      <menuitem id="cMenu_copy"/>
-      <menuitem id="cMenu_paste"/>
-      <menuitem id="cMenu_delete"/>
+      <menuitem id="cMenu_cut" label="&cutCmd.label;"
+                accesskey="&cutCmd.accesskey;" command="cmd_cut"/>
+      <menuitem id="cMenu_copy" label="&copyCmd.label;"
+                accesskey="&copyCmd.accesskey;" command="cmd_copy"/>
+      <menuitem id="cMenu_paste" label="&pasteCmd.label;"
+                accesskey="&pasteCmd.accesskey;" command="cmd_paste"/>
+      <menuitem id="cMenu_delete" label="&deleteCmd.label;"
+                accesskey="&deleteCmd.accesskey;" command="cmd_delete"/>
       <menuseparator/>
-      <menuitem id="cMenu_selectAll"/>
+      <menuitem id="cMenu_selectAll" label="&selectAllCmd.label;"
+                accesskey="&selectAllCmd.accesskey;" command="cmd_selectAll"/>
       <menuseparator/>
       <menuitem id="se-menu-find"
         label="&findCmd.label;" accesskey="&findCmd.accesskey;" command="cmd_find"/>
-      <menuitem id="cMenu_findAgain"/>
+      <menuitem id="cMenu_findAgain" label="&findAgainCmd.label;"
+                accesskey="&findAgainCmd.accesskey;" command="cmd_findAgain"/>
       <menuseparator/>
       <menuitem id="se-menu-gotoLine"
           label="&gotoLineCmd.label;"
           accesskey="&gotoLineCmd.accesskey;"
           key="key_gotoLine"
           command="cmd_gotoLine"/>
     </menupopup>
     <menupopup id="sidebar-context">
@@ -73,17 +79,17 @@
                 accesskey="&showOriginalSources.accesskey;"/>
       <menuitem id="options-show-media"
                 type="checkbox"
                 label="&showMediaSidebar.label;"
                 accesskey="&showMediaSidebar.accesskey;"/>
     </menupopup>
   </popupset>
 
-  <commandset id="editMenuCommands"/>
+#include ../../../toolkit/content/editMenuCommands.inc.xul
 
   <commandset id="sourceEditorCommands">
     <command id="cmd_gotoLine" oncommand="goDoCommand('cmd_gotoLine')"/>
     <command id="cmd_find" oncommand="goDoCommand('cmd_find')"/>
     <command id="cmd_findAgain" oncommand="goDoCommand('cmd_findAgain')"/>
   </commandset>
 
   <keyset id="sourceEditorKeys"/>
--- a/devtools/client/webconsole/webconsole.xul
+++ b/devtools/client/webconsole/webconsole.xul
@@ -1,24 +1,25 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- 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/. -->
 <!DOCTYPE window [
 <!ENTITY % webConsoleDTD SYSTEM "chrome://devtools/locale/webConsole.dtd">
 %webConsoleDTD;
+<!ENTITY % editMenuDTD SYSTEM "chrome://global/locale/editMenuOverlay.dtd">
+%editMenuDTD;
 ]>
 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
 <?xml-stylesheet href="chrome://devtools/skin/widgets.css"
                  type="text/css"?>
 <?xml-stylesheet href="chrome://devtools/skin/webconsole.css"
                  type="text/css"?>
 <?xml-stylesheet href="chrome://devtools/skin/components-frame.css"
                  type="text/css"?>
-<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         id="devtools-webconsole"
         macanimationtype="document"
         fullscreenbutton="true"
         title="&window.title;"
         windowtype="devtools:webconsole"
         width="900" height="350"
         persist="screenX screenY width height sizemode">
@@ -30,45 +31,47 @@
   <script type="text/javascript" src="resource://devtools/client/webconsole/net/main.js"/>
   <script type="text/javascript"><![CDATA[
 function goUpdateConsoleCommands() {
   goUpdateCommand("consoleCmd_openURL");
   goUpdateCommand("consoleCmd_copyURL");
 }
   // ]]></script>
 
-  <commandset id="editMenuCommands"/>
+#include ../../../toolkit/content/editMenuCommands.inc.xul
 
   <commandset id="consoleCommands"
               commandupdater="true"
               events="focus,select"
               oncommandupdate="goUpdateConsoleCommands();">
     <command id="consoleCmd_openURL"
              oncommand="goDoCommand('consoleCmd_openURL');"/>
     <command id="consoleCmd_copyURL"
              oncommand="goDoCommand('consoleCmd_copyURL');"/>
   </commandset>
   <keyset id="consoleKeys">
   </keyset>
-  <keyset id="editMenuKeys"/>
+#include ../../../toolkit/content/editMenuKeys.inc.xul
 
   <popupset id="mainPopupSet">
     <menupopup id="output-contextmenu" onpopupshowing="goUpdateGlobalEditMenuItems()">
       <menuitem id="menu_openURL" label="&openURL.label;"
                 accesskey="&openURL.accesskey;" command="consoleCmd_openURL"
                 selection="network" selectionType="single"/>
       <menuitem id="menu_copyURL" label="&copyURLCmd.label;"
                 accesskey="&copyURLCmd.accesskey;" command="consoleCmd_copyURL"
                 selection="network" selectionType="single"/>
       <menuitem id="menu_openInVarView" label="&openInVarViewCmd.label;"
         accesskey="&openInVarViewCmd.accesskey;" disabled="true"/>
       <menuitem id="menu_storeAsGlobal" label="&storeAsGlobalVar.label;"
         accesskey="&storeAsGlobalVar.accesskey;"/>
-      <menuitem id="cMenu_copy"/>
-      <menuitem id="cMenu_selectAll"/>
+      <menuitem id="cMenu_copy" label="&copyCmd.label;"
+                accesskey="&copyCmd.accesskey;" command="cmd_copy"/>
+      <menuitem id="cMenu_selectAll" label="&selectAllCmd.label;"
+                accesskey="&selectAllCmd.accesskey;" command="cmd_selectAll"/>
     </menupopup>
   </popupset>
 
   <tooltip id="aHTMLTooltip" page="true"/>
 
   <box class="hud-outer-wrapper devtools-responsive-container theme-body" flex="1">
     <vbox class="hud-console-wrapper devtools-main-content" flex="1">
       <toolbar class="hud-console-filter-toolbar devtools-toolbar" mode="full">
--- a/devtools/client/webide/content/jar.mn
+++ b/devtools/client/webide/content/jar.mn
@@ -1,15 +1,15 @@
 # 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/.
 
 webide.jar:
 %   content webide %content/
-    content/webide.xul                (webide.xul)
+*   content/webide.xul                (webide.xul)
     content/webide.js                 (webide.js)
     content/newapp.xul                (newapp.xul)
     content/newapp.js                 (newapp.js)
     content/details.xhtml             (details.xhtml)
     content/details.js                (details.js)
     content/addons.js                 (addons.js)
     content/addons.xhtml              (addons.xhtml)
     content/runtimedetails.js         (runtimedetails.js)
--- a/devtools/client/webide/content/webide.xul
+++ b/devtools/client/webide/content/webide.xul
@@ -4,18 +4,16 @@
    - 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/. -->
 
 <!DOCTYPE window [
   <!ENTITY % webideDTD SYSTEM "chrome://devtools/locale/webide.dtd" >
   %webideDTD;
 ]>
 
-<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
-
 <?xml-stylesheet href="chrome://global/skin/global.css"?>
 <?xml-stylesheet href="resource://devtools/client/themes/common.css"?>
 <?xml-stylesheet href="chrome://webide/skin/webide.css"?>
 
 <window id="webide" 
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         xmlns:html="http://www.w3.org/1999/xhtml"
         title="&windowTitle;"
@@ -26,18 +24,19 @@
         width="800" height="600"
         persist="screenX screenY width height sizemode">
 
   <script type="application/javascript" src="chrome://global/content/globalOverlay.js"></script>
   <script type="application/javascript" src="project-panel.js"></script>
   <script type="application/javascript" src="runtime-panel.js"></script>
   <script type="application/javascript" src="webide.js"></script>
 
+#include ../../../../toolkit/content/editMenuCommands.inc.xul
+
   <commandset id="mainCommandSet">
-    <commandset id="editMenuCommands"/>
     <commandset id="webideCommands">
       <command id="cmd_quit" oncommand="Cmds.quit()"/>
       <command id="cmd_newApp" oncommand="Cmds.newApp()" label="&projectMenu_newApp_label;"/>
       <command id="cmd_importPackagedApp" oncommand="Cmds.importPackagedApp()" label="&projectMenu_importPackagedApp_label;"/>
       <command id="cmd_importHostedApp" oncommand="Cmds.importHostedApp()" label="&projectMenu_importHostedApp_label;"/>
       <command id="cmd_showDevicePrefs" label="&runtimeMenu_showDevicePrefs_label;" oncommand="Cmds.showDevicePrefs()"/>
       <command id="cmd_showSettings" label="&runtimeMenu_showSettings_label;" oncommand="Cmds.showSettings()"/>
       <command id="cmd_removeProject" oncommand="Cmds.removeProject()" label="&projectMenu_remove_label;"/>
new file mode 100644
--- /dev/null
+++ b/toolkit/content/editMenuCommands.inc.xul
@@ -0,0 +1,17 @@
+<script type="application/javascript" src="chrome://global/content/editMenuOverlay.js"/>
+<commandset id="editMenuCommands">
+  <commandset id="editMenuCommandSetAll" commandupdater="true" events="focus,select"
+              oncommandupdate="goUpdateGlobalEditMenuItems()"/>
+  <commandset id="editMenuCommandSetUndo" commandupdater="true" events="undo"
+              oncommandupdate="goUpdateUndoEditMenuItems()"/>
+  <commandset id="editMenuCommandSetPaste" commandupdater="true" events="clipboard"
+              oncommandupdate="goUpdatePasteMenuItems()"/>
+  <command id="cmd_undo" oncommand="goDoCommand('cmd_undo')"/>
+  <command id="cmd_redo" oncommand="goDoCommand('cmd_redo')"/>
+  <command id="cmd_cut" oncommand="goDoCommand('cmd_cut')"/>
+  <command id="cmd_copy" oncommand="goDoCommand('cmd_copy')"/>
+  <command id="cmd_paste" oncommand="goDoCommand('cmd_paste')"/>
+  <command id="cmd_delete" oncommand="goDoCommand('cmd_delete')"/>
+  <command id="cmd_selectAll" oncommand="goDoCommand('cmd_selectAll')"/>
+  <command id="cmd_switchTextDirection" oncommand="goDoCommand('cmd_switchTextDirection');"/>
+</commandset>
new file mode 100644
--- /dev/null
+++ b/toolkit/content/editMenuKeys.inc.xul
@@ -0,0 +1,21 @@
+  <!-- These key nodes are here only for show. The real bindings come from
+       XBL, in platformHTMLBindings.xml. See bugs 57078 and 71779. -->
+
+  <keyset id="editMenuKeys">
+    <key id="key_undo" key="&undoCmd.key;" modifiers="accel" command="cmd_undo"/>
+#ifdef XP_UNIX
+    <key id="key_redo" key="&undoCmd.key;" modifiers="accel,shift" command="cmd_redo"/>
+#else
+    <key id="key_redo" key="&redoCmd.key;" modifiers="accel" command="cmd_redo"/>
+#endif
+    <key id="key_cut" key="&cutCmd.key;" modifiers="accel" command="cmd_cut"/>
+    <key id="key_copy" key="&copyCmd.key;" modifiers="accel" command="cmd_copy"/>
+    <key id="key_paste" key="&pasteCmd.key;" modifiers="accel" command="cmd_paste"/>
+    <key id="key_delete" keycode="VK_DELETE" command="cmd_delete"/>
+    <key id="key_selectAll" key="&selectAllCmd.key;" modifiers="accel" command="cmd_selectAll"/>
+    <key id="key_find" key="&findCmd.key;" modifiers="accel" command="cmd_find"/>
+    <key id="key_findAgain" key="&findAgainCmd.key;" modifiers="accel" command="cmd_findAgain"/>
+    <key id="key_findPrevious" key="&findAgainCmd.key;" modifiers="shift,accel" command="cmd_findPrevious"/>
+    <key id="key_findAgain2" keycode="&findAgainCmd.key2;" command="cmd_findAgain"/>
+    <key id="key_findPrevious2" keycode="&findAgainCmd.key2;" modifiers="shift" command="cmd_findPrevious"/>
+  </keyset>
deleted file mode 100644
--- a/toolkit/content/editMenuOverlay.xul
+++ /dev/null
@@ -1,108 +0,0 @@
-<?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/. -->
-
-
-<!DOCTYPE overlay SYSTEM "chrome://global/locale/editMenuOverlay.dtd">
-
-<overlay id="editMenuOverlay"
-         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
-  <script type="application/javascript" src="chrome://global/content/editMenuOverlay.js"/>
-
-  <commandset id="editMenuCommands">
-    <commandset id="editMenuCommandSetAll" commandupdater="true" events="focus,select"
-                oncommandupdate="goUpdateGlobalEditMenuItems()"/>
-    <commandset id="editMenuCommandSetUndo" commandupdater="true" events="undo"
-                oncommandupdate="goUpdateUndoEditMenuItems()"/>
-    <commandset id="editMenuCommandSetPaste" commandupdater="true" events="clipboard"
-                oncommandupdate="goUpdatePasteMenuItems()"/>
-    <command id="cmd_undo" oncommand="goDoCommand('cmd_undo')"/>
-    <command id="cmd_redo" oncommand="goDoCommand('cmd_redo')"/>
-    <command id="cmd_cut" oncommand="goDoCommand('cmd_cut')"/>
-    <command id="cmd_copy" oncommand="goDoCommand('cmd_copy')"/>
-    <command id="cmd_paste" oncommand="goDoCommand('cmd_paste')"/>
-    <command id="cmd_delete" oncommand="goDoCommand('cmd_delete')"/>
-    <command id="cmd_selectAll" oncommand="goDoCommand('cmd_selectAll')"/>
-    <command id="cmd_switchTextDirection" oncommand="goDoCommand('cmd_switchTextDirection');"/>
-  </commandset>
-
-  <!-- These key nodes are here only for show. The real bindings come from
-       XBL, in platformHTMLBindings.xml. See bugs 57078 and 71779. -->
-
-  <keyset id="editMenuKeys">
-    <key id="key_undo" key="&undoCmd.key;" modifiers="accel" command="cmd_undo"/>
-#ifdef XP_UNIX
-    <key id="key_redo" key="&undoCmd.key;" modifiers="accel,shift" command="cmd_redo"/>
-#else
-    <key id="key_redo" key="&redoCmd.key;" modifiers="accel" command="cmd_redo"/>
-#endif
-    <key id="key_cut" key="&cutCmd.key;" modifiers="accel" command="cmd_cut"/>
-    <key id="key_copy" key="&copyCmd.key;" modifiers="accel" command="cmd_copy"/>
-    <key id="key_paste" key="&pasteCmd.key;" modifiers="accel" command="cmd_paste"/>
-    <key id="key_delete" keycode="VK_DELETE" command="cmd_delete"/>
-    <key id="key_selectAll" key="&selectAllCmd.key;" modifiers="accel" command="cmd_selectAll"/>
-    <key id="key_find" key="&findCmd.key;" modifiers="accel" command="cmd_find"/>
-    <key id="key_findAgain" key="&findAgainCmd.key;" modifiers="accel" command="cmd_findAgain"/>
-    <key id="key_findPrevious" key="&findAgainCmd.key;" modifiers="shift,accel" command="cmd_findPrevious"/>
-    <key id="key_findAgain2" keycode="&findAgainCmd.key2;" command="cmd_findAgain"/>
-    <key id="key_findPrevious2" keycode="&findAgainCmd.key2;" modifiers="shift" command="cmd_findPrevious"/>
-  </keyset>
-
-  <!-- Edit Menu -->
-  <menu id="menu_edit" label="&editMenu.label;"
-        accesskey="&editMenu.accesskey;"/>
-
-  <menuitem id="menu_undo" label="&undoCmd.label;"
-            key="key_undo" accesskey="&undoCmd.accesskey;"
-            command="cmd_undo"/>
-  <menuitem id="menu_redo" label="&redoCmd.label;"
-            key="key_redo" accesskey="&redoCmd.accesskey;"
-            command="cmd_redo"/>
-  <menuitem id="menu_cut" label="&cutCmd.label;"
-            key="key_cut" accesskey="&cutCmd.accesskey;"
-            command="cmd_cut"/>
-  <menuitem id="menu_copy" label="&copyCmd.label;"
-            key="key_copy" accesskey="&copyCmd.accesskey;"
-            command="cmd_copy"/>
-  <menuitem id="menu_paste" label="&pasteCmd.label;"
-            key="key_paste" accesskey="&pasteCmd.accesskey;"
-            command="cmd_paste"/>
-  <menuitem id="menu_delete" label="&deleteCmd.label;"
-            key="key_delete" accesskey="&deleteCmd.accesskey;"
-            command="cmd_delete"/>
-  <menuitem id="menu_selectAll" label="&selectAllCmd.label;"
-            key="key_selectAll" accesskey="&selectAllCmd.accesskey;"
-            command="cmd_selectAll"/>
-  <menuitem id="menu_find" label="&findCmd.label;"
-            key="key_find" accesskey="&findCmd.accesskey;"
-            command="cmd_find"/>
-  <menuitem id="menu_findAgain" label="&findAgainCmd.label;"
-            key="key_findAgain" accesskey="&findAgainCmd.accesskey;"
-            command="cmd_findAgain"/>
-  <menuitem id="menu_findPrevious" label="&findPreviousCmd.label;"
-            key="key_findPrevious" accesskey="&findPreviousCmd.accesskey;"
-            command="cmd_findPrevious"/>
-
-  <menuitem id="cMenu_undo" label="&undoCmd.label;"
-            accesskey="&undoCmd.accesskey;" command="cmd_undo"/>
-  <menuitem id="cMenu_redo" label="&redoCmd.label;"
-            accesskey="&redoCmd.accesskey;" command="cmd_redo"/>
-  <menuitem id="cMenu_cut" label="&cutCmd.label;"
-            accesskey="&cutCmd.accesskey;" command="cmd_cut"/>
-  <menuitem id="cMenu_copy" label="&copyCmd.label;"
-            accesskey="&copyCmd.accesskey;" command="cmd_copy"/>
-  <menuitem id="cMenu_paste" label="&pasteCmd.label;"
-            accesskey="&pasteCmd.accesskey;" command="cmd_paste"/>
-  <menuitem id="cMenu_delete" label="&deleteCmd.label;"
-            accesskey="&deleteCmd.accesskey;" command="cmd_delete"/>
-  <menuitem id="cMenu_selectAll" label="&selectAllCmd.label;"
-            accesskey="&selectAllCmd.accesskey;" command="cmd_selectAll"/>
-  <menuitem id="cMenu_find" label="&findCmd.label;"
-            accesskey="&findCmd.accesskey;" command="cmd_find"/>
-  <menuitem id="cMenu_findAgain" label="&findAgainCmd.label;"
-            accesskey="&findAgainCmd.accesskey;" command="cmd_findAgain"/>
-  <menuitem id="cMenu_findPrevious" label="&findPreviousCmd.label;"
-            accesskey="&findPreviousCmd.accesskey;" command="cmd_findPrevious"/>
-</overlay>
--- a/toolkit/content/jar.mn
+++ b/toolkit/content/jar.mn
@@ -40,17 +40,16 @@ toolkit.jar:
    content/global/browser-child.js
    content/global/browser-content.js
 *   content/global/buildconfig.html
    content/global/buildconfig.css
    content/global/contentAreaUtils.js
    content/global/datepicker.xhtml
 #ifndef MOZ_FENNEC
    content/global/editMenuOverlay.js
-*  content/global/editMenuOverlay.xul
 #endif
    content/global/filepicker.properties
    content/global/globalOverlay.js
    content/global/mozilla.xhtml
    content/global/aboutMozilla.css
    content/global/preferencesBindings.js
    content/global/process-content.js
    content/global/resetProfile.css
--- a/toolkit/content/tests/chrome/bug366992_window.xul
+++ b/toolkit/content/tests/chrome/bug366992_window.xul
@@ -1,28 +1,44 @@
 <?xml version="1.0"?>
 
 <!-- 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/. -->
 
 <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
 
 <window id="366992 test"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         onload="onLoad();"
         width="600"
         height="600"
         title="366992 test">
 
-  <commandset id="editMenuCommands"/>
+  <commandset id="editMenuCommands">
+    <commandset id="editMenuCommandSetAll" commandupdater="true" events="focus,select"
+                oncommandupdate="goUpdateGlobalEditMenuItems()"/>
+    <commandset id="editMenuCommandSetUndo" commandupdater="true" events="undo"
+                oncommandupdate="goUpdateUndoEditMenuItems()"/>
+    <commandset id="editMenuCommandSetPaste" commandupdater="true" events="clipboard"
+                oncommandupdate="goUpdatePasteMenuItems()"/>
+    <command id="cmd_undo" oncommand="goDoCommand('cmd_undo')"/>
+    <command id="cmd_redo" oncommand="goDoCommand('cmd_redo')"/>
+    <command id="cmd_cut" oncommand="goDoCommand('cmd_cut')"/>
+    <command id="cmd_copy" oncommand="goDoCommand('cmd_copy')"/>
+    <command id="cmd_paste" oncommand="goDoCommand('cmd_paste')"/>
+    <command id="cmd_delete" oncommand="goDoCommand('cmd_delete')"/>
+    <command id="cmd_selectAll" oncommand="goDoCommand('cmd_selectAll')"/>
+    <command id="cmd_switchTextDirection" oncommand="goDoCommand('cmd_switchTextDirection');"/>
+  </commandset>
 
   <script type="application/javascript"
           src="chrome://global/content/globalOverlay.js"/>
+  <script type="application/javascript"
+          src="chrome://global/content/editMenuOverlay.js"/>
   <script type="application/javascript"><![CDATA[
     // Without the fix for bug 366992, the delete command would be enabled
     // for the textbox even though the textbox's controller for this command
     // disables it.
     var gShouldNotBeReachedController = {
       supportsCommand: function(aCommand) {
         return aCommand == "cmd_delete";
       },
--- a/tools/lint/eslint/eslint-plugin-mozilla/lib/environments/browser-window.js
+++ b/tools/lint/eslint/eslint-plugin-mozilla/lib/environments/browser-window.js
@@ -27,17 +27,17 @@ const EXTRA_SCRIPTS = [
   "browser/base/content/nsContextMenu.js",
   "toolkit/content/contentAreaUtils.js",
   "browser/components/places/content/editBookmarkOverlay.js",
   "browser/components/downloads/content/downloads.js",
   "browser/components/downloads/content/indicator.js",
   // This gets loaded into the same scopes as browser.js via browser.xul and
   // placesOverlay.xul.
   "toolkit/content/globalOverlay.js",
-  // Via editMenuOverlay.xul
+  // Via editMenuCommands.inc.xul
   "toolkit/content/editMenuOverlay.js",
   // Via baseMenuOverlay.xul
   "browser/base/content/utilityOverlay.js"
 ];
 
 // Some files in global-scripts.inc need mapping to specific locations.
 const MAPPINGS = {
   "printUtils.js": "toolkit/components/printing/content/printUtils.js",