diff options
Diffstat (limited to 'application')
-rw-r--r-- | application/basilisk/components/nsBrowserGlue.js | 36 | ||||
-rw-r--r-- | application/basilisk/confvars.sh | 2 | ||||
-rw-r--r-- | application/palemoon/components/downloads/content/downloads.js | 6 | ||||
-rw-r--r-- | application/palemoon/components/nsBrowserGlue.js | 96 | ||||
-rw-r--r-- | application/palemoon/themes/linux/browser.css | 12 | ||||
-rw-r--r-- | application/palemoon/themes/osx/browser.css | 12 | ||||
-rw-r--r-- | application/palemoon/themes/windows/browser.css | 12 |
7 files changed, 76 insertions, 100 deletions
diff --git a/application/basilisk/components/nsBrowserGlue.js b/application/basilisk/components/nsBrowserGlue.js index 3258159b6..d77e97f87 100644 --- a/application/basilisk/components/nsBrowserGlue.js +++ b/application/basilisk/components/nsBrowserGlue.js @@ -1080,24 +1080,19 @@ BrowserGlue.prototype = { // For any add-ons that were installed disabled and can be enabled offer // them to the user. - let win = RecentWindow.getMostRecentBrowserWindow(); - AddonManager.getAllAddons(addons => { - for (let addon of addons) { - // If this add-on has already seen (or seen is undefined for non-XPI - // add-ons) then skip it. - if (addon.seen !== false) { - continue; - } - - // If this add-on cannot be enabled (either already enabled or - // appDisabled) then skip it. - if (!(addon.permissions & AddonManager.PERM_CAN_ENABLE)) { - continue; - } - - win.openUILinkIn("about:newaddon?id=" + addon.id, "tab"); - } - }); + let changedIDs = AddonManager.getStartupChanges(AddonManager.STARTUP_CHANGE_INSTALLED); + if (changedIDs.length > 0) { + let win = this.getMostRecentBrowserWindow(); + AddonManager.getAddonsByIDs(changedIDs, function(aAddons) { + aAddons.forEach(function(aAddon) { + // If the add-on isn't user disabled or can't be enabled then skip it. + if (!aAddon.userDisabled || !(aAddon.permissions & AddonManager.PERM_CAN_ENABLE)) + return; + + win.openUILinkIn("about:newaddon?id=" + aAddon.id, "tab"); + }) + }); + } let signingRequired; if (AppConstants.MOZ_REQUIRE_SIGNING) { @@ -1110,6 +1105,11 @@ BrowserGlue.prototype = { let disabledAddons = AddonManager.getStartupChanges(AddonManager.STARTUP_CHANGE_DISABLED); AddonManager.getAddonsByIDs(disabledAddons, (addons) => { for (let addon of addons) { + // WEs return null, skip. + if (!addon) { + continue; + } + if (addon.type == "experiment") continue; diff --git a/application/basilisk/confvars.sh b/application/basilisk/confvars.sh index 62aa1a84f..cd18bdb94 100644 --- a/application/basilisk/confvars.sh +++ b/application/basilisk/confvars.sh @@ -55,7 +55,7 @@ MOZ_APP_STATIC_INI=1 MOZ_WEBGL_CONFORMANT=1 MOZ_JSDOWNLOADS=1 MOZ_WEBRTC=1 -MOZ_WEBEXTENSIONS=1 +MOZ_WEBEXTENSIONS= MOZ_DEVTOOLS=1 MOZ_SERVICES_COMMON=1 MOZ_SERVICES_SYNC=1 diff --git a/application/palemoon/components/downloads/content/downloads.js b/application/palemoon/components/downloads/content/downloads.js index ee728406c..ee1c6902e 100644 --- a/application/palemoon/components/downloads/content/downloads.js +++ b/application/palemoon/components/downloads/content/downloads.js @@ -1038,9 +1038,9 @@ const DownloadsView = { } // We must check for existence synchronously because this is a DOM event. - let file = new FileUtils.File(DownloadsView.controllerForElement(element) - .download.target.path); - if (!file.exists()) { + let localFile = new FileUtils.File(DownloadsView.controllerForElement(element) + .download.target.path); + if (!localFile.exists()) { return; } diff --git a/application/palemoon/components/nsBrowserGlue.js b/application/palemoon/components/nsBrowserGlue.js index f0a7aa22a..78b14a2e4 100644 --- a/application/palemoon/components/nsBrowserGlue.js +++ b/application/palemoon/components/nsBrowserGlue.js @@ -58,8 +58,8 @@ const PREF_PLUGINS_NOTIFYUSER = "plugins.update.notifyUser"; const PREF_PLUGINS_UPDATEURL = "plugins.update.url"; // We try to backup bookmarks at idle times, to avoid doing that at shutdown. -// Number of idle seconds before trying to backup bookmarks. 15 minutes. -const BOOKMARKS_BACKUP_IDLE_TIME = 15 * 60; +// Number of idle seconds before trying to backup bookmarks. 10 minutes. +const BOOKMARKS_BACKUP_IDLE_TIME = 10 * 60; // Minimum interval in milliseconds between backups. const BOOKMARKS_BACKUP_INTERVAL = 86400 * 1000; // Maximum number of backups to create. Old ones will be purged. @@ -238,9 +238,9 @@ BrowserGlue.prototype = { this._onPlacesShutdown(); break; case "idle": - if ((this._idleService.idleTime > BOOKMARKS_BACKUP_IDLE_TIME * 1000) && - this._shouldBackupBookmarks()) + if (this._idleService.idleTime > BOOKMARKS_BACKUP_IDLE_TIME * 1000) { this._backupBookmarks(); + } break; case "distribution-customization-complete": Services.obs.removeObserver(this, "distribution-customization-complete"); @@ -552,14 +552,6 @@ BrowserGlue.prototype = { this._showPlacesLockedNotificationBox(); } - // If there are plugins installed that are outdated, and the user hasn't - // been warned about them yet, open the plugins update page. - // Pale Moon: disable this functionality, people are already notified - // if they visit a page with an outdated plugin, and they can check - // properly from the plugins page as well. -// if (Services.prefs.getBoolPref(PREF_PLUGINS_NOTIFYUSER)) -// this._showPluginUpdatePage(); - // For any add-ons that were installed disabled and can be enabled offer // them to the user. let changedIDs = AddonManager.getStartupChanges(AddonManager.STARTUP_CHANGE_INSTALLED); @@ -949,8 +941,7 @@ BrowserGlue.prototype = { Services.prefs.getBoolPref("browser.bookmarks.restore_default_bookmarks"); if (restoreDefaultBookmarks) { // Ensure that we already have a bookmarks backup for today. - if (this._shouldBackupBookmarks()) - yield this._backupBookmarks(); + yield this._backupBookmarks(); importBookmarks = true; } } catch(ex) {} @@ -959,7 +950,7 @@ BrowserGlue.prototype = { // from bookmarks.html, we will try to restore from JSON/JSONLZ4 if (importBookmarks && !restoreDefaultBookmarks && !importBookmarksHTML) { // get latest JSON/JSONLZ4 backup - var bookmarksBackupFile = yield PlacesBackups.getMostRecentBackup(); + var bookmarksBackupFile = PlacesBackups.getMostRecentBackup(); if (bookmarksBackupFile) { // restore from JSON/JSONLZ4 backup yield BookmarkJSONUtils.importFromFile(bookmarksBackupFile, true); @@ -1102,75 +1093,60 @@ BrowserGlue.prototype = { } let waitingForBackupToComplete = true; - if (this._shouldBackupBookmarks()) { - waitingForBackupToComplete = false; - this._backupBookmarks().then( - function onSuccess() { - waitingForBackupToComplete = true; - }, - function onFailure() { - Cu.reportError("Unable to backup bookmarks."); - waitingForBackupToComplete = true; - } - ); - } + this._backupBookmarks().then( + function onSuccess() { + waitingForBackupToComplete = false; + }, + function onFailure() { + Cu.reportError("Unable to backup bookmarks."); + waitingForBackupToComplete = false; + } + ); // Backup bookmarks to bookmarks.html to support apps that depend // on the legacy format. - let waitingForHTMLExportToComplete = true; - // If this fails to get the preference value, we don't export. + let waitingForHTMLExportToComplete = false; if (Services.prefs.getBoolPref("browser.bookmarks.autoExportHTML")) { - // Exceptionally, since this is a non-default setting and HTML format is - // discouraged in favor of the JSON/JSONLZ4 backups, we spin the event - // loop on shutdown, to wait for the export to finish. We cannot safely - // spin the event loop on shutdown until we include a watchdog to prevent - // potential hangs (bug 518683). The asynchronous shutdown operations - // will then be handled by a shutdown service (bug 435058). - waitingForHTMLExportToComplete = false; + // Exporting to HTML is explicitly enabled. + // We spin the event loop on shutdown, to wait for the export to finish. + waitingForHTMLExportToComplete = true; BookmarkHTMLUtils.exportToFile(BookmarkHTMLUtils.defaultPath).then( function onSuccess() { - waitingForHTMLExportToComplete = true; + waitingForHTMLExportToComplete = false; }, function onFailure() { Cu.reportError("Unable to auto export html."); - waitingForHTMLExportToComplete = true; + waitingForHTMLExportToComplete = false; } ); } + // The events loop should spin at least once because waitingForBackupToComplete + // is true before checking whether backup should be made. let thread = Services.tm.currentThread; - while (!waitingForBackupToComplete || !waitingForHTMLExportToComplete) { + while (waitingForBackupToComplete || waitingForHTMLExportToComplete) { thread.processNextEvent(true); } }, /** - * Determine whether to backup bookmarks or not. - * @return true if bookmarks should be backed up, false if not. - */ - _shouldBackupBookmarks: function BG__shouldBackupBookmarks() { - let lastBackupFile = PlacesBackups.getMostRecent(); - - // Should backup bookmarks if there are no backups or the maximum interval between - // backups elapsed. - return (!lastBackupFile || - new Date() - PlacesBackups.getDateForFile(lastBackupFile) > BOOKMARKS_BACKUP_INTERVAL); - }, - - /** * Backup bookmarks. */ _backupBookmarks: function BG__backupBookmarks() { return Task.spawn(function() { - // Backup bookmarks if there are no backups or the maximum interval between - // backups elapsed. - let maxBackups = BOOKMARKS_BACKUP_MAX_BACKUPS; - try { - maxBackups = Services.prefs.getIntPref("browser.bookmarks.max_backups"); - } - catch(ex) { /* Use default. */ } + let lastBackupFile = yield PlacesBackups.getMostRecentBackup(); + // We should backup bookmarks if there are no backups or the maximum + // interval between backups has lapsed. + let hasLapsed = (new Date() - PlacesBackups.getDateForFile(lastBackupFile)) > BOOKMARKS_BACKUP_INTERVAL; + if (!lastBackupFile || hasLapsed) { + let maxBackups = BOOKMARKS_BACKUP_MAX_BACKUPS; + try { + maxBackups = Services.prefs.getIntPref("browser.bookmarks.max_backups"); + } + catch(ex) { /* Use default. */ } - yield PlacesBackups.create(maxBackups); // Don't force creation. + yield PlacesBackups.create(maxBackups); // Don't force creation. + } }); }, diff --git a/application/palemoon/themes/linux/browser.css b/application/palemoon/themes/linux/browser.css index 516677fe6..b545b06cb 100644 --- a/application/palemoon/themes/linux/browser.css +++ b/application/palemoon/themes/linux/browser.css @@ -1781,9 +1781,9 @@ richlistitem[type~="action"][actiontype="switchtab"] > .ac-url-box > .ac-action- list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio.svg#tab-audio-blocked"); } -#TabsToolbar[brighttext] .tab-icon-sound[soundplaying], -#TabsToolbar[brighttext] .tab-icon-sound[blocked], -#TabsToolbar[brighttext] .tab-icon-sound[muted] { +#TabsToolbar:-moz-lwtheme-brighttext .tab-icon-sound[soundplaying], +#TabsToolbar:-moz-lwtheme-brighttext .tab-icon-sound[blocked], +#TabsToolbar:-moz-lwtheme-brighttext .tab-icon-sound[muted] { filter: invert(1); } @@ -1827,17 +1827,17 @@ richlistitem[type~="action"][actiontype="switchtab"] > .ac-url-box > .ac-action- list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio-blocked"); } -#TabsToolbar[brighttext] .tab-icon-overlay[soundplaying]:not([selected]):not(:hover), +#TabsToolbar:-moz-lwtheme-brighttext .tab-icon-overlay[soundplaying]:not([selected]):not(:hover), .tab-icon-overlay[soundplaying][selected]:-moz-lwtheme-brighttext:not(:hover) { list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio-white"); } -#TabsToolbar[brighttext] .tab-icon-overlay[muted]:not([crashed]):not([selected]):not(:hover), +#TabsToolbar:-moz-lwtheme-brighttext .tab-icon-overlay[muted]:not([crashed]):not([selected]):not(:hover), .tab-icon-overlay[muted][selected]:-moz-lwtheme-brighttext:not(:hover) { list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio-white-muted"); } -#TabsToolbar[brighttext] .tab-icon-overlay[blocked]:not([crashed]):not([selected]):not(:hover), +#TabsToolbar:-moz-lwtheme-brighttext .tab-icon-overlay[blocked]:not([crashed]):not([selected]):not(:hover), .tab-icon-overlay[blocked][selected]:-moz-lwtheme-brighttext:not(:hover) { list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio-white-blocked"); } diff --git a/application/palemoon/themes/osx/browser.css b/application/palemoon/themes/osx/browser.css index a7bd683bd..ddf050785 100644 --- a/application/palemoon/themes/osx/browser.css +++ b/application/palemoon/themes/osx/browser.css @@ -1844,9 +1844,9 @@ richlistitem[type~="action"][actiontype="switchtab"][selected="true"] > .ac-url- list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio.svg#tab-audio-blocked"); } -#TabsToolbar[brighttext] .tab-icon-sound[soundplaying], -#TabsToolbar[brighttext] .tab-icon-sound[blocked], -#TabsToolbar[brighttext] .tab-icon-sound[muted] { +#TabsToolbar:-moz-lwtheme-brighttext .tab-icon-sound[soundplaying], +#TabsToolbar:-moz-lwtheme-brighttext .tab-icon-sound[blocked], +#TabsToolbar:-moz-lwtheme-brighttext .tab-icon-sound[muted] { filter: invert(1); } @@ -1890,17 +1890,17 @@ richlistitem[type~="action"][actiontype="switchtab"][selected="true"] > .ac-url- list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio-blocked"); } -#TabsToolbar[brighttext] .tab-icon-overlay[soundplaying]:not([selected]):not(:hover), +#TabsToolbar:-moz-lwtheme-brighttext .tab-icon-overlay[soundplaying]:not([selected]):not(:hover), .tab-icon-overlay[soundplaying][selected]:-moz-lwtheme-brighttext:not(:hover) { list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio-white"); } -#TabsToolbar[brighttext] .tab-icon-overlay[muted]:not([crashed]):not([selected]):not(:hover), +#TabsToolbar:-moz-lwtheme-brighttext .tab-icon-overlay[muted]:not([crashed]):not([selected]):not(:hover), .tab-icon-overlay[muted][selected]:-moz-lwtheme-brighttext:not(:hover) { list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio-white-muted"); } -#TabsToolbar[brighttext] .tab-icon-overlay[blocked]:not([crashed]):not([selected]):not(:hover), +#TabsToolbar:-moz-lwtheme-brighttext .tab-icon-overlay[blocked]:not([crashed]):not([selected]):not(:hover), .tab-icon-overlay[blocked][selected]:-moz-lwtheme-brighttext:not(:hover) { list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio-white-blocked"); } diff --git a/application/palemoon/themes/windows/browser.css b/application/palemoon/themes/windows/browser.css index c261fe083..56a8318da 100644 --- a/application/palemoon/themes/windows/browser.css +++ b/application/palemoon/themes/windows/browser.css @@ -2050,9 +2050,9 @@ richlistitem[type~="action"][actiontype="switchtab"] > .ac-url-box > .ac-action- list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio.svg#tab-audio-blocked"); } -#TabsToolbar[brighttext] .tab-icon-sound[soundplaying], -#TabsToolbar[brighttext] .tab-icon-sound[blocked], -#TabsToolbar[brighttext] .tab-icon-sound[muted] { +#TabsToolbar:-moz-lwtheme-brighttext .tab-icon-sound[soundplaying], +#TabsToolbar:-moz-lwtheme-brighttext .tab-icon-sound[blocked], +#TabsToolbar:-moz-lwtheme-brighttext .tab-icon-sound[muted] { filter: invert(1); } @@ -2096,17 +2096,17 @@ richlistitem[type~="action"][actiontype="switchtab"] > .ac-url-box > .ac-action- list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio-blocked"); } -#TabsToolbar[brighttext] .tab-icon-overlay[soundplaying]:not([selected]):not(:hover), +#TabsToolbar:-moz-lwtheme-brighttext .tab-icon-overlay[soundplaying]:not([selected]):not(:hover), .tab-icon-overlay[soundplaying][selected]:-moz-lwtheme-brighttext:not(:hover) { list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio-white"); } -#TabsToolbar[brighttext] .tab-icon-overlay[muted]:not([crashed]):not([selected]):not(:hover), +#TabsToolbar:-moz-lwtheme-brighttext .tab-icon-overlay[muted]:not([crashed]):not([selected]):not(:hover), .tab-icon-overlay[muted][selected]:-moz-lwtheme-brighttext:not(:hover) { list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio-white-muted"); } -#TabsToolbar[brighttext] .tab-icon-overlay[blocked]:not([crashed]):not([selected]):not(:hover), +#TabsToolbar:-moz-lwtheme-brighttext .tab-icon-overlay[blocked]:not([crashed]):not([selected]):not(:hover), .tab-icon-overlay[blocked][selected]:-moz-lwtheme-brighttext:not(:hover) { list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio-white-blocked"); } |