diff options
Diffstat (limited to 'application/palemoon/components')
16 files changed, 29 insertions, 80 deletions
diff --git a/application/palemoon/components/downloads/DownloadsCommon.jsm b/application/palemoon/components/downloads/DownloadsCommon.jsm index 0921f8400..c6614e780 100644 --- a/application/palemoon/components/downloads/DownloadsCommon.jsm +++ b/application/palemoon/components/downloads/DownloadsCommon.jsm @@ -104,7 +104,7 @@ const kPartialDownloadSuffix = ".part"; const kPrefBranch = Services.prefs.getBranch("browser.download."); -let PrefObserver = { +var PrefObserver = { QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver, Ci.nsISupportsWeakReference]), getPref: function PO_getPref(name) { diff --git a/application/palemoon/components/downloads/content/contentAreaDownloadsView.js b/application/palemoon/components/downloads/content/contentAreaDownloadsView.js index 29e2e368c..fbb18ab04 100644 --- a/application/palemoon/components/downloads/content/contentAreaDownloadsView.js +++ b/application/palemoon/components/downloads/content/contentAreaDownloadsView.js @@ -4,7 +4,7 @@ Components.utils.import("resource://gre/modules/PrivateBrowsingUtils.jsm"); -let ContentAreaDownloadsView = { +var ContentAreaDownloadsView = { init: function CADV_init() { let view = new DownloadsPlacesView(document.getElementById("downloadsRichListBox")); // Do not display the Places downloads in private windows diff --git a/application/palemoon/components/nsBrowserGlue.js b/application/palemoon/components/nsBrowserGlue.js index cdb0b7522..c4205c2c5 100644 --- a/application/palemoon/components/nsBrowserGlue.js +++ b/application/palemoon/components/nsBrowserGlue.js @@ -35,6 +35,7 @@ Cu.import("resource://gre/modules/Services.jsm"); ["OS", "resource://gre/modules/osfile.jsm"], ["LoginManagerParent", "resource://gre/modules/LoginManagerParent.jsm"], ["FormValidationHandler", "resource:///modules/FormValidationHandler.jsm"], + ["DateTimePickerHelper", "resource://gre/modules/DateTimePickerHelper.jsm"], ].forEach(([name, resource]) => XPCOMUtils.defineLazyModuleGetter(this, name, resource)); const PREF_PLUGINS_NOTIFYUSER = "plugins.update.notifyUser"; @@ -167,6 +168,7 @@ BrowserGlue.prototype = { } catch (e) { Cu.reportError("Could not end startup crash tracking in quit-application-granted: " + e); } + DateTimePickerHelper.uninit(); break; #ifdef OBSERVE_LASTWINDOW_CLOSE_TOPICS case "browser-lastwindow-close-requested": @@ -496,6 +498,8 @@ BrowserGlue.prototype = { } #endif + DateTimePickerHelper.init(); + this._trackSlowStartup(); }, diff --git a/application/palemoon/components/places/BrowserPlaces.manifest b/application/palemoon/components/places/BrowserPlaces.manifest deleted file mode 100644 index 3b25f50f4..000000000 --- a/application/palemoon/components/places/BrowserPlaces.manifest +++ /dev/null @@ -1,2 +0,0 @@ -component {6bcb9bde-9018-4443-a071-c32653469597} PlacesProtocolHandler.js -contract @mozilla.org/network/protocol;1?name=place {6bcb9bde-9018-4443-a071-c32653469597} diff --git a/application/palemoon/components/places/PlacesProtocolHandler.js b/application/palemoon/components/places/PlacesProtocolHandler.js deleted file mode 100644 index ebffd2e28..000000000 --- a/application/palemoon/components/places/PlacesProtocolHandler.js +++ /dev/null @@ -1,49 +0,0 @@ -/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- - * vim: sw=2 ts=2 sts=2 et - * 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/. */ - -const Cc = Components.classes; -const Ci = Components.interfaces; - -Components.utils.import("resource://gre/modules/NetUtil.jsm"); -Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); - -const SCHEME = "place"; -const URL = "chrome://browser/content/places/content-ui/controller.xhtml"; - -function PlacesProtocolHandler() {} - -PlacesProtocolHandler.prototype = { - scheme: SCHEME, - defaultPort: -1, - protocolFlags: Ci.nsIProtocolHandler.URI_DANGEROUS_TO_LOAD | - Ci.nsIProtocolHandler.URI_IS_LOCAL_RESOURCE | - Ci.nsIProtocolHandler.URI_NORELATIVE | - Ci.nsIProtocolHandler.URI_NOAUTH, - - newURI: function PPH_newURI(aSpec, aOriginCharset, aBaseUri) { - let uri = Cc["@mozilla.org/network/simple-uri;1"].createInstance(Ci.nsIURI); - uri.spec = aSpec; - return uri; - }, - - newChannel: function PPH_newChannel(aUri) { - let chan = NetUtil.newChannel(URL); - chan.originalURI = aUri; - return chan; - }, - - allowPort: function PPH_allowPort(aPort, aScheme) { - return false; - }, - - QueryInterface: XPCOMUtils.generateQI([ - Ci.nsIProtocolHandler - ]), - - classID: Components.ID("{6bcb9bde-9018-4443-a071-c32653469597}") -}; - -this.NSGetFactory = XPCOMUtils.generateNSGetFactory([PlacesProtocolHandler]); diff --git a/application/palemoon/components/places/content/controller.js b/application/palemoon/components/places/content/controller.js index 4d3773905..e2ae2afb0 100644 --- a/application/palemoon/components/places/content/controller.js +++ b/application/palemoon/components/places/content/controller.js @@ -1603,7 +1603,7 @@ PlacesController.prototype = { * the view that the item(s) have been dropped on was not necessarily active. * Drop functions are passed the view that is being dropped on. */ -let PlacesControllerDragHelper = { +var PlacesControllerDragHelper = { /** * DOM Element currently being dragged over */ diff --git a/application/palemoon/components/places/content/places.js b/application/palemoon/components/places/content/places.js index 9ecdfebe0..a94193823 100644 --- a/application/palemoon/components/places/content/places.js +++ b/application/palemoon/components/places/content/places.js @@ -1377,7 +1377,7 @@ var ViewMenu = { } } -let ContentArea = { +var ContentArea = { _specialViews: new Map(), init: function CA_init() { @@ -1511,7 +1511,7 @@ let ContentArea = { } }; -let ContentTree = { +var ContentTree = { init: function CT_init() { this._view = document.getElementById("placeContent"); }, diff --git a/application/palemoon/components/places/moz.build b/application/palemoon/components/places/moz.build index fc69beed9..2e35e1951 100644 --- a/application/palemoon/components/places/moz.build +++ b/application/palemoon/components/places/moz.build @@ -6,9 +6,5 @@ JAR_MANIFESTS += ['jar.mn'] -EXTRA_COMPONENTS += [ - 'BrowserPlaces.manifest', - 'PlacesProtocolHandler.js', -] EXTRA_JS_MODULES += [ 'PlacesUIUtils.jsm' ] diff --git a/application/palemoon/components/preferences/aboutPermissions.js b/application/palemoon/components/preferences/aboutPermissions.js index 106d45f89..31b48f88e 100644 --- a/application/palemoon/components/preferences/aboutPermissions.js +++ b/application/palemoon/components/preferences/aboutPermissions.js @@ -13,15 +13,15 @@ Cu.import("resource://gre/modules/AddonManager.jsm"); Cu.import("resource://gre/modules/NetUtil.jsm"); Cu.import("resource://gre/modules/ForgetAboutSite.jsm"); -let gFaviconService = Cc["@mozilla.org/browser/favicon-service;1"]. +var gFaviconService = Cc["@mozilla.org/browser/favicon-service;1"]. getService(Ci.nsIFaviconService); -let gPlacesDatabase = Cc["@mozilla.org/browser/nav-history-service;1"]. +var gPlacesDatabase = Cc["@mozilla.org/browser/nav-history-service;1"]. getService(Ci.nsPIPlacesDatabase). DBConnection. clone(true); -let gSitesStmt = gPlacesDatabase.createAsyncStatement( +var gSitesStmt = gPlacesDatabase.createAsyncStatement( "SELECT get_unreversed_host(rev_host) AS host " + "FROM moz_places " + "WHERE rev_host > '.' " + @@ -30,12 +30,12 @@ let gSitesStmt = gPlacesDatabase.createAsyncStatement( "ORDER BY MAX(frecency) DESC " + "LIMIT :limit"); -let gVisitStmt = gPlacesDatabase.createAsyncStatement( +var gVisitStmt = gPlacesDatabase.createAsyncStatement( "SELECT SUM(visit_count) AS count " + "FROM moz_places " + "WHERE rev_host = :rev_host"); -let gFlash = { +var gFlash = { name: "Shockwave Flash", betterName: "Adobe Flash", type: "application/x-shockwave-flash", @@ -290,7 +290,7 @@ Site.prototype = { * * Inspired by pageinfo/permissions.js */ -let PermissionDefaults = { +var PermissionDefaults = { UNKNOWN: Ci.nsIPermissionManager.UNKNOWN_ACTION, // 0 ALLOW: Ci.nsIPermissionManager.ALLOW_ACTION, // 1 DENY: Ci.nsIPermissionManager.DENY_ACTION, // 2 @@ -449,7 +449,7 @@ let PermissionDefaults = { /** * AboutPermissions manages the about:permissions page. */ -let AboutPermissions = { +var AboutPermissions = { /** * Maximum number of sites to return from the places database. */ diff --git a/application/palemoon/components/preferences/sanitize.js b/application/palemoon/components/preferences/sanitize.js index 893155e62..15e6f58f4 100644 --- a/application/palemoon/components/preferences/sanitize.js +++ b/application/palemoon/components/preferences/sanitize.js @@ -3,7 +3,7 @@ * 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/. */ -let gSanitizeDialog = Object.freeze({ +var gSanitizeDialog = Object.freeze({ onClearHistoryChanged: function () { let downloadsPref = document.getElementById("privacy.clearOnShutdown.downloads"); let historyPref = document.getElementById("privacy.clearOnShutdown.history"); diff --git a/application/palemoon/components/preferences/sync.js b/application/palemoon/components/preferences/sync.js index 9c7f1aa1f..f29728dbf 100644 --- a/application/palemoon/components/preferences/sync.js +++ b/application/palemoon/components/preferences/sync.js @@ -9,7 +9,7 @@ const PAGE_NO_ACCOUNT = 0; const PAGE_HAS_ACCOUNT = 1; const PAGE_NEEDS_UPDATE = 2; -let gSyncPane = { +var gSyncPane = { _stringBundle: null, prefArray: ["engine.bookmarks", "engine.passwords", "engine.prefs", "engine.tabs", "engine.history"], diff --git a/application/palemoon/components/sessionstore/SessionStorage.jsm b/application/palemoon/components/sessionstore/SessionStorage.jsm index 192352c49..64aef35a5 100644 --- a/application/palemoon/components/sessionstore/SessionStorage.jsm +++ b/application/palemoon/components/sessionstore/SessionStorage.jsm @@ -38,7 +38,7 @@ this.SessionStorage = { Object.freeze(SessionStorage); -let DomStorage = { +var DomStorage = { /** * Reads all session storage data from the given docShell. * @param aDocShell @@ -142,7 +142,7 @@ let DomStorage = { } }; -let History = { +var History = { /** * Returns a given history entry's URI. * @param aHistory diff --git a/application/palemoon/components/sessionstore/SessionStore.jsm b/application/palemoon/components/sessionstore/SessionStore.jsm index a8e7adfcc..f7c495be8 100644 --- a/application/palemoon/components/sessionstore/SessionStore.jsm +++ b/application/palemoon/components/sessionstore/SessionStore.jsm @@ -88,7 +88,7 @@ XPCOMUtils.defineLazyServiceGetter(this, "gScreenManager", // retrieved from a given docShell if not already collected before. // This is made so they're automatically in sync with all nsIDocShell.allow* // properties. -let gDocShellCapabilities = (function () { +var gDocShellCapabilities = (function () { let caps; return docShell => { @@ -247,7 +247,7 @@ this.SessionStore = { // Freeze the SessionStore object. We don't want anyone to modify it. Object.freeze(SessionStore); -let SessionStoreInternal = { +var SessionStoreInternal = { QueryInterface: XPCOMUtils.generateQI([ Ci.nsIDOMEventListener, Ci.nsIObserver, @@ -4471,7 +4471,7 @@ let SessionStoreInternal = { * pinned, visible and hidden tabs in that and FIFO order. Hidden tabs are only * restored with restore_hidden_tabs=true. */ -let TabRestoreQueue = { +var TabRestoreQueue = { // The separate buckets used to store tabs. tabs: {priority: [], visible: [], hidden: []}, @@ -4608,7 +4608,7 @@ let TabRestoreQueue = { // A map storing a closed window's state data until it goes aways (is GC'ed). // This ensures that API clients can still read (but not write) states of // windows they still hold a reference to but we don't. -let DyingWindowCache = { +var DyingWindowCache = { _data: new WeakMap(), has: function (window) { @@ -4631,7 +4631,7 @@ let DyingWindowCache = { // A set of tab attributes to persist. We will read a given list of tab // attributes when collecting tab data and will re-set those attributes when // the given tab data is restored to a new tab. -let TabAttributes = { +var TabAttributes = { _attrs: new Set(), // We never want to directly read or write those attributes. @@ -4677,7 +4677,7 @@ let TabAttributes = { // This is used to help meter the number of restoring tabs. This is the control // point for telling the next tab to restore. It gets attached to each gBrowser // via gBrowser.addTabsProgressListener -let gRestoreTabsProgressListener = { +var gRestoreTabsProgressListener = { onStateChange: function(aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) { // Ignore state changes on browsers that we've already restored and state // changes that aren't applicable. diff --git a/application/palemoon/components/sessionstore/_SessionFile.jsm b/application/palemoon/components/sessionstore/_SessionFile.jsm index 9d40b9cca..62b4d1687 100644 --- a/application/palemoon/components/sessionstore/_SessionFile.jsm +++ b/application/palemoon/components/sessionstore/_SessionFile.jsm @@ -130,7 +130,7 @@ const TaskUtils = { } }; -let SessionFileInternal = { +var SessionFileInternal = { /** * A promise fulfilled once initialization is complete */ diff --git a/application/palemoon/components/sessionstore/nsSessionStartup.js b/application/palemoon/components/sessionstore/nsSessionStartup.js index 7f07e9050..04037c10e 100644 --- a/application/palemoon/components/sessionstore/nsSessionStartup.js +++ b/application/palemoon/components/sessionstore/nsSessionStartup.js @@ -50,7 +50,7 @@ function debug(aMsg) { Services.console.logStringMessage(aMsg); } -let gOnceInitializedDeferred = Promise.defer(); +var gOnceInitializedDeferred = Promise.defer(); /* :::::::: The Service ::::::::::::::: */ diff --git a/application/palemoon/components/shell/ShellService.jsm b/application/palemoon/components/shell/ShellService.jsm index 12e275bdb..74632b692 100644 --- a/application/palemoon/components/shell/ShellService.jsm +++ b/application/palemoon/components/shell/ShellService.jsm @@ -17,7 +17,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "WindowsRegistry", /** * 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 |