Bug 1595636 - Rename xul->xhtml for non-tests in DevTools r=jdescottes
authorBrian Grinstead <bgrinstead@mozilla.com>
Wed, 13 Nov 2019 23:44:19 +0000
changeset 501858 17f51f671e5f4c239f996047bebd0f8e59ebbda5
parent 501857 7a990e278ddca87a74a3caf4cc3b633bfcd74deb
child 501859 bbeb8f3081930de9728f5c0f1653dc467f7eac23
push id114172
push userdluca@mozilla.com
push dateTue, 19 Nov 2019 11:31:10 +0000
treeherdermozilla-inbound@b5c5ba07d3db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdescottes
bugs1595636
milestone72.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1595636 - Rename xul->xhtml for non-tests in DevTools r=jdescottes Differential Revision: https://phabricator.services.mozilla.com/D52711
browser/components/BrowserGlue.jsm
devtools/client/definitions.js
devtools/client/framework/test/browser_toolbox_toggle.js
devtools/client/framework/toolbox-hosts.js
devtools/client/framework/toolbox-window.xhtml
devtools/client/framework/toolbox-window.xul
devtools/client/framework/toolbox.xhtml
devtools/client/framework/toolbox.xul
devtools/client/jar.mn
devtools/client/performance/index.xhtml
devtools/client/performance/index.xul
devtools/client/storage/index.xhtml
devtools/client/storage/index.xul
devtools/client/styleeditor/index.xhtml
devtools/client/styleeditor/index.xul
devtools/client/styleeditor/test/browser_styleeditor_bug_851132_middle_click.js
devtools/client/themes/performance.css
devtools/client/themes/splitters.css
devtools/startup/AboutDevToolsToolboxRegistration.jsm
--- a/browser/components/BrowserGlue.jsm
+++ b/browser/components/BrowserGlue.jsm
@@ -2854,17 +2854,17 @@ BrowserGlue.prototype = {
       );
     });
   },
 
   // eslint-disable-next-line complexity
   _migrateUI: function BG__migrateUI() {
     // Use an increasing number to keep track of the current migration state.
     // Completely unrelated to the current Firefox release number.
-    const UI_VERSION = 88;
+    const UI_VERSION = 89;
     const BROWSER_DOCURL = AppConstants.BROWSER_CHROME_URL;
 
     let currentUIVersion;
     if (Services.prefs.prefHasUserValue("browser.migration.version")) {
       currentUIVersion = Services.prefs.getIntPref("browser.migration.version");
       this._isNewProfile = false;
     } else {
       // This is a new profile, nothing to migrate.
@@ -3295,16 +3295,24 @@ BrowserGlue.prototype = {
           Services.prefs.setStringPref(
             "browser.contentblocking.category",
             "standard"
           );
         }
       }
     }
 
+    if (currentUIVersion < 89) {
+      // This file was renamed in https://bugzilla.mozilla.org/show_bug.cgi?id=1595636.
+      this._migrateXULStoreForDocument(
+        "chrome://devtools/content/framework/toolbox-window.xul",
+        "chrome://devtools/content/framework/toolbox-window.xhtml"
+      );
+    }
+
     // Update the migration version.
     Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
   },
 
   _checkForDefaultBrowser() {
     // Perform default browser checking.
     if (!ShellService) {
       return;
--- a/devtools/client/definitions.js
+++ b/devtools/client/definitions.js
@@ -242,17 +242,17 @@ Tools.jsdebugger = {
 };
 
 Tools.styleEditor = {
   id: "styleeditor",
   ordinal: 5,
   visibilityswitch: "devtools.styleeditor.enabled",
   accesskey: l10n("open.accesskey"),
   icon: "chrome://devtools/skin/images/tool-styleeditor.svg",
-  url: "chrome://devtools/content/styleeditor/index.xul",
+  url: "chrome://devtools/content/styleeditor/index.xhtml",
   label: l10n("ToolboxStyleEditor.label"),
   panelLabel: l10n("ToolboxStyleEditor.panelLabel"),
   get tooltip() {
     return l10n(
       "ToolboxStyleEditor.tooltip3",
       "Shift+" + functionkey(l10n("styleeditor.commandkey"))
     );
   },
@@ -297,17 +297,17 @@ function switchPerformancePanel() {
       // the perf actor yet. Also this function is not async, so we can't initialize
       // the actor yet.
       // We don't display the new performance panel for remote context in the
       // toolbox, because this has an overhead. Instead we should use
       // about:debugging.
       return target.isLocalTab;
     };
   } else {
-    Tools.performance.url = "chrome://devtools/content/performance/index.xul";
+    Tools.performance.url = "chrome://devtools/content/performance/index.xhtml";
     Tools.performance.build = function(frame, target) {
       return new PerformancePanel(frame, target);
     };
     Tools.performance.isTargetSupported = function(target) {
       return target.hasActor("performance");
     };
   }
 }
@@ -368,17 +368,17 @@ Tools.netMonitor = {
 };
 
 Tools.storage = {
   id: "storage",
   ordinal: 8,
   accesskey: l10n("storage.accesskey"),
   visibilityswitch: "devtools.storage.enabled",
   icon: "chrome://devtools/skin/images/tool-storage.svg",
-  url: "chrome://devtools/content/storage/index.xul",
+  url: "chrome://devtools/content/storage/index.xhtml",
   label: l10n("storage.label"),
   menuLabel: l10n("storage.menuLabel"),
   panelLabel: l10n("storage.panelLabel"),
   get tooltip() {
     return l10n(
       "storage.tooltip3",
       "Shift+" + functionkey(l10n("storage.commandkey"))
     );
--- a/devtools/client/framework/test/browser_toolbox_toggle.js
+++ b/devtools/client/framework/test/browser_toolbox_toggle.js
@@ -11,17 +11,17 @@ const URL = "data:text/html;charset=utf-
 var { Toolbox } = require("devtools/client/framework/toolbox");
 
 add_task(async function() {
   // Make sure this test starts with the selectedTool pref cleared. Previous
   // tests select various tools, and that sets this pref.
   Services.prefs.clearUserPref("devtools.toolbox.selectedTool");
 
   // Test with ACCEL+SHIFT+I / ACCEL+ALT+I (MacOSX) ; modifiers should match :
-  // - toolbox-key-toggle in devtools/client/framework/toolbox-window.xul
+  // - toolbox-key-toggle in devtools/client/framework/toolbox-window.xhtml
   // - key_devToolboxMenuItem in browser/base/content/browser.xhtml
   info("Test toggle using CTRL+SHIFT+I/CMD+ALT+I");
   await testToggle("I", {
     accelKey: true,
     shiftKey: !navigator.userAgent.match(/Mac/),
     altKey: navigator.userAgent.match(/Mac/),
   });
 
--- a/devtools/client/framework/toolbox-hosts.js
+++ b/devtools/client/framework/toolbox-hosts.js
@@ -238,17 +238,17 @@ function WindowHost() {
   this._boundUnload = this._boundUnload.bind(this);
 
   EventEmitter.decorate(this);
 }
 
 WindowHost.prototype = {
   type: "window",
 
-  WINDOW_URL: "chrome://devtools/content/framework/toolbox-window.xul",
+  WINDOW_URL: "chrome://devtools/content/framework/toolbox-window.xhtml",
 
   /**
    * Create a new xul window to contain the toolbox.
    */
   create: function() {
     return new Promise(resolve => {
       const flags = "chrome,centerscreen,resizable,dialog=no";
       const win = Services.ww.openWindow(
rename from devtools/client/framework/toolbox-window.xul
rename to devtools/client/framework/toolbox-window.xhtml
rename from devtools/client/framework/toolbox.xul
rename to devtools/client/framework/toolbox.xhtml
--- a/devtools/client/jar.mn
+++ b/devtools/client/jar.mn
@@ -5,37 +5,37 @@
 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/webconsole/index.html (webconsole/index.html)
     content/shared/splitview.css (shared/splitview.css)
     content/shared/theme-switching.js (shared/theme-switching.js)
-    content/styleeditor/index.xul (styleeditor/index.xul)
-    content/storage/index.xul (storage/index.xul)
+    content/styleeditor/index.xhtml (styleeditor/index.xhtml)
+    content/storage/index.xhtml (storage/index.xhtml)
     content/inspector/markup/markup.xhtml (inspector/markup/markup.xhtml)
     content/shared/sourceeditor/codemirror/addon/dialog/dialog.css (shared/sourceeditor/codemirror/addon/dialog/dialog.css)
     content/shared/sourceeditor/codemirror/keymap/emacs.js (shared/sourceeditor/codemirror/keymap/emacs.js)
     content/shared/sourceeditor/codemirror/keymap/vim.js (shared/sourceeditor/codemirror/keymap/vim.js)
     content/shared/sourceeditor/codemirror/keymap/sublime.js (shared/sourceeditor/codemirror/keymap/sublime.js)
     content/shared/sourceeditor/codemirror/codemirror.bundle.js (shared/sourceeditor/codemirror/codemirror.bundle.js)
     content/shared/sourceeditor/codemirror/lib/codemirror.css (shared/sourceeditor/codemirror/lib/codemirror.css)
     content/shared/sourceeditor/codemirror/mozilla.css (shared/sourceeditor/codemirror/mozilla.css)
     content/shared/sourceeditor/codemirror/cmiframe.html (shared/sourceeditor/codemirror/cmiframe.html)
     content/debugger/index.html (debugger/index.html)
-    content/performance/index.xul (performance/index.xul)
+    content/performance/index.xhtml (performance/index.xhtml)
     content/performance-new/index.xhtml (performance-new/index.xhtml)
     content/performance-new/frame-script.js (performance-new/frame-script.js)
     content/performance-new/popup/initializer.js (performance-new/popup/initializer.js)
     content/performance-new/popup/popup.xhtml (performance-new/popup/popup.xhtml)
     content/memory/index.xhtml (memory/index.xhtml)
-    content/framework/toolbox-window.xul (framework/toolbox-window.xul)
+    content/framework/toolbox-window.xhtml (framework/toolbox-window.xhtml)
     content/framework/toolbox-options.xhtml (framework/toolbox-options.xhtml)
-    content/framework/toolbox.xul (framework/toolbox.xul)
+    content/framework/toolbox.xhtml (framework/toolbox.xhtml)
     content/framework/toolbox-init.js (framework/toolbox-init.js)
     content/framework/options-panel.css (framework/options-panel.css)
     content/framework/toolbox-process-window.html (framework/toolbox-process-window.html)
     content/framework/toolbox-process-window.css (framework/toolbox-process-window.css)
     content/framework/toolbox-process-window.js (framework/toolbox-process-window.js)
     content/inspector/index.xhtml (inspector/index.xhtml)
     content/shared/widgets/graphs-frame.xhtml (shared/widgets/graphs-frame.xhtml)
     content/shared/widgets/cubic-bezier.css (shared/widgets/cubic-bezier.css)
rename from devtools/client/performance/index.xul
rename to devtools/client/performance/index.xhtml
rename from devtools/client/storage/index.xul
rename to devtools/client/storage/index.xhtml
rename from devtools/client/styleeditor/index.xul
rename to devtools/client/styleeditor/index.xhtml
--- a/devtools/client/styleeditor/index.xul
+++ b/devtools/client/styleeditor/index.xhtml
@@ -23,16 +23,20 @@
         xmlns:html="http://www.w3.org/1999/xhtml"
         id="style-editor-chrome-window">
 
   <script src="chrome://devtools/content/shared/theme-switching.js"/>
   <script src="chrome://global/content/globalOverlay.js"/>
   <script src="chrome://browser/content/utilityOverlay.js"/>
   <script src="chrome://global/content/editMenuOverlay.js"/>
   <script>
+    "use strict";
+    /* import-globals-from ../../../toolkit/content/globalOverlay.js */
+    /* import-globals-from ../../../toolkit/content/editMenuOverlay.js */
+    /* exported goUpdateSourceEditorMenuItems */
     function goUpdateSourceEditorMenuItems() {
       goUpdateGlobalEditMenuItems();
 
       ['cmd_undo', 'cmd_redo', 'cmd_cut', 'cmd_paste',
        'cmd_delete', 'cmd_find', 'cmd_findAgain'].forEach(goUpdateCommand);
     }
   </script>
 
--- a/devtools/client/styleeditor/test/browser_styleeditor_bug_851132_middle_click.js
+++ b/devtools/client/styleeditor/test/browser_styleeditor_bug_851132_middle_click.js
@@ -1,13 +1,13 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 "use strict";
 
-// Test that middle click on style sheet doesn't open index.xul in a new
+// Test that middle click on style sheet doesn't open index.xhtml in a new
 // tab (bug 851132).
 
 const TESTCASE_URI = TEST_BASE_HTTP + "four.html";
 
 add_task(async function() {
   const { ui } = await openStyleEditorForURL(TESTCASE_URI);
   gBrowser.tabContainer.addEventListener("TabOpen", onTabAdded);
 
--- a/devtools/client/themes/performance.css
+++ b/devtools/client/themes/performance.css
@@ -446,24 +446,24 @@
   transform-origin: center right;
 }
 
 /**
  * Waterfall markers tree
  */
 
 #waterfall-tree {
-  /* DE-XUL: convert this to display: flex once index.xul is converted to HTML */
+  /* DE-XUL: convert this to display: flex once index.xhtml is converted to HTML */
   display: -moz-box;
   -moz-box-orient: vertical;
   -moz-box-flex: 1;
 }
 
 .waterfall-markers {
-  /* DE-XUL: convert this to display: flex once index.xul is converted to HTML */
+  /* DE-XUL: convert this to display: flex once index.xhtml is converted to HTML */
   display: -moz-box;
   -moz-box-orient: vertical;
   -moz-box-flex: 1;
 }
 
 .waterfall-header {
   display: flex;
 }
@@ -499,17 +499,17 @@
   background-position: -1px center;
 }
 
 /**
  * Markers waterfall breakdown
  */
 
 .waterfall-markers .tree {
-  /* DE-XUL: convert this to display: flex once index.xul is converted to HTML */
+  /* DE-XUL: convert this to display: flex once index.xhtml is converted to HTML */
   display: -moz-box;
   -moz-box-orient: vertical;
   -moz-box-flex: 1;
   overflow-x: hidden;
   overflow-y: auto;
   --waterfall-tree-row-height: 15px;
 }
 
--- a/devtools/client/themes/splitters.css
+++ b/devtools/client/themes/splitters.css
@@ -1,14 +1,14 @@
 /* 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/. */
 
-/* This file is loaded by both browser.xhtml and toolbox.xul. Therefore, rules
-   defined here can not rely on toolbox.xul variables. */
+/* This file is loaded by both browser.xhtml and toolbox.xhtml. Therefore, rules
+   defined here can not rely on toolbox.xhtml variables. */
 
 /* Splitters */
 
 :root {
   /* Draggable splitter element size */
   --devtools-splitter-element-size: 1px;
   --devtools-emphasized-splitter-element-size: 2px;
 
--- a/devtools/startup/AboutDevToolsToolboxRegistration.jsm
+++ b/devtools/startup/AboutDevToolsToolboxRegistration.jsm
@@ -9,17 +9,17 @@
 
 const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 const { nsIAboutModule } = Ci;
 
 function AboutDevtoolsToolbox() {}
 
 AboutDevtoolsToolbox.prototype = {
-  uri: Services.io.newURI("chrome://devtools/content/framework/toolbox.xul"),
+  uri: Services.io.newURI("chrome://devtools/content/framework/toolbox.xhtml"),
   classDescription: "about:devtools-toolbox",
   classID: Components.ID("11342911-3135-45a8-8d71-737a2b0ad469"),
   contractID: "@mozilla.org/network/protocol/about;1?what=devtools-toolbox",
 
   QueryInterface: ChromeUtils.generateQI([nsIAboutModule]),
 
   newChannel: function(uri, loadInfo) {
     const chan = Services.io.newChannelFromURIWithLoadInfo(this.uri, loadInfo);