Backed out changeset c4d3e6cd9898 (bug 1579608) for MozMill failures. a=backout
authorJorg K <jorgk@jorgk.com>
Wed, 23 Oct 2019 19:55:44 +0200
changeset 36466 75cbf92362b30d3cdbe6d86e27af4e05986270fd
parent 36465 c4d3e6cd9898a5647ed36e095b61025bc4f34e2f
child 36467 6e38217c8fd63f3e65f168a2462b79b7f3b91454
push id2534
push userclokep@gmail.com
push dateMon, 02 Dec 2019 19:52:51 +0000
treeherdercomm-beta@055c50840778 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1579608
backs outc4d3e6cd9898a5647ed36e095b61025bc4f34e2f
Backed out changeset c4d3e6cd9898 (bug 1579608) for MozMill failures. a=backout
mail/components/preferences/aboutPreferences.xul
mail/components/preferences/jar.mn
mail/components/preferences/preferences.js
mail/components/preferences/preferences.xul
mail/components/preferences/test/browser/browser_openPreferences.js
mail/test/mozmill/shared-modules/PrefTabHelpers.jsm
rename from mail/components/preferences/preferences.xul
rename to mail/components/preferences/aboutPreferences.xul
--- a/mail/components/preferences/preferences.xul
+++ b/mail/components/preferences/aboutPreferences.xul
@@ -7,17 +7,17 @@
 <?xml-stylesheet href="chrome://global/skin/global.css"?>
 <?xml-stylesheet href="chrome://messenger/skin/input-fields.css"?>
 <?xml-stylesheet href="chrome://messenger/content/messenger.css"?>
 <?xml-stylesheet href="chrome://messenger/content/preferences/handlers.css"?>
 <?xml-stylesheet href="chrome://messenger/skin/preferences/applications.css"?>
 <?xml-stylesheet href="chrome://global/skin/in-content/common.css"?>
 <?xml-stylesheet href="chrome://messenger/skin/preferences/preferences.css"?>
 
-<!DOCTYPE window [
+<!DOCTYPE preftab [
 <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
 %brandDTD;
 <!ENTITY % preferencesDTD SYSTEM "chrome://messenger/locale/preferences/preferences.dtd">
 %preferencesDTD;
 <!ENTITY % generalDTD SYSTEM "chrome://messenger/locale/preferences/general.dtd" >
 %generalDTD;
 <!ENTITY % displayDTD SYSTEM "chrome://messenger/locale/preferences/display.dtd" >
 %displayDTD;
@@ -48,22 +48,22 @@
 #endif
 #endif
 #ifdef MOZ_UPDATER
 <!ENTITY % aboutDialogDTD SYSTEM "chrome://messenger/locale/aboutDialog.dtd" >
 %aboutDialogDTD;
 #endif
 ]>
 
-<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
-        xmlns:html="http://www.w3.org/1999/xhtml"
-        id="MailPreferences"
-        role="document"
-        windowtype="Mail:Preferences"
-        csp="default-src chrome:; script-src chrome: 'unsafe-inline'; img-src chrome: moz-icon: https: data:; style-src chrome: data: 'unsafe-inline'; object-src 'none'"
+<preftab id="MailPreferences" flex="1"
+         windowtype="Mail:Preferences"
+         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+         xmlns:xhtml="http://www.w3.org/1999/xhtml"
+         xmlns:html="http://www.w3.org/1999/xhtml"
+         onload="gSubDialog.init();"
 #ifdef XP_WIN
          title="&prefWindow.titleWin;">
 #endif
 #ifdef XP_UNIX
 #ifndef XP_MACOSX
          title="&prefWindow.titleGNOME;">
 #else
          title="&prefWindow.titleMAC;">
@@ -137,9 +137,9 @@
       </vbox>
     </vbox>
   </stack>
 
   <script src="chrome://global/content/globalOverlay.js"/>
   <script src="chrome://communicator/content/contentAreaClick.js"/>
   <script src="chrome://messenger/content/preferences/preferences.js"/>
   <script src="chrome://messenger/content/preferences/subdialogs.js"/>
-</window>
+</preftab>
--- a/mail/components/preferences/jar.mn
+++ b/mail/components/preferences/jar.mn
@@ -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/.
 
 messenger.jar:
-*   content/messenger/preferences/preferences.xul
+*   content/messenger/preferences/aboutPreferences.xul
     content/messenger/preferences/preferences.js
     content/messenger/preferences/preferencesTab.js
     content/messenger/preferences/general.js
 #ifdef XP_MACOSX
     content/messenger/preferences/dockoptions.js
     content/messenger/preferences/dockoptions.xul
 #endif
     content/messenger/preferences/chat.js
--- a/mail/components/preferences/preferences.js
+++ b/mail/components/preferences/preferences.js
@@ -1,14 +1,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/. */
 
 /* import-globals-from ../../../../toolkit/content/preferencesBindings.js */
-/* import-globals-from subdialogs.js */
+
+Preferences.forceEnableInstantApply();
 
 var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 var { AppConstants } = ChromeUtils.import(
   "resource://gre/modules/AppConstants.jsm"
 );
 var { MailServices } = ChromeUtils.import(
   "resource:///modules/MailServices.jsm"
 );
@@ -21,24 +22,16 @@ var prefPanes = [...document.getElements
 var selector = document.getElementById("selector");
 
 ChromeUtils.defineModuleGetter(
   this,
   "AddonManager",
   "resource://gre/modules/AddonManager.jsm"
 );
 
-document.addEventListener("DOMContentLoaded", init_all, { once: true });
-
-function init_all() {
-  Preferences.forceEnableInstantApply();
-
-  gSubDialog.init();
-}
-
 (function() {
   for (let pane of prefPanes) {
     if (
       pane.id == "paneChat" &&
       !Services.prefs.getBoolPref("mail.chat.enabled")
     ) {
       continue;
     }
@@ -69,19 +62,17 @@ function init_all() {
     }, 1);
   }
 
   if (prefPanes.length == 1) {
     selector.setAttribute("collapsed", "true");
   }
 
   window.addEventListener("DOMContentLoaded", function() {
-    let lastSelected = document
-      .getElementById("paneDeck")
-      .getAttribute("lastSelected");
+    let lastSelected = document.documentElement.getAttribute("lastSelected");
     if (lastSelected && document.getElementById(lastSelected)) {
       showPane(lastSelected);
     } else {
       showPane(prefPanes[0].id);
     }
   });
 
   document.documentElement.addEventListener("keydown", function(event) {
@@ -125,21 +116,18 @@ function showPane(paneID) {
     currentlySelected.removeAttribute("selected");
   }
 
   selector.value = paneID;
   pane.setAttribute("selected", "true");
   pane.dispatchEvent(new CustomEvent("paneSelected", { bubbles: true }));
   document.getElementById("preferencesContainer").scrollTo(0, 0);
 
-  document.getElementById("paneDeck").setAttribute("lastSelected", paneID);
-  Services.xulStore.persist(
-    document.getElementById("paneDeck"),
-    "lastSelected"
-  );
+  document.documentElement.setAttribute("lastSelected", paneID);
+  Services.xulStore.persist(document.documentElement, "lastSelected");
 }
 
 /**
  * Selects the specified preferences pane
  *
  * @param prefWindow          the prefwindow element to operate on
  * @param paneID              ID of prefpane to select
  * @param scrollPaneTo        ID of the element to scroll into view
--- a/mail/components/preferences/test/browser/browser_openPreferences.js
+++ b/mail/components/preferences/test/browser/browser_openPreferences.js
@@ -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/. */
 
 function getStoredLastSelected() {
   return Services.xulStore.getValue(
     "about:preferences",
-    "paneDeck",
+    "MailPreferences",
     "lastSelected"
   );
 }
 
 add_task(async () => {
   // Check that openPreferencesTab with no arguments and no stored value opens the first pane.
   Services.xulStore.removeDocument("about:preferences");
 
--- a/mail/test/mozmill/shared-modules/PrefTabHelpers.jsm
+++ b/mail/test/mozmill/shared-modules/PrefTabHelpers.jsm
@@ -17,20 +17,20 @@ var fdh = ChromeUtils.import(
   "resource://testing-common/mozmill/FolderDisplayHelpers.jsm"
 );
 var cth = ChromeUtils.import(
   "resource://testing-common/mozmill/ContentTabHelpers.jsm"
 );
 
 /**
  * Open the preferences tab with the given pane displayed. The pane needs to
- * be one of the prefpane ids in mail/components/preferences/preferences.xul.
+ * be one of the prefpane ids in mail/components/preferences/aboutPreferences.xul.
  *
  * @param aPaneID The ID of the pref pane to display (see
- *     mail/components/preferences/preferences.xul for valid IDs.)
+ *     mail/components/preferences/aboutPreferences.xul for valid IDs.)
  */
 function open_pref_tab(aPaneID) {
   let tab = cth.open_content_tab_with_click(
     function() {
       fdh.mc.window.openOptionsDialog(aPaneID);
     },
     "about:preferences",
     fdh.mc,