Bug 1559634 - Port |Bug 1209777 - comm-central will undoubtedly break when bug 589199 lands| to SeaMonkey. r=frg
authorIan Neal <iann_cvs@blueyonder.co.uk>
Tue, 25 Jun 2019 23:37:26 +0200
changeset 35947 259114255352b7456cf207d3586afdd69533d869
parent 35946 e0cb4807daeec4bf9d7517e09623da43f1a87299
child 35948 708b5e8fcaa6367e896f98abaaf783cb24c063e5
push id392
push userclokep@gmail.com
push dateMon, 02 Sep 2019 20:17:19 +0000
reviewersfrg
bugs1559634, 1209777, 589199
Bug 1559634 - Port |Bug 1209777 - comm-central will undoubtedly break when bug 589199 lands| to SeaMonkey. r=frg
suite/base/content/viewApplyThemeOverlay.js
suite/browser/linkToolbarHandler.js
suite/browser/linkToolbarOverlay.js
suite/browser/navigator.js
suite/components/nsSuiteGlue.js
suite/components/places/PlacesUIUtils.jsm
suite/components/shell/ShellService.jsm
suite/mailnews/content/mailTasksOverlay.js
suite/mailnews/content/msgMail3PaneWindow.js
suite/modules/SitePermissions.jsm
--- a/suite/base/content/viewApplyThemeOverlay.js
+++ b/suite/base/content/viewApplyThemeOverlay.js
@@ -16,17 +16,17 @@ function reloadThemes()
 {
   AddonManager.getAddonsByTypes(["theme"], function(themes) {
     gThemes = themes.sort(function(a, b) {
       return a.name.localeCompare(b.name);
     });
   });
 }
 
-const gAddonListener = {
+var gAddonListener = {
   onEnabling: function(val) {},
   onEnabled: function(val) {},
   onDisabling: function(val) {},
   onDisabled: function(val) {},
   onInstalling: function(val) {},
   onInstalled: reloadThemes,
   onUninstalling: function(val) {},
   onUninstalled: reloadThemes,
--- a/suite/browser/linkToolbarHandler.js
+++ b/suite/browser/linkToolbarHandler.js
@@ -138,17 +138,17 @@ function()
   // Disable the individual items
   for (var linkType in this.items)
     this.items[linkType].clear();
 
   // Store the fact that the toolbar is empty
   this.hasItems = false;
 }
 
-const linkToolbarHandler = new LinkToolbarHandler();
+var linkToolbarHandler = new LinkToolbarHandler();
 var gLanguageBundle;
 
 function LinkElementDecorator(element) {
   /*
    * XXX: this is an incomplete decorator, because it doesn't implement
    *      the full Element interface.  If you need to use a method
    *      or member in the Element interface, just add it here and
    *      have it delegate to this.element
--- a/suite/browser/linkToolbarOverlay.js
+++ b/suite/browser/linkToolbarOverlay.js
@@ -204,10 +204,10 @@ function()
   }
   if (!linkToolbarUI.initialized)
   {
     linkToolbarUI.initialized = true;
     document.removeEventListener("pageshow", linkToolbarUI.initHandlers, true);
   }
 }
 
-const linkToolbarUI = new LinkToolbarUI;
+var linkToolbarUI = new LinkToolbarUI;
 
--- a/suite/browser/navigator.js
+++ b/suite/browser/navigator.js
@@ -40,17 +40,17 @@ var gLastValidURLStr = "";
 var gLastValidURL = null;
 var gClickSelectsAll = false;
 var gClickAtEndSelects = false;
 var gIgnoreFocus = false;
 var gIgnoreClick = false;
 var gURIFixup = null;
 
 // Listeners for updating zoom value in status bar
-const ZoomListeners =
+var ZoomListeners =
 {
 
   // Identifies the setting in the content prefs database.
   name: "browser.content.full-zoom",
 
   QueryInterface:
   XPCOMUtils.generateQI([Ci.nsIObserver,
                          Ci.nsIContentPrefObserver,
@@ -125,47 +125,47 @@ var gInitialPages = new Set([
   "about:blank",
   "about:privatebrowsing",
   "about:sessionrestore"
 ]);
 
 //cached elements
 var gBrowser = null;
 
-const gTabStripPrefListener =
+var gTabStripPrefListener =
 {
   domain: "browser.tabs.autoHide",
   observe: function(subject, topic, prefName)
   {
     // verify that we're changing the tab browser strip auto hide pref
     if (topic != "nsPref:changed")
       return;
 
     if (gBrowser.tabContainer.childNodes.length == 1 && window.toolbar.visible) {
       var stripVisibility = !Services.prefs.getBoolPref(prefName);
       gBrowser.setStripVisibilityTo(stripVisibility);
       Services.prefs.setBoolPref("browser.tabs.forceHide", false);
     }
   }
 };
 
-const gHomepagePrefListener =
+var gHomepagePrefListener =
 {
   domain: "browser.startup.homepage",
   observe: function(subject, topic, prefName)
   {
     // verify that we're changing the home page pref
     if (topic != "nsPref:changed")
       return;
 
     updateHomeButtonTooltip();
   }
 };
 
-const gStatusBarPopupIconPrefListener =
+var gStatusBarPopupIconPrefListener =
 {
   domain: "privacy.popups.statusbar_icon_enabled",
   observe: function(subject, topic, prefName)
   {
     if (topic != "nsPref:changed" || prefName != this.domain)
       return;
 
     var popupIcon = document.getElementById("popupIcon");
@@ -173,33 +173,33 @@ const gStatusBarPopupIconPrefListener =
       popupIcon.hidden = true;
 
     else if (gBrowser.getNotificationBox().popupCount)
       popupIcon.hidden = false;
   }
 };
 
 // popup window permission change listener
-const gPopupPermListener = {
+var gPopupPermListener = {
 
   observe: function(subject, topic, data) {
     if (topic == "popup-perm-close") {
       // close the window if we're a popup and our opener's URI matches
       // the URI in the notification
       var popupOpenerURI = maybeInitPopupContext();
       if (popupOpenerURI) {
         closeURI = Services.io.newURI(data);
         if (closeURI.host == popupOpenerURI.host)
           window.close();
       }
     }
   }
 };
 
-const gFormSubmitObserver = {
+var gFormSubmitObserver = {
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIFormSubmitObserver,
                                          Ci.nsIObserver]),
 
   panel: null,
 
   init: function()
   {
     this.panel = document.getElementById("invalid-form-popup");
--- a/suite/components/nsSuiteGlue.js
+++ b/suite/components/nsSuiteGlue.js
@@ -32,19 +32,19 @@ XPCOMUtils.defineLazyModuleGetters(this,
 });
 
 XPCOMUtils.defineLazyGetter(this, "DebuggerServer", () => {
   var tmp = {};
   ChromeUtils.import("resource://devtools/shared/Loader.jsm", tmp);
   return tmp.require("devtools/server/main").DebuggerServer;
 });
 
-const global = this;
+var global = this;
 
-const listeners = {
+var listeners = {
   mm: {
     // PLEASE KEEP THIS LIST IN SYNC WITH THE MOBILE LISTENERS IN nsBrowserGlue.js
     "RemoteLogins:findLogins": ["LoginManagerParent"],
     "RemoteLogins:findRecipes": ["LoginManagerParent"],
     "RemoteLogins:onFormSubmit": ["LoginManagerParent"],
     "RemoteLogins:autoCompleteLogins": ["LoginManagerParent"],
     "RemoteLogins:removeLogin": ["LoginManagerParent"],
     "RemoteLogins:insecureLoginFormPresent": ["LoginManagerParent"],
@@ -1469,17 +1469,17 @@ SuiteGlue.prototype = {
  *
  * While there are some built-in permission prompts, createPermissionPrompt
  * can also be overridden by system add-ons or tests to provide new ones.
  *
  * This override ability is provided by Integration.jsm. See
  * PermissionUI.jsm for an example of how to provide a new prompt
  * from an add-on.
  */
-const ContentPermissionIntegration = {
+var ContentPermissionIntegration = {
   /**
    * Creates a PermissionPrompt for a given permission type and
    * nsIContentPermissionRequest.
    *
    * @param {string} type
    *        The type of the permission request from content. This normally
    *        matches the "type" field of an nsIContentPermissionType, but it
    *        can be something else if the permission does not use the
--- a/suite/components/places/PlacesUIUtils.jsm
+++ b/suite/components/places/PlacesUIUtils.jsm
@@ -23,26 +23,26 @@ XPCOMUtils.defineLazyModuleGetters(this,
 
 XPCOMUtils.defineLazyGetter(this, "bundle", function() {
   return Services.strings.createBundle("chrome://communicator/locale/places/places.properties");
 });
 
 const gInContentProcess = Services.appinfo.processType == Ci.nsIXULRuntime.PROCESS_TYPE_CONTENT;
 const FAVICON_REQUEST_TIMEOUT = 60 * 1000;
 // Map from windows to arrays of data about pending favicon loads.
-let gFaviconLoadDataMap = new Map();
+var gFaviconLoadDataMap = new Map();
 
 const ITEM_CHANGED_BATCH_NOTIFICATION_THRESHOLD = 10;
 
 // copied from utilityOverlay.js
 const TAB_DROP_TYPE = "application/x-moz-tabbrowser-tab";
 const PREF_LOAD_BOOKMARKS_IN_BACKGROUND = "browser.tabs.loadBookmarksInBackground";
 const PREF_LOAD_BOOKMARKS_IN_TABS = "browser.tabs.loadBookmarksInTabs";
 
-let InternalFaviconLoader = {
+var InternalFaviconLoader = {
   /**
    * This gets called for every inner window that is destroyed.
    * In the parent process, we process the destruction ourselves. In the child process,
    * we notify the parent which will then process it based on that message.
    */
   observe(subject, topic, data) {
     let innerWindowID = subject.QueryInterface(Ci.nsISupportsPRUint64).data;
     this.removeRequestsForInner(innerWindowID);
--- a/suite/components/shell/ShellService.jsm
+++ b/suite/components/shell/ShellService.jsm
@@ -8,17 +8,17 @@ var EXPORTED_SYMBOLS = ["ShellService"];
 
 const {AppConstants} = ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
 const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
 const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 /**
  * Internal functionality to save and restore the docShell.allow* properties.
  */
-let ShellServiceInternal = {
+var ShellServiceInternal = {
   /**
    * Used to determine whether or not to offer "Set as desktop background"
    * functionality. Even if shell service is available it is not
    * guaranteed that it is able to set the background for every desktop
    * which is especially true for Linux with its many different desktop
    * environments.
    */
   get canSetDesktopBackground() {
--- a/suite/mailnews/content/mailTasksOverlay.js
+++ b/suite/mailnews/content/mailTasksOverlay.js
@@ -135,17 +135,17 @@ function MailTasksGetMessagesForAllServe
     }
   }
   catch (e)
   {
     Cu.reportError(e);
   }
 }
 
-const biffObserver =
+var biffObserver =
 {
   observe: function observe(subject, topic, state)
   {
     // sanity check
     if (topic == BIFF_TOPIC)
     {
       var biffManager = Cc["@mozilla.org/messenger/statusBarBiffManager;1"]
                           .getService(Ci.nsIStatusBarBiffManager);
--- a/suite/mailnews/content/msgMail3PaneWindow.js
+++ b/suite/mailnews/content/msgMail3PaneWindow.js
@@ -644,17 +644,17 @@ function UpdateMailPaneConfig() {
     // Reroot message display
     InvalidateTabDBs();
     let tabmail = GetTabMail();
     tabmail.currentTabInfo = null;
     tabmail.updateCurrentTab();
   }
 }
 
-const MailPrefObserver = {
+var MailPrefObserver = {
   observe: function observe(subject, topic, prefName) {
     if (topic == "nsPref:changed") {
       if (prefName == "mail.pane_config.dynamic") {
         UpdateMailPaneConfig();
       } else if (prefName == "mail.showCondensedAddresses") {
         let currentDisplayNameVersion =
               Services.prefs.getIntPref("mail.displayname.version");
         Services.prefs.setIntPref("mail.displayname.version",
--- a/suite/modules/SitePermissions.jsm
+++ b/suite/modules/SitePermissions.jsm
@@ -15,17 +15,17 @@ var gStringBundle =
  *
  * Permissions are keyed by browser, so methods take a Browser
  * element to identify the corresponding permission set.
  *
  * This uses a WeakMap to key browsers, so that entries are
  * automatically cleared once the browser stops existing
  * (once there are no other references to the browser object);
  */
-const TemporaryBlockedPermissions = {
+var TemporaryBlockedPermissions = {
   // This is a three level deep map with the following structure:
   //
   // Browser => {
   //   <prePath>: {
   //     <permissionID>: {Number} <timeStamp>
   //   }
   // }
   //