Backed out changeset f1c44a2eb604 (bug 1594014) for eslint failure at /content/extensions.js on a CLOSED TREE.
authorGurzau Raul <rgurzau@mozilla.com>
Sun, 17 Nov 2019 11:11:49 +0200
changeset 502357 8b55cc4b13369229e7cf0b81310eef1f79e9ed93
parent 502356 de185bb7bdd5c8347c41560dc830da32895c4234
child 502358 e6e016592c81510432cdaf2d159f363dd4b9eb45
push id100785
push userrgurzau@mozilla.com
push dateSun, 17 Nov 2019 09:12:38 +0000
treeherderautoland@8b55cc4b1336 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1594014
milestone72.0a1
backs outf1c44a2eb6041bc202b27d9d3a65254de00285af
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
Backed out changeset f1c44a2eb604 (bug 1594014) for eslint failure at /content/extensions.js on a CLOSED TREE.
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
@@ -97,16 +97,24 @@ 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) {
@@ -1528,16 +1536,38 @@ 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,16 +27,41 @@
     <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)