Bug 1471152 - Package all panel scripts under resource://devtools/ instead of chrome://devtools/. r=jdescottes
authorAlexandre Poirot <poirot.alex@gmail.com>
Mon, 25 Jun 2018 12:59:22 -0700
changeset 423897 35ccb1674eebb481641ccbc7023b8aed918ec206
parent 423896 0899ad0c29c7dfb948ad7ac58fda3bfdcbd602dc
child 423898 02da4a95a728ec9393b54a6b39c79f07b27e5141
push id34195
push usertoros@mozilla.com
push dateWed, 27 Jun 2018 22:05:29 +0000
treeherdermozilla-central@e922b59832f1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdescottes
bugs1471152
milestone63.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 1471152 - Package all panel scripts under resource://devtools/ instead of chrome://devtools/. r=jdescottes MozReview-Commit-ID: 72iggFSZswN
devtools/client/aboutdebugging/aboutdebugging.xhtml
devtools/client/aboutdebugging/moz.build
devtools/client/application/index.html
devtools/client/application/moz.build
devtools/client/inspector/index.xhtml
devtools/client/inspector/moz.build
devtools/client/jar.mn
devtools/client/netmonitor/index.html
devtools/client/netmonitor/moz.build
devtools/client/performance-new/index.xhtml
devtools/client/performance-new/moz.build
devtools/client/responsive.html/index.xhtml
devtools/client/responsive.html/moz.build
devtools/client/scratchpad/index.xul
devtools/client/scratchpad/moz.build
--- a/devtools/client/aboutdebugging/aboutdebugging.xhtml
+++ b/devtools/client/aboutdebugging/aboutdebugging.xhtml
@@ -9,13 +9,13 @@
 <!ENTITY % aboutdebuggingDTD SYSTEM "chrome://devtools/locale/aboutdebugging.dtd"> %aboutdebuggingDTD;
 ]>
 
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <title>&aboutDebugging.fullTitle;</title>
     <link rel="stylesheet" href="chrome://global/skin/in-content/common.css" type="text/css"/>
     <link rel="stylesheet" href="chrome://devtools/content/aboutdebugging/aboutdebugging.css"  type="text/css"/>
-    <script type="application/javascript" src="chrome://devtools/content/aboutdebugging/initializer.js"></script>
+    <script type="application/javascript" src="resource://devtools/client/aboutdebugging/initializer.js"></script>
   </head>
   <body id="body" dir="&locale.dir;">
   </body>
 </html>
--- a/devtools/client/aboutdebugging/moz.build
+++ b/devtools/client/aboutdebugging/moz.build
@@ -4,15 +4,19 @@
 # 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/.
 
 DIRS += [
     'components',
     'modules',
 ]
 
+DevToolsModules(
+    'initializer.js'
+)
+
 BROWSER_CHROME_MANIFESTS += [
     'test/browser.ini'
 ]
 XPCSHELL_TESTS_MANIFESTS += ['test/xpcshell.ini']
 
 with Files('**'):
     BUG_COMPONENT = ('DevTools', 'about:debugging')
--- a/devtools/client/application/index.html
+++ b/devtools/client/application/index.html
@@ -4,11 +4,11 @@
 <!DOCTYPE html>
 <html dir="">
   <head>
     <link rel="stylesheet" type="text/css" href="resource://devtools/client/application/application.css" />
   </head>
   <body class="theme-body" role="application">
     <div id="mount"></div>
     <script src="chrome://devtools/content/shared/theme-switching.js"></script>
-    <script src="initializer.js"></script>
+    <script src="resource://devtools/client/application/initializer.js"></script>
   </body>
 </html>
--- a/devtools/client/application/moz.build
+++ b/devtools/client/application/moz.build
@@ -3,12 +3,13 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += [
     'src',
 ]
 
 DevToolsModules(
     'application.css',
+    'initializer.js',
     'panel.js'
 )
 
 BROWSER_CHROME_MANIFESTS += ['test/browser.ini']
--- a/devtools/client/inspector/index.xhtml
+++ b/devtools/client/inspector/index.xhtml
@@ -32,18 +32,17 @@
     var isInChrome = window.location.href.includes("chrome:");
     if (isInChrome) {
       var exports = {};
       var { require, loader } = Cu.import("resource://devtools/shared/Loader.jsm", {});
       var { BrowserLoader } = Cu.import("resource://devtools/client/shared/browser-loader.js", {});
     }
   </script>
 
-  <!-- In content, inspector.js is mapped to the dynamically generated webpack bundle -->
-  <script type="application/javascript" src="inspector.js" defer="true"></script>
+  <script type="application/javascript" src="resource://devtools/client/inspector/inspector.js" defer="true"></script>
 </head>
 <body class="theme-body" role="application">
   <div class="inspector-responsive-container theme-body inspector"
        data-localization-bundle="devtools/client/locales/inspector.properties">
 
     <!-- Main Panel Content -->
     <div id="inspector-main-content" class="devtools-main-content" style="visibility: hidden;">
       <!-- Toolbar -->
--- a/devtools/client/inspector/moz.build
+++ b/devtools/client/inspector/moz.build
@@ -17,16 +17,17 @@ DIRS += [
     'rules',
     'shared'
 ]
 
 DevToolsModules(
     'breadcrumbs.js',
     'inspector-commands.js',
     'inspector-search.js',
+    'inspector.js',
     'panel.js',
     'reducers.js',
     'store.js',
     'toolsidebar.js',
 )
 
 BROWSER_CHROME_MANIFESTS += ['test/browser.ini']
 
--- a/devtools/client/jar.mn
+++ b/devtools/client/jar.mn
@@ -6,22 +6,20 @@ 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/index.html (webconsole/index.html)
     content/webconsole/browserconsole.xul (webconsole/browserconsole.xul)
 *   content/scratchpad/index.xul (scratchpad/index.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/styleeditor/index.xul (styleeditor/index.xul)
 *   content/storage/index.xul (storage/index.xul)
-    content/inspector/inspector.js (inspector/inspector.js)
     content/inspector/markup/markup.xhtml (inspector/markup/markup.xhtml)
     content/inspector/animation-old/animation-controller.js (inspector/animation-old/animation-controller.js)
     content/inspector/animation-old/animation-panel.js (inspector/animation-old/animation-panel.js)
     content/inspector/animation-old/animation-inspector.xhtml (inspector/animation-old/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)
@@ -58,17 +56,16 @@ devtools.jar:
     content/webaudioeditor/views/inspector.js (webaudioeditor/views/inspector.js)
     content/webaudioeditor/views/properties.js (webaudioeditor/views/properties.js)
     content/webaudioeditor/views/automation.js (webaudioeditor/views/automation.js)
     content/performance/index.xul (performance/index.xul)
     content/performance/performance-controller.js (performance/performance-controller.js)
     content/performance/performance-view.js (performance/performance-view.js)
     content/performance-new/index.xhtml (performance-new/index.xhtml)
     content/performance-new/frame-script.js (performance-new/frame-script.js)
-    content/performance-new/initializer.js (performance-new/initializer.js)
     content/performance/views/overview.js (performance/views/overview.js)
     content/performance/views/toolbar.js (performance/views/toolbar.js)
     content/performance/views/details.js (performance/views/details.js)
     content/performance/views/details-abstract-subview.js (performance/views/details-abstract-subview.js)
     content/performance/views/details-waterfall.js (performance/views/details-waterfall.js)
     content/performance/views/details-js-call-tree.js (performance/views/details-js-call-tree.js)
     content/performance/views/details-js-flamegraph.js (performance/views/details-js-flamegraph.js)
     content/performance/views/details-memory-call-tree.js (performance/views/details-memory-call-tree.js)
@@ -87,19 +84,17 @@ devtools.jar:
     content/framework/connect/connect.css (framework/connect/connect.css)
     content/framework/connect/connect.js (framework/connect/connect.js)
     content/shared/widgets/graphs-frame.xhtml (shared/widgets/graphs-frame.xhtml)
     content/shared/widgets/cubic-bezier.css (shared/widgets/cubic-bezier.css)
     content/shared/widgets/filter-widget.css (shared/widgets/filter-widget.css)
     content/shared/widgets/spectrum.css (shared/widgets/spectrum.css)
     content/aboutdebugging/aboutdebugging.xhtml (aboutdebugging/aboutdebugging.xhtml)
     content/aboutdebugging/aboutdebugging.css (aboutdebugging/aboutdebugging.css)
-    content/aboutdebugging/initializer.js (aboutdebugging/initializer.js)
     content/responsive.html/index.xhtml (responsive.html/index.xhtml)
-    content/responsive.html/index.js (responsive.html/index.js)
     content/dom/index.html (dom/index.html)
     content/dom/main.js (dom/main.js)
     content/accessibility/index.html (accessibility/index.html)
     content/accessibility/main.js (accessibility/main.js)
 %   skin devtools classic/1.0 %skin/
     skin/devtools-browser.css (themes/devtools-browser.css)
     skin/dark-theme.css (themes/dark-theme.css)
     skin/light-theme.css (themes/light-theme.css)
@@ -287,20 +282,18 @@ devtools.jar:
     content/netmonitor/src/assets/styles/RequestList.css (netmonitor/src/assets/styles/RequestList.css)
     content/netmonitor/src/assets/styles/StatisticsPanel.css (netmonitor/src/assets/styles/StatisticsPanel.css)
     content/netmonitor/src/assets/styles/StatusBar.css (netmonitor/src/assets/styles/StatusBar.css)
     content/netmonitor/src/assets/styles/Toolbar.css (netmonitor/src/assets/styles/Toolbar.css)
     content/netmonitor/src/assets/styles/variables.css (netmonitor/src/assets/styles/variables.css)
     content/netmonitor/src/assets/icons/play.svg (netmonitor/src/assets/icons/play.svg)
     content/netmonitor/src/assets/icons/drop-down.svg (netmonitor/src/assets/icons/drop-down.svg)
     content/netmonitor/index.html (netmonitor/index.html)
-    content/netmonitor/initializer.js (netmonitor/initializer.js)
 
     # Application panel
     content/application/index.html (application/index.html)
-    content/application/initializer.js (application/initializer.js)
 
     # Devtools-components
     skin/images/devtools-components/arrow.svg (themes/images/devtools-components/arrow.svg)
 
     # Devtools-reps
     skin/images/devtools-reps/jump-definition.svg (themes/images/devtools-reps/jump-definition.svg)
     skin/images/devtools-reps/open-inspector.svg (themes/images/devtools-reps/open-inspector.svg)
--- a/devtools/client/netmonitor/index.html
+++ b/devtools/client/netmonitor/index.html
@@ -4,11 +4,11 @@
 <!DOCTYPE html>
 <html dir="">
   <head>
     <link rel="stylesheet" href="chrome://devtools/content/netmonitor/src/assets/styles/netmonitor.css"/>
     <script src="chrome://devtools/content/shared/theme-switching.js"></script>
   </head>
   <body class="theme-body" role="application">
     <div id="mount"></div>
-    <script src="initializer.js"></script>
+    <script src="resource://devtools/client/netmonitor/initializer.js"></script>
   </body>
 </html>
--- a/devtools/client/netmonitor/moz.build
+++ b/devtools/client/netmonitor/moz.build
@@ -2,16 +2,17 @@
 # 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/.
 
 DIRS += [
     'src'
 ]
 
 DevToolsModules(
+    'initializer.js',
     'panel.js'
 )
 
 XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini']
 
 BROWSER_CHROME_MANIFESTS += ['test/browser.ini']
 
 with Files('**'):
--- a/devtools/client/performance-new/index.xhtml
+++ b/devtools/client/performance-new/index.xhtml
@@ -11,15 +11,15 @@
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 <html xmlns="http://www.w3.org/1999/xhtml" dir="">
   <head>
     <link rel="stylesheet" href="chrome://devtools/skin/widgets.css" type="text/css"/>
     <link rel="stylesheet" href="chrome://devtools/skin/perf.css" type="text/css"/>
   </head>
   <body class="theme-body">
     <div id="root"></div>
-    <script type="application/javascript" src="initializer.js"></script>
+    <script type="application/javascript" src="resource://devtools/client/performance-new/initializer.js"></script>
     <script type="application/javascript"
             src="chrome://devtools/content/shared/theme-switching.js"
             defer="true">
     </script>
   </body>
 </html>
--- a/devtools/client/performance-new/moz.build
+++ b/devtools/client/performance-new/moz.build
@@ -5,16 +5,17 @@
 
 DIRS += [
     'components',
     'store',
 ]
 
 DevToolsModules(
     'browser.js',
+    'initializer.js',
     'panel.js',
     'utils.js',
 )
 
 MOCHITEST_CHROME_MANIFESTS += ['test/chrome/chrome.ini']
 
 with Files('**'):
     BUG_COMPONENT = ('DevTools', 'Performance Tools (Profiler/Timeline)')
--- a/devtools/client/responsive.html/index.xhtml
+++ b/devtools/client/responsive.html/index.xhtml
@@ -6,14 +6,14 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
     <link rel="stylesheet" type="text/css"
           href="resource://devtools/client/responsive.html/index.css"/>
     <script type="application/javascript"
             src="chrome://devtools/content/shared/theme-switching.js"></script>
     <script type="application/javascript"
-            src="./index.js"></script>
+            src="resource://devtools/client/responsive.html/index.js"></script>
   </head>
   <body class="theme-body" role="application">
     <div id="root"/>
   </body>
 </html>
--- a/devtools/client/responsive.html/moz.build
+++ b/devtools/client/responsive.html/moz.build
@@ -13,16 +13,17 @@ DIRS += [
     'utils',
 ]
 
 DevToolsModules(
     'app.js',
     'commands.js',
     'constants.js',
     'index.css',
+    'index.js',
     'manager.js',
     'reducers.js',
     'responsive-ua.css',
     'store.js',
     'types.js',
 )
 
 XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini']
--- a/devtools/client/scratchpad/index.xul
+++ b/devtools/client/scratchpad/index.xul
@@ -24,17 +24,17 @@
         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"/>
+<script type="application/javascript" src="resource://devtools/client/scratchpad/scratchpad.js"/>
 
 #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>
--- a/devtools/client/scratchpad/moz.build
+++ b/devtools/client/scratchpad/moz.build
@@ -3,14 +3,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/.
 
 DevToolsModules(
     'panel.js',
     'scratchpad-commands.js',
     'scratchpad-manager.jsm',
+    'scratchpad.js',
 )
 
 BROWSER_CHROME_MANIFESTS += ['test/browser.ini']
 
 with Files('**'):
     BUG_COMPONENT = ('DevTools', 'Scratchpad')