Bug 1594014 - Remove unused options UI helpers from extensions.xul r=rpl
authorMark Striemer <mstriemer@mozilla.com>
Mon, 18 Nov 2019 20:03:14 +0000
changeset 502467 975df36124a5bc2fbaf43c9ec0bdc3b93048d49c
parent 502466 32913780ebb3fae5fce3499e90692332cde39578
child 502468 c1d9e657897e5e7ef32227d8a0c8c7dfc9d13de6
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)
reviewersrpl
bugs1594014
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 1594014 - Remove unused options UI helpers from extensions.xul r=rpl Differential Revision: https://phabricator.services.mozilla.com/D53104
toolkit/mozapps/extensions/content/extensions.js
toolkit/mozapps/extensions/content/extensions.xul
toolkit/mozapps/extensions/jar.mn
--- a/toolkit/mozapps/extensions/content/extensions.js
+++ b/toolkit/mozapps/extensions/content/extensions.js
@@ -4,19 +4,16 @@
 
 "use strict";
 
 /* import-globals-from ../../../content/customElements.js */
 /* import-globals-from aboutaddonsCommon.js */
 /* globals ProcessingInstruction */
 /* exported loadView */
 
-const { DeferredTask } = ChromeUtils.import(
-  "resource://gre/modules/DeferredTask.jsm"
-);
 const { AddonManager } = ChromeUtils.import(
   "resource://gre/modules/AddonManager.jsm"
 );
 
 ChromeUtils.defineModuleGetter(
   this,
   "AMTelemetry",
   "resource://gre/modules/AddonManager.jsm"
@@ -97,24 +94,16 @@ Object.defineProperty(this, "gIsInitiali
 function initialize(event) {
   // XXXbz this listener gets _all_ load events for all nodes in the
   // document... but relies on not being called "too early".
   if (event.target instanceof ProcessingInstruction) {
     return;
   }
   document.removeEventListener("load", initialize, true);
 
-  let contentAreaContextMenu = document.getElementById(
-    "contentAreaContextMenu"
-  );
-  contentAreaContextMenu.addEventListener("popupshowing", function(event) {
-    Cu.reportError("This dummy menupopup is not supposed to be shown");
-    return false;
-  });
-
   let addonPage = document.getElementById("addons-page");
   addonPage.addEventListener("dragenter", function(event) {
     gDragDrop.onDragOver(event);
   });
   addonPage.addEventListener("dragover", function(event) {
     gDragDrop.onDragOver(event);
   });
   addonPage.addEventListener("drop", function(event) {
@@ -1536,38 +1525,16 @@ var gDragDrop = {
           document.documentURIObject,
           install
         );
       }
     }
   },
 };
 
-// Force the options_ui remote browser to recompute window.mozInnerScreenX and
-// window.mozInnerScreenY when the "addon details" page has been scrolled
-// (See Bug 1390445 for rationale).
-{
-  const UPDATE_POSITION_DELAY = 100;
-
-  const updatePositionTask = new DeferredTask(() => {
-    const browser = document.getElementById("addon-options");
-    if (browser && browser.isRemoteBrowser) {
-      browser.frameLoader.requestUpdatePosition();
-    }
-  }, UPDATE_POSITION_DELAY);
-
-  window.addEventListener(
-    "scroll",
-    () => {
-      updatePositionTask.arm();
-    },
-    true
-  );
-}
-
 const addonTypes = new Set([
   "extension",
   "theme",
   "plugin",
   "dictionary",
   "locale",
 ]);
 const htmlViewOpts = {
--- a/toolkit/mozapps/extensions/content/extensions.xul
+++ b/toolkit/mozapps/extensions/content/extensions.xul
@@ -27,41 +27,16 @@
     <xhtml:link rel="localization" href="branding/brand.ftl"/>
     <xhtml:link rel="localization" href="toolkit/about/aboutAddons.ftl"/>
   </linkset>
 
   <script src="chrome://mozapps/content/extensions/aboutaddonsCommon.js"/>
   <script src="chrome://mozapps/content/extensions/extensions.js"/>
   <script src="chrome://mozapps/content/extensions/abuse-report-frame.js"/>
 
-  <popupset>
-    <menulist popuponly="true" id="ContentSelectDropdown" hidden="true">
-      <menupopup rolluponmousewheel="true"
-                 activateontab="true" position="after_start"
-                 level="parent"
-#ifdef XP_WIN
-                 consumeoutsideclicks="false" ignorekeys="shortcuts"
-#endif
-        />
-    </menulist>
-
-    <panel is="autocomplete-richlistbox-popup"
-           type="autocomplete-richlistbox"
-           id="PopupAutoComplete"
-           noautofocus="true"
-           hidden="true"
-           norolluponanchor="true"
-           nomaxresults="true" />
-
-    <menupopup id="contentAreaContextMenu">
-      <!-- a dummy element used to forward the context menu related to the extension's
-           options page XUL browsers to the context menu defined in the parent chrome window -->
-    </menupopup>
-  </popupset>
-
   <stack id="main-page-stack" flex="1">
   <hbox id="main-page-content" flex="1">
     <vbox id="category-box">
       <!-- category list -->
       <richlistbox id="categories" flex="1">
         <richlistitem id="category-discover" value="addons://discover/"
                       class="category"
                       is="addon-category"
--- a/toolkit/mozapps/extensions/jar.mn
+++ b/toolkit/mozapps/extensions/jar.mn
@@ -1,16 +1,16 @@
 # 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/.
 
 toolkit.jar:
 % content mozapps %content/mozapps/
 #ifndef MOZ_FENNEC
-* content/mozapps/extensions/extensions.xul                     (content/extensions.xul)
+  content/mozapps/extensions/extensions.xul                     (content/extensions.xul)
   content/mozapps/extensions/extensions.css                     (content/extensions.css)
   content/mozapps/extensions/extensions.js                      (content/extensions.js)
   content/mozapps/extensions/blocklist.xul                      (content/blocklist.xul)
   content/mozapps/extensions/blocklist.js                       (content/blocklist.js)
   content/mozapps/extensions/pluginPrefs.xul                    (content/pluginPrefs.xul)
   content/mozapps/extensions/pluginPrefs.js                     (content/pluginPrefs.js)
   content/mozapps/extensions/OpenH264-license.txt               (content/OpenH264-license.txt)
   content/mozapps/extensions/aboutaddons.html                   (content/aboutaddons.html)