Bug 1434381 - Inline the layout debug overlay into browser menu bar. r?dbaron
This is part of the work to remove XUL overlays. This overlay is only
used once and can be inlined.
MozReview-Commit-ID: 1SE1nobgehE
--- a/browser/base/content/browser-menubar.inc
+++ b/browser/base/content/browser-menubar.inc
@@ -524,16 +524,22 @@
command="View:PageInfo"/>
#ifndef XP_UNIX
<menuseparator id="prefSep"/>
<menuitem id="menu_preferences"
label="&preferencesCmd2.label;"
accesskey="&preferencesCmd2.accesskey;"
oncommand="openPreferences(undefined, {origin: 'menubar'});"/>
#endif
+#ifdef MOZ_DEBUG
+ <menuitem label="&ldbCmd.label;"
+ accesskey="&ldbCmd.accesskey;"
+ oncommand="toOpenWindowByType('mozapp:layoutdebug',
+ 'chrome://layoutdebug/content/');"/>
+#endif
</menupopup>
</menu>
#ifdef XP_MACOSX
<menu id="windowMenu" />
#endif
<menu id="helpMenu" />
</menubar>
--- a/browser/locales/en-US/chrome/browser/browser.dtd
+++ b/browser/locales/en-US/chrome/browser/browser.dtd
@@ -106,16 +106,18 @@ Option+Command keyboard shortcut letter
Source" on macOS. pageSourceCmd.commandkey above is Firefox's official keyboard
shortcut shown in the GUI. SafariCommandKey is an alias provided for the
convenience of Safari and Chrome users on macOS. See bug 1398988. -->
<!ENTITY pageSourceCmd.SafariCommandKey "u">
<!ENTITY pageInfoCmd.label "Page Info">
<!ENTITY pageInfoCmd.accesskey "I">
<!ENTITY pageInfoCmd.commandkey "i">
+<!ENTITY ldbCmd.label "Layout Debugger">
+<!ENTITY ldbCmd.accesskey "L">
<!ENTITY mirrorTabCmd.label "Mirror Tab">
<!ENTITY mirrorTabCmd.accesskey "m">
<!-- LOCALIZATION NOTE (enterFullScreenCmd.label, exitFullScreenCmd.label):
These should match what Safari and other Apple applications use on OS X Lion. -->
<!ENTITY enterFullScreenCmd.label "Enter Full Screen">
<!ENTITY enterFullScreenCmd.accesskey "F">
<!ENTITY exitFullScreenCmd.label "Exit Full Screen">
<!ENTITY exitFullScreenCmd.accesskey "F">
deleted file mode 100644
--- a/layout/tools/layout-debug/ui/content/layoutdebug-overlay.xul
+++ /dev/null
@@ -1,24 +0,0 @@
-<?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/. -->
-
-
-<!DOCTYPE window SYSTEM "chrome://layoutdebug/locale/layoutdebug-overlay.dtd" >
-
-<overlay id="layoutdebugTaskMenuID"
- xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
-<!-- Firefox -->
-<menupopup id="menu_ToolsPopup">
- <menuitem label="&ldbCmd.label;"
- accesskey="&ldbCmd.accesskey;"
- insertafter="javascriptConsole"
- oncommand="toOpenWindowByType('mozapp:layoutdebug',
- 'chrome://layoutdebug/content/');"/>
-</menupopup>
-
-</overlay>
--- a/layout/tools/layout-debug/ui/jar.mn
+++ b/layout/tools/layout-debug/ui/jar.mn
@@ -1,13 +1,10 @@
# 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/.
layoutdebug.jar:
% content layoutdebug %content/layoutdebug/
-% overlay chrome://browser/content/browser.xul chrome://layoutdebug/content/layoutdebug-overlay.xul
% locale layoutdebug en-US %locale/en-US/layoutdebug/
content/layoutdebug/layoutdebug.xul (content/layoutdebug.xul)
content/layoutdebug/layoutdebug.js (content/layoutdebug.js)
- content/layoutdebug/layoutdebug-overlay.xul (content/layoutdebug-overlay.xul)
locale/en-US/layoutdebug/layoutdebug.dtd (locale/en-US/layoutdebug.dtd)
- locale/en-US/layoutdebug/layoutdebug-overlay.dtd (locale/en-US/layoutdebug-overlay.dtd)
deleted file mode 100644
--- a/layout/tools/layout-debug/ui/locale/en-US/layoutdebug-overlay.dtd
+++ /dev/null
@@ -1,8 +0,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/. -->
-
-<!ENTITY ldbCmd.label "Layout Debugger">
-<!ENTITY ldbCmd.accesskey "L">