Backed out changeset 2768a8779068 (bug 1356507) for eslint failure at advanced.js:72. r=backout
authorSebastian Hengst <archaeopteryx@coole-files.de>
Wed, 03 May 2017 11:10:26 +0200
changeset 572017 f97d552d92a0529919e9f9957ee5e92dae1d3484
parent 572016 2768a87790681efc0fe64df26c363ef7381759a6
child 572018 4d6cbe2ebbd1ea76c1d3118629f271d3431c665a
push id56986
push userbmo:tcampbell@mozilla.com
push dateWed, 03 May 2017 17:38:15 +0000
reviewersbackout
bugs1356507
milestone55.0a1
backs out2768a87790681efc0fe64df26c363ef7381759a6
Backed out changeset 2768a8779068 (bug 1356507) for eslint failure at advanced.js:72. r=backout
browser/base/content/aboutDialog-appUpdater.js
browser/components/preferences/in-content/advanced.js
browser/components/preferences/in-content/advanced.xul
browser/components/preferences/in-content/preferences.xul
browser/locales/en-US/chrome/browser/aboutDialog.dtd
browser/locales/en-US/chrome/browser/preferences/advanced.dtd
browser/themes/shared/incontentprefs/preferences.inc.css
--- a/browser/base/content/aboutDialog-appUpdater.js
+++ b/browser/base/content/aboutDialog-appUpdater.js
@@ -1,14 +1,13 @@
 /* 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/. */
 
-// Note: this file is included in aboutDialog.xul and preferences/advanced.xul
-// if MOZ_UPDATER is defined.
+// Note: this file is included in aboutDialog.xul if MOZ_UPDATER is defined.
 
 /* import-globals-from aboutDialog.js */
 
 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
 Components.utils.import("resource://gre/modules/DownloadUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "UpdateUtils",
                                   "resource://gre/modules/UpdateUtils.jsm");
--- a/browser/components/preferences/in-content/advanced.js
+++ b/browser/components/preferences/in-content/advanced.js
@@ -15,66 +15,17 @@ var gAdvancedPane = {
   init() {
     function setEventListener(aId, aEventType, aCallback) {
       document.getElementById(aId)
               .addEventListener(aEventType, aCallback.bind(gAdvancedPane));
     }
 
     this._inited = true;
 
-    let version = AppConstants.MOZ_APP_VERSION_DISPLAY;
-
-    // Include the build ID if this is an "a#" (nightly) build
-    if (/a\d+$/.test(version)) {
-      let buildID = Services.appinfo.appBuildID;
-      let year = buildID.slice(0, 4);
-      let month = buildID.slice(4, 6);
-      let day = buildID.slice(6, 8);
-      version += ` (${year}-${month}-${day})`;
-    }
-
-    // Append "(32-bit)" or "(64-bit)" build architecture to the version number:
-    let bundle = Services.strings.createBundle("chrome://browser/locale/browser.properties");
-    let archResource = Services.appinfo.is64Bit
-                       ? "aboutDialog.architecture.sixtyFourBit"
-                       : "aboutDialog.architecture.thirtyTwoBit";
-    let arch = bundle.GetStringFromName(archResource);
-    version += ` (${arch})`;
-
-    document.getElementById("version").textContent = version;
-
-    // Show a release notes link if we have a URL.
-    let relNotesLink = document.getElementById("releasenotes");
-    let relNotesPrefType = Services.prefs.getPrefType("app.releaseNotesURL");
-    if (relNotesPrefType != Services.prefs.PREF_INVALID) {
-      let relNotesURL = Services.urlFormatter.formatURLPref("app.releaseNotesURL");
-      if (relNotesURL != "about:blank") {
-        relNotesLink.href = relNotesURL;
-        relNotesLink.hidden = false;
-      }
-    }
-
-    let distroId = Services.prefs.getCharPref("distribution.id", "");
-    if (distroId) {
-      let distroVersion = Services.prefs.getCharPref("distribution.version");
-
-      let distroIdField = document.getElementById("distributionId");
-      distroIdField.value = distroId + " - " + distroVersion;
-      distroIdField.hidden = false;
-
-      let distroAbout = Services.prefs.getStringPref("distribution.about", "");
-      if (distroAbout) {
-        let distroField = document.getElementById("distribution");
-        distroField.value = distroAbout;
-        distroField.hidden = false;
-      }
-    }
-
     if (AppConstants.MOZ_UPDATER) {
-      gAppUpdater = new appUpdater();
       let onUnload = () => {
         window.removeEventListener("unload", onUnload);
         Services.prefs.removeObserver("app.update.", this);
       };
       window.addEventListener("unload", onUnload);
       Services.prefs.addObserver("app.update.", this);
       this.updateReadPrefs();
       setEventListener("updateRadioGroup", "command",
--- a/browser/components/preferences/in-content/advanced.xul
+++ b/browser/components/preferences/in-content/advanced.xul
@@ -1,18 +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/.
 
 <!-- Advanced panel -->
 
-#ifdef MOZ_UPDATER
-  <script type="application/javascript" src="chrome://browser/content/aboutDialog-appUpdater.js"/>
-#endif
-
 <script type="application/javascript"
         src="chrome://browser/content/preferences/in-content/advanced.js"/>
 
 <preferences id="advancedPreferences" hidden="true" data-category="paneAdvanced">
   <preference id="browser.preferences.advanced.selectedTabIndex"
               name="browser.preferences.advanced.selectedTabIndex"
               type="int"/>
 
@@ -51,140 +47,42 @@
       hidden="true"
       data-category="paneAdvanced">
   <label class="header-name" flex="1">&paneUpdates.title;</label>
 </hbox>
 
 <!-- Update -->
 <groupbox id="updateApp" data-category="paneAdvanced" hidden="true">
   <caption><label>&updateApplication.label;</label></caption>
+#ifdef MOZ_UPDATER
+  <description>&updateApplication.description;</description>
   <hbox align="start">
     <vbox flex="1">
-      <description>
-        &updateApplication.version.pre;<label id="version"/>&updateApplication.version.post;
-        <label id="releasenotes" class="learnMore text-link" hidden="true">&releaseNotes.link;</label>
-      </description>
-      <description id="distribution" class="text-blurb" hidden="true"/>
-      <description id="distributionId" class="text-blurb" hidden="true"/>
+      <radiogroup id="updateRadioGroup">
+        <radio id="autoDesktop"
+               value="auto"
+               label="&updateAuto2.label;"
+               accesskey="&updateAuto2.accesskey;"/>
+        <radio value="checkOnly"
+              label="&updateCheckChoose2.label;"
+              accesskey="&updateCheckChoose2.accesskey;"/>
+        <radio value="manual"
+              label="&updateManual2.label;"
+              accesskey="&updateManual2.accesskey;"/>
+      </radiogroup>
     </vbox>
-#ifdef MOZ_UPDATER
     <spacer flex="1"/>
     <vbox>
       <button id="showUpdateHistory"
               class="accessory-button"
               label="&updateHistory2.label;"
               accesskey="&updateHistory2.accesskey;"
               preference="app.update.disable_button.showUpdateHistory"/>
     </vbox>
-#endif
   </hbox>
-#ifdef MOZ_UPDATER
-  <vbox id="updateBox">
-    <deck id="updateDeck" orient="vertical">
-      <hbox id="checkForUpdates" align="center">
-        <spacer flex="1"/>
-        <button id="checkForUpdatesButton"
-                label="&update.checkForUpdatesButton.label;"
-                accesskey="&update.checkForUpdatesButton.accesskey;"
-                oncommand="gAppUpdater.checkForUpdates();"/>
-      </hbox>
-      <hbox id="downloadAndInstall" align="center">
-        <spacer flex="1"/>
-        <button id="downloadAndInstallButton"
-                oncommand="gAppUpdater.startDownload();"/>
-                <!-- label and accesskey will be filled by JS -->
-      </hbox>
-      <hbox id="apply" align="center">
-        <spacer flex="1"/>
-        <button id="updateButton"
-                label="&update.updateButton.label3;"
-                accesskey="&update.updateButton.accesskey;"
-                oncommand="gAppUpdater.buttonRestartAfterDownload();"/>
-      </hbox>
-      <hbox id="checkingForUpdates" align="center">
-        <image class="update-throbber"/><label>&update.checkingForUpdates;</label>
-        <spacer flex="1"/>
-        <button label="&update.checkForUpdatesButton.label;"
-                accesskey="&update.checkForUpdatesButton.accesskey;"
-                disabled="true"/>
-      </hbox>
-      <hbox id="downloading" align="center">
-        <image class="update-throbber"/><label>&update.downloading.start;</label><label id="downloadStatus"/><label>&update.downloading.end;</label>
-      </hbox>
-      <hbox id="applying" align="center">
-        <image class="update-throbber"/><label>&update.applying;</label>
-      </hbox>
-      <hbox id="downloadFailed" align="center">
-        <label>&update.failed.start;</label><label id="failedLink" class="text-link">&update.failed.linkText;</label><label>&update.failed.end;</label>
-        <spacer flex="1"/>
-        <button label="&update.checkForUpdatesButton.label;"
-                accesskey="&update.checkForUpdatesButton.accesskey;"
-                oncommand="gAppUpdater.checkForUpdates();"/>
-      </hbox>
-      <hbox id="adminDisabled" align="center">
-        <label>&update.adminDisabled;</label>
-        <spacer flex="1"/>
-        <button label="&update.checkForUpdatesButton.label;"
-                accesskey="&update.checkForUpdatesButton.accesskey;"
-                disabled="true"/>
-      </hbox>
-      <hbox id="noUpdatesFound" align="center">
-        <label>&update.noUpdatesFound;</label>
-        <spacer flex="1"/>
-        <button label="&update.checkForUpdatesButton.label;"
-                accesskey="&update.checkForUpdatesButton.accesskey;"
-                oncommand="gAppUpdater.checkForUpdates();"/>
-      </hbox>
-      <hbox id="otherInstanceHandlingUpdates" align="center">
-        <label>&update.otherInstanceHandlingUpdates;</label>
-        <spacer flex="1"/>
-        <button label="&update.checkForUpdatesButton.label;"
-                accesskey="&update.checkForUpdatesButton.accesskey;"
-                disabled="true"/>
-      </hbox>
-      <hbox id="manualUpdate" align="center">
-        <label>&update.manual.start;</label><label id="manualLink" class="text-link"/><label>&update.manual.end;</label>
-        <spacer flex="1"/>
-        <button label="&update.checkForUpdatesButton.label;"
-                accesskey="&update.checkForUpdatesButton.accesskey;"
-                disabled="true"/>
-      </hbox>
-      <hbox id="unsupportedSystem" align="center">
-        <label>&update.unsupported.start;</label><label id="unsupportedLink" class="text-link">&update.unsupported.linkText;</label><label>&update.unsupported.end;</label>
-        <spacer flex="1"/>
-        <button label="&update.checkForUpdatesButton.label;"
-                accesskey="&update.checkForUpdatesButton.accesskey;"
-                disabled="true"/>
-      </hbox>
-      <hbox id="restarting" align="center">
-        <label>&update.restarting;</label>
-        <spacer flex="1"/>
-        <button label="&update.updateButton.label3;"
-                accesskey="&update.updateButton.accesskey;"
-                disabled="true"/>
-      </hbox>
-    </deck>
-  </vbox>
-#endif
-
-  <separator/>
-#ifdef MOZ_UPDATER
-  <description>&updateApplication.description;</description>
-  <radiogroup id="updateRadioGroup">
-    <radio id="autoDesktop"
-           value="auto"
-           label="&updateAuto2.label;"
-           accesskey="&updateAuto2.accesskey;"/>
-    <radio value="checkOnly"
-          label="&updateCheckChoose2.label;"
-          accesskey="&updateCheckChoose2.accesskey;"/>
-    <radio value="manual"
-          label="&updateManual2.label;"
-          accesskey="&updateManual2.accesskey;"/>
-  </radiogroup>
 #ifdef MOZ_MAINTENANCE_SERVICE
   <checkbox id="useService"
             label="&useService.label;"
             accesskey="&useService.accesskey;"
             preference="app.update.service.enabled"/>
 #endif
 #endif
   <checkbox id="enableSearchUpdate"
--- a/browser/components/preferences/in-content/preferences.xul
+++ b/browser/components/preferences/in-content/preferences.xul
@@ -32,18 +32,16 @@
 <!ENTITY % sanitizeDTD SYSTEM "chrome://browser/locale/sanitize.dtd">
 <!ENTITY % mainDTD SYSTEM "chrome://browser/locale/preferences/main.dtd">
 <!ENTITY % aboutHomeDTD SYSTEM "chrome://browser/locale/aboutHome.dtd">
 <!ENTITY % contentDTD SYSTEM "chrome://browser/locale/preferences/content.dtd">
 <!ENTITY % applicationsDTD SYSTEM
   "chrome://browser/locale/preferences/applications.dtd">
 <!ENTITY % advancedDTD SYSTEM
   "chrome://browser/locale/preferences/advanced.dtd">
-<!ENTITY % aboutDialogDTD SYSTEM "chrome://browser/locale/aboutDialog.dtd" >
-%aboutDialogDTD;
 %brandDTD;
 %globalPreferencesDTD;
 %preferencesDTD;
 %privacyDTD;
 %tabsDTD;
 %searchDTD;
 %syncBrandDTD;
 %syncDTD;
--- a/browser/locales/en-US/chrome/browser/aboutDialog.dtd
+++ b/browser/locales/en-US/chrome/browser/aboutDialog.dtd
@@ -1,17 +1,13 @@
 <!-- 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/.  -->
 <!ENTITY aboutDialog.title          "About &brandFullName;">
 
-<!-- LOCALIZATION NOTE (update.*):
-# These strings are also used in the update pane of preferences.
-# See about:preferences#advanced.
--->
 <!-- LOCALIZATION NOTE (update.checkForUpdatesButton.*, update.updateButton.*):
 # Only one button is present at a time.
 # The button when displayed is located directly under the Firefox version in
 # the about dialog (see bug 596813 for screenshots).
 -->
 <!ENTITY update.checkForUpdatesButton.label       "Check for updates">
 <!ENTITY update.checkForUpdatesButton.accesskey   "C">
 <!ENTITY update.updateButton.label3               "Restart to update &brandShorterName;">
@@ -90,17 +86,17 @@
      update.unsupported.end all go into one line with linkText being wrapped in
      an anchor that links to a site to provide additional information regarding
      why the system is no longer supported. As this is all in one line, try to
      make the localized text short (see bug 843497 for screenshots). -->
 <!ENTITY update.unsupported.start    "You can not perform further updates on this system. ">
 <!ENTITY update.unsupported.linkText "Learn more">
 <!ENTITY update.unsupported.end      "">
 
-<!-- LOCALIZATION NOTE (update.downloading.start,update.downloading.end): update.downloading.start and
+<!-- LOCALIZATION NOTE (update.downloading.start,update.downloading.end): update.downloading.start and 
      update.downloading.end all go into one line, with the amount downloaded inserted in between. As this
      is all in one line, try to make the localized text short (see bug 596813 for screenshots). The — is
      the "em dash" (long dash).
      example: Downloading update — 111 KB of 13 MB -->
 <!ENTITY update.downloading.start   "Downloading update — ">
 <!ENTITY update.downloading.end     "">
 
 <!ENTITY update.applying            "Applying update…">
--- a/browser/locales/en-US/chrome/browser/preferences/advanced.dtd
+++ b/browser/locales/en-US/chrome/browser/preferences/advanced.dtd
@@ -76,24 +76,17 @@
 <!ENTITY clearCacheNow.accesskey         "C">
 <!ENTITY clearOfflineAppCacheNow.label   "Clear Now">
 <!ENTITY clearOfflineAppCacheNow.accesskey "N">
 <!ENTITY overrideSmartCacheSize.label    "Override automatic cache management">
 <!ENTITY overrideSmartCacheSize.accesskey "O">
 
 <!ENTITY updateTab.label                 "Update">
 
-<!-- LOCALIZATION NOTE (updateApplication.label):
-  Strings from aboutDialog.dtd are displayed in this section of the preferences.
-  Please check for possible accesskey conflicts.
--->
 <!ENTITY updateApplication.label         "&brandShortName; Updates">
-<!-- LOCALIZATION NOTE (updateApplication.version.pre): include a trailing space as needed -->
-<!ENTITY updateApplication.version.pre   "Version ">
-<!ENTITY updateApplication.version.post  "">
 <!ENTITY updateApplication.description   "Allow &brandShortName; to">
 <!ENTITY updateAuto2.label               "Automatically install updates (recommended for improved security)">
 <!ENTITY updateAuto2.accesskey           "A">
 <!ENTITY updateCheckChoose2.label        "Check for updates but let you choose to install them">
 <!ENTITY updateCheckChoose2.accesskey    "C">
 <!ENTITY updateManual2.label             "Never check for updates (not recommended)">
 <!ENTITY updateManual2.accesskey         "N">
 
--- a/browser/themes/shared/incontentprefs/preferences.inc.css
+++ b/browser/themes/shared/incontentprefs/preferences.inc.css
@@ -563,33 +563,16 @@ description > html|a {
   .iOSLink {
     background-image: url("chrome://browser/skin/fxa/ios@2x.png");
   }
   .fxaFirefoxLogo {
     list-style-image: url(chrome://browser/skin/fxa/logo@2x.png);
   }
 }
 
-#updateDeck > hbox > label {
-  margin-inline-end: 5px ! important;
-}
-
-.update-throbber {
-  width: 16px;
-  min-height: 16px;
-  margin-inline-end: 3px;
-  list-style-image: url("chrome://global/skin/icons/loading.png");
-}
-
-@media (min-resolution: 1.1dppx) {
-  .update-throbber {
-    list-style-image: url("chrome://global/skin/icons/loading@2x.png");
-  }
-}
-
 .help-button {
   position: fixed;
   left: 0;
   /* Needs to have enough gap from the bottom to not
      get behind the status panel (bug 1357841). */
   bottom: 2rem;
   font-size: 13px;
   line-height: 13px;