summaryrefslogtreecommitdiffstats
path: root/application/palemoon/base/content
diff options
context:
space:
mode:
Diffstat (limited to 'application/palemoon/base/content')
-rw-r--r--application/palemoon/base/content/aboutDialog.css71
-rw-r--r--application/palemoon/base/content/aboutDialog.js530
-rw-r--r--application/palemoon/base/content/aboutDialog.xul73
-rw-r--r--application/palemoon/base/content/aboutRobots-icon.pngbin9817 -> 0 bytes
-rw-r--r--application/palemoon/base/content/aboutRobots-widget-left.pngbin2224 -> 0 bytes
-rw-r--r--application/palemoon/base/content/aboutRobots.xhtml108
-rw-r--r--application/palemoon/base/content/baseMenuOverlay.xul10
-rw-r--r--application/palemoon/base/content/browser-appmenu.inc9
-rw-r--r--application/palemoon/base/content/browser-context.inc7
-rw-r--r--application/palemoon/base/content/browser-fullScreen.js37
-rw-r--r--application/palemoon/base/content/browser-menudragging.js26
-rw-r--r--application/palemoon/base/content/browser-title.css14
-rw-r--r--application/palemoon/base/content/browser.js25
-rw-r--r--application/palemoon/base/content/browser.xul3
-rw-r--r--application/palemoon/base/content/content.js2
-rw-r--r--application/palemoon/base/content/nsContextMenu.js5
-rw-r--r--application/palemoon/base/content/palemoon.xhtml6
-rw-r--r--application/palemoon/base/content/tabbrowser.xml37
-rw-r--r--application/palemoon/base/content/urlbarBindings.xml4
-rw-r--r--application/palemoon/base/content/utilityOverlay.js133
20 files changed, 261 insertions, 839 deletions
diff --git a/application/palemoon/base/content/aboutDialog.css b/application/palemoon/base/content/aboutDialog.css
index d171a0bc1..d96eba5a2 100644
--- a/application/palemoon/base/content/aboutDialog.css
+++ b/application/palemoon/base/content/aboutDialog.css
@@ -2,56 +2,53 @@
* 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/. */
-#PMaboutDialog {
- width: 620px;
+#aboutPMDialogContainer {
+ width: 700px;
+ height: 410px;
}
-#PMrightBox {
- background-image: url("chrome://branding/content/about-wordmark.png");
- background-repeat: no-repeat;
- /* padding-top creates room for the wordmark */
- padding-top: 38px;
- margin-top:20px;
+#aboutVersionBox {
+ font-family: Arial, helvetica;
+ height: 38 px;
}
-#PMrightBox:-moz-locale-dir(rtl) {
- background-position: 100% 0;
-}
-
-#PMbottomBox {
- padding: 15px 10px 0;
-}
-
-#PMversion {
- margin-top: 10px;
- -moz-margin-start: 0;
+#aboutVersion {
+ text-align: center;
+ font-size: 18px;
+ font-weight: bold;
+ margin: 4px;
}
#distribution,
#distributionId {
+ text-align: center;
+ font-size: 14px;
font-weight: bold;
display: none;
margin-top: 0;
margin-bottom: 0;
}
-.text-blurb {
- margin-bottom: 10px;
- -moz-margin-start: 0;
- -moz-padding-start: 0;
+#aboutTextBox {
+ font-family: Arial, helvetica;
+ font-size: 14px;
+ margin: 5px 20px;
+ padding: 4px 10px 0px;
+ border-radius: 3px;
+ color: black;
+ background-color: rgba(240, 240, 240, .6);
+}
+
+#aboutLinkBox {
+ font-family: Arial, helvetica;
}
-#updateButton,
-#updateDeck > hbox > label {
- -moz-margin-start: 0;
- -moz-padding-start: 0;
+.text-credits {
+ margin: 5px 0px;
}
-.update-throbber {
- width: 16px;
- min-height: 16px;
- -moz-margin-end: 3px;
- list-style-image: url("chrome://global/skin/icons/loading_16.png");
+.text-center {
+ text-align: center;
}
.text-link,
@@ -63,5 +60,15 @@
.bottom-link,
.bottom-link:focus {
text-align: center;
+ text-decoration: none !important;
+ padding: 4px;
+ border-radius: 3px;
+ color: #244C8A;
+ background-color: rgba(240, 240, 240, .7);
margin: 0 40px;
+ transition: background-color 0.5s ease-out;
+}
+
+.bottom-link:hover {
+ background-color: rgba(240, 240, 255, .95);
}
diff --git a/application/palemoon/base/content/aboutDialog.js b/application/palemoon/base/content/aboutDialog.js
index f4c2a990c..e4e18f2cf 100644
--- a/application/palemoon/base/content/aboutDialog.js
+++ b/application/palemoon/base/content/aboutDialog.js
@@ -42,13 +42,9 @@ function init(aEvent)
if (/[ab]\d+$/.test(version)) {
let buildID = Services.appinfo.appBuildID;
let buildDate = buildID.slice(0,4) + "-" + buildID.slice(4,6) + "-" + buildID.slice(6,8);
- document.getElementById("PMversion").textContent += " (" + buildDate + ")";
+ document.getElementById("aboutVersion").textContent += " (" + buildDate + ")";
}
-#ifdef MOZ_UPDATER
- gAppUpdater = new appUpdater();
-#endif
-
#ifdef XP_MACOSX
// it may not be sized at this point, and we need its width to calculate its position
window.sizeToContent();
@@ -64,527 +60,3 @@ function init(aEvent)
relnotes.setAttribute("href", releaseNotesURL);
}
}
-
-#ifdef MOZ_UPDATER
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-Components.utils.import("resource://gre/modules/DownloadUtils.jsm");
-Components.utils.import("resource://gre/modules/AddonManager.jsm");
-
-var gAppUpdater;
-
-function onUnload(aEvent) {
- if (gAppUpdater.isChecking)
- gAppUpdater.checker.stopChecking(Components.interfaces.nsIUpdateChecker.CURRENT_CHECK);
- // Safe to call even when there isn't a download in progress.
- gAppUpdater.removeDownloadListener();
- gAppUpdater = null;
-}
-
-
-function appUpdater()
-{
- this.updateDeck = document.getElementById("updateDeck");
-
- // Hide the update deck when there is already an update window open to avoid
- // syncing issues between them.
- if (Services.wm.getMostRecentWindow("Update:Wizard")) {
- this.updateDeck.hidden = true;
- return;
- }
-
- XPCOMUtils.defineLazyServiceGetter(this, "aus",
- "@mozilla.org/updates/update-service;1",
- "nsIApplicationUpdateService");
- XPCOMUtils.defineLazyServiceGetter(this, "checker",
- "@mozilla.org/updates/update-checker;1",
- "nsIUpdateChecker");
- XPCOMUtils.defineLazyServiceGetter(this, "um",
- "@mozilla.org/updates/update-manager;1",
- "nsIUpdateManager");
-
- this.bundle = Services.strings.
- createBundle("chrome://browser/locale/browser.properties");
-
- this.updateBtn = document.getElementById("updateButton");
-
- // The button label value must be set so its height is correct.
- this.setupUpdateButton("update.checkInsideButton");
-
- let manualURL = Services.urlFormatter.formatURLPref("app.update.url.manual");
- let manualLink = document.getElementById("manualLink");
- manualLink.value = manualURL;
- manualLink.href = manualURL;
- document.getElementById("failedLink").href = manualURL;
-
- if (this.updateDisabledAndLocked) {
- this.selectPanel("adminDisabled");
- return;
- }
-
- if (this.isPending || this.isApplied) {
- this.setupUpdateButton("update.restart." +
- (this.isMajor ? "upgradeButton" : "updateButton"));
- return;
- }
-
- if (this.aus.isOtherInstanceHandlingUpdates) {
- this.selectPanel("otherInstanceHandlingUpdates");
- return;
- }
-
- if (this.isDownloading) {
- this.startDownload();
- return;
- }
-
- if (this.updateEnabled && this.updateAuto) {
- this.selectPanel("checkingForUpdates");
- this.isChecking = true;
- this.checker.checkForUpdates(this.updateCheckListener, true);
- return;
- }
-}
-
-appUpdater.prototype =
-{
- // true when there is an update check in progress.
- isChecking: false,
-
- // true when there is an update already staged / ready to be applied.
- get isPending() {
- if (this.update) {
- return this.update.state == "pending" ||
- this.update.state == "pending-service";
- }
- return this.um.activeUpdate &&
- (this.um.activeUpdate.state == "pending" ||
- this.um.activeUpdate.state == "pending-service");
- },
-
- // true when there is an update already installed in the background.
- get isApplied() {
- if (this.update)
- return this.update.state == "applied" ||
- this.update.state == "applied-service";
- return this.um.activeUpdate &&
- (this.um.activeUpdate.state == "applied" ||
- this.um.activeUpdate.state == "applied-service");
- },
-
- // true when there is an update download in progress.
- get isDownloading() {
- if (this.update)
- return this.update.state == "downloading";
- return this.um.activeUpdate &&
- this.um.activeUpdate.state == "downloading";
- },
-
- // true when the update type is major.
- get isMajor() {
- if (this.update)
- return this.update.type == "major";
- return this.um.activeUpdate.type == "major";
- },
-
- // true when updating is disabled by an administrator.
- get updateDisabledAndLocked() {
- return !this.updateEnabled &&
- Services.prefs.prefIsLocked("app.update.enabled");
- },
-
- // true when updating is enabled.
- get updateEnabled() {
- try {
- return Services.prefs.getBoolPref("app.update.enabled");
- }
- catch (e) { }
- return true; // Firefox default is true
- },
-
- // true when updating in background is enabled.
- get backgroundUpdateEnabled() {
- return this.updateEnabled &&
- gAppUpdater.aus.canStageUpdates;
- },
-
- // true when updating is automatic.
- get updateAuto() {
- try {
- return Services.prefs.getBoolPref("app.update.auto");
- }
- catch (e) { }
- return true; // Firefox default is true
- },
-
- /**
- * Sets the deck's selected panel.
- *
- * @param aChildID
- * The id of the deck's child to select.
- */
- selectPanel: function(aChildID) {
- this.updateDeck.selectedPanel = document.getElementById(aChildID);
- this.updateBtn.disabled = (aChildID != "updateButtonBox");
- },
-
- /**
- * Sets the update button's label and accesskey.
- *
- * @param aKeyPrefix
- * The prefix for the properties file entry to use for setting the
- * label and accesskey.
- */
- setupUpdateButton: function(aKeyPrefix) {
- this.updateBtn.label = this.bundle.GetStringFromName(aKeyPrefix + ".label");
- this.updateBtn.accessKey = this.bundle.GetStringFromName(aKeyPrefix + ".accesskey");
- if (!document.commandDispatcher.focusedElement ||
- document.commandDispatcher.focusedElement == this.updateBtn)
- this.updateBtn.focus();
- },
-
- /**
- * Handles oncommand for the update button.
- */
- buttonOnCommand: function() {
- if (this.isPending || this.isApplied) {
- // Notify all windows that an application quit has been requested.
- let cancelQuit = Components.classes["@mozilla.org/supports-PRBool;1"].
- createInstance(Components.interfaces.nsISupportsPRBool);
- Services.obs.notifyObservers(cancelQuit, "quit-application-requested", "restart");
-
- // Something aborted the quit process.
- if (cancelQuit.data)
- return;
-
- let appStartup = Components.classes["@mozilla.org/toolkit/app-startup;1"].
- getService(Components.interfaces.nsIAppStartup);
-
- // If already in safe mode restart in safe mode (bug 327119)
- if (Services.appinfo.inSafeMode) {
- appStartup.restartInSafeMode(Components.interfaces.nsIAppStartup.eAttemptQuit);
- return;
- }
-
- appStartup.quit(Components.interfaces.nsIAppStartup.eAttemptQuit |
- Components.interfaces.nsIAppStartup.eRestart);
- return;
- }
-
- const URI_UPDATE_PROMPT_DIALOG = "chrome://mozapps/content/update/updates.xul";
- // Firefox no longer displays a license for updates and the licenseURL check
- // is just in case a distibution does.
- if (this.update) {
- var ary = null;
- ary = Components.classes["@mozilla.org/supports-array;1"].
- createInstance(Components.interfaces.nsISupportsArray);
- ary.AppendElement(this.update);
- var openFeatures = "chrome,centerscreen,dialog=no,resizable=no,titlebar,toolbar=no";
- Services.ww.openWindow(null, URI_UPDATE_PROMPT_DIALOG, "", openFeatures, ary);
- window.close();
- return;
- }
-
- this.selectPanel("checkingForUpdates");
- this.isChecking = true;
- this.checker.checkForUpdates(this.updateCheckListener, true);
- },
-
- /**
- * Implements nsIUpdateCheckListener. The methods implemented by
- * nsIUpdateCheckListener are in a different scope from nsIIncrementalDownload
- * to make it clear which are used by each interface.
- */
- updateCheckListener: {
- /**
- * See nsIUpdateService.idl
- */
- onCheckComplete: function(aRequest, aUpdates, aUpdateCount) {
- gAppUpdater.isChecking = false;
- gAppUpdater.update = gAppUpdater.aus.
- selectUpdate(aUpdates, aUpdates.length);
- if (!gAppUpdater.update) {
- gAppUpdater.selectPanel("noUpdatesFound");
- return;
- }
-
- if (gAppUpdater.update.unsupported) {
- if (gAppUpdater.update.detailsURL) {
- let unsupportedLink = document.getElementById("unsupportedLink");
- unsupportedLink.href = gAppUpdater.update.detailsURL;
- }
- gAppUpdater.selectPanel("unsupportedSystem");
- return;
- }
-
- if (!gAppUpdater.aus.canApplyUpdates) {
- gAppUpdater.selectPanel("manualUpdate");
- return;
- }
-
- gAppUpdater.selectPanel("updateButtonBox");
- gAppUpdater.setupUpdateButton("update.openUpdateUI." +
- (this.isMajor ? "upgradeButton"
- : "applyButton"));
- },
-
- /**
- * See nsIUpdateService.idl
- */
- onError: function(aRequest, aUpdate) {
- // Errors in the update check are treated as no updates found. If the
- // update check fails repeatedly without a success the user will be
- // notified with the normal app update user interface so this is safe.
- gAppUpdater.isChecking = false;
- gAppUpdater.selectPanel("noUpdatesFound");
- },
-
- /**
- * See nsISupports.idl
- */
- QueryInterface: function(aIID) {
- if (!aIID.equals(Components.interfaces.nsIUpdateCheckListener) &&
- !aIID.equals(Components.interfaces.nsISupports))
- throw Components.results.NS_ERROR_NO_INTERFACE;
- return this;
- }
- },
-
- /**
- * Checks the compatibility of add-ons for the application update.
- */
- checkAddonCompatibility: function() {
- var self = this;
- AddonManager.getAllAddons(function(aAddons) {
- self.addons = [];
- self.addonsCheckedCount = 0;
- aAddons.forEach(function(aAddon) {
- // Protect against code that overrides the add-ons manager and doesn't
- // implement the isCompatibleWith or the findUpdates method.
- if (!("isCompatibleWith" in aAddon) || !("findUpdates" in aAddon)) {
- let errMsg = "Add-on doesn't implement either the isCompatibleWith " +
- "or the findUpdates method!";
- if (aAddon.id)
- errMsg += " Add-on ID: " + aAddon.id;
- Components.utils.reportError(errMsg);
- return;
- }
-
- // If an add-on isn't appDisabled and isn't userDisabled then it is
- // either active now or the user expects it to be active after the
- // restart. If that is the case and the add-on is not installed by the
- // application and is not compatible with the new application version
- // then the user should be warned that the add-on will become
- // incompatible. If an addon's type equals plugin it is skipped since
- // checking plugins compatibility information isn't supported and
- // getting the scope property of a plugin breaks in some environments
- // (see bug 566787).
- try {
- if (aAddon.type != "plugin" && aAddon.isCompatible &&
- !aAddon.appDisabled && !aAddon.userDisabled &&
- aAddon.scope != AddonManager.SCOPE_APPLICATION &&
- !aAddon.isCompatibleWith(self.update.appVersion,
- self.update.platformVersion))
- self.addons.push(aAddon);
- }
- catch (e) {
- Components.utils.reportError(e);
- }
- });
- self.addonsTotalCount = self.addons.length;
- if (self.addonsTotalCount == 0) {
- self.startDownload();
- return;
- }
-
- self.checkAddonsForUpdates();
- });
- },
-
- /**
- * Checks if there are updates for add-ons that are incompatible with the
- * application update.
- */
- checkAddonsForUpdates: function() {
- this.addons.forEach(function(aAddon) {
- aAddon.findUpdates(this, AddonManager.UPDATE_WHEN_NEW_APP_DETECTED,
- this.update.appVersion,
- this.update.platformVersion);
- }, this);
- },
-
- /**
- * See XPIProvider.jsm
- */
- onCompatibilityUpdateAvailable: function(aAddon) {
- for (var i = 0; i < this.addons.length; ++i) {
- if (this.addons[i].id == aAddon.id) {
- this.addons.splice(i, 1);
- break;
- }
- }
- },
-
- /**
- * See XPIProvider.jsm
- */
- onUpdateAvailable: function(aAddon, aInstall) {
- if (!Services.blocklist.isAddonBlocklisted(aAddon.id, aInstall.version,
- this.update.appVersion,
- this.update.platformVersion)) {
- // Compatibility or new version updates mean the same thing here.
- this.onCompatibilityUpdateAvailable(aAddon);
- }
- },
-
- /**
- * See XPIProvider.jsm
- */
- onUpdateFinished: function(aAddon) {
- ++this.addonsCheckedCount;
-
- if (this.addonsCheckedCount < this.addonsTotalCount)
- return;
-
- if (this.addons.length == 0) {
- // Compatibility updates or new version updates were found for all add-ons
- this.startDownload();
- return;
- }
-
- this.selectPanel("updateButtonBox");
- this.setupUpdateButton("update.openUpdateUI." +
- (this.isMajor ? "upgradeButton" : "applyButton"));
- },
-
- /**
- * Starts the download of an update mar.
- */
- startDownload: function() {
- if (!this.update)
- this.update = this.um.activeUpdate;
- this.update.QueryInterface(Components.interfaces.nsIWritablePropertyBag);
- this.update.setProperty("foregroundDownload", "true");
-
- this.aus.pauseDownload();
- let state = this.aus.downloadUpdate(this.update, false);
- if (state == "failed") {
- this.selectPanel("downloadFailed");
- return;
- }
-
- this.setupDownloadingUI();
- },
-
- /**
- * Switches to the UI responsible for tracking the download.
- */
- setupDownloadingUI: function() {
- this.downloadStatus = document.getElementById("downloadStatus");
- this.downloadStatus.value =
- DownloadUtils.getTransferTotal(0, this.update.selectedPatch.size);
- this.selectPanel("downloading");
- this.aus.addDownloadListener(this);
- },
-
- removeDownloadListener: function() {
- if (this.aus) {
- this.aus.removeDownloadListener(this);
- }
- },
-
- /**
- * See nsIRequestObserver.idl
- */
- onStartRequest: function(aRequest, aContext) {
- },
-
- /**
- * See nsIRequestObserver.idl
- */
- onStopRequest: function(aRequest, aContext, aStatusCode) {
- switch (aStatusCode) {
- case Components.results.NS_ERROR_UNEXPECTED:
- if (this.update.selectedPatch.state == "download-failed" &&
- (this.update.isCompleteUpdate || this.update.patchCount != 2)) {
- // Verification error of complete patch, informational text is held in
- // the update object.
- this.removeDownloadListener();
- this.selectPanel("downloadFailed");
- break;
- }
- // Verification failed for a partial patch, complete patch is now
- // downloading so return early and do NOT remove the download listener!
- break;
- case Components.results.NS_BINDING_ABORTED:
- // Do not remove UI listener since the user may resume downloading again.
- break;
- case Components.results.NS_OK:
- this.removeDownloadListener();
- if (this.backgroundUpdateEnabled) {
- this.selectPanel("applying");
- let update = this.um.activeUpdate;
- let self = this;
- Services.obs.addObserver(function (aSubject, aTopic, aData) {
- // Update the UI when the background updater is finished
- let status = aData;
- if (status == "applied" || status == "applied-service" ||
- status == "pending" || status == "pending-service") {
- // If the update is successfully applied, or if the updater has
- // fallen back to non-staged updates, show the Restart to Update
- // button.
- self.selectPanel("updateButtonBox");
- self.setupUpdateButton("update.restart." +
- (self.isMajor ? "upgradeButton" : "updateButton"));
- } else if (status == "failed") {
- // Background update has failed, let's show the UI responsible for
- // prompting the user to update manually.
- self.selectPanel("downloadFailed");
- } else if (status == "downloading") {
- // We've fallen back to downloading the full update because the
- // partial update failed to get staged in the background.
- // Therefore we need to keep our observer.
- self.setupDownloadingUI();
- return;
- }
- Services.obs.removeObserver(arguments.callee, "update-staged");
- }, "update-staged", false);
- } else {
- this.selectPanel("updateButtonBox");
- this.setupUpdateButton("update.restart." +
- (this.isMajor ? "upgradeButton" : "updateButton"));
- }
- break;
- default:
- this.removeDownloadListener();
- this.selectPanel("downloadFailed");
- break;
- }
-
- },
-
- /**
- * See nsIProgressEventSink.idl
- */
- onStatus: function(aRequest, aContext, aStatus, aStatusArg) {
- },
-
- /**
- * See nsIProgressEventSink.idl
- */
- onProgress: function(aRequest, aContext, aProgress, aProgressMax) {
- this.downloadStatus.value =
- DownloadUtils.getTransferTotal(aProgress, aProgressMax);
- },
-
- /**
- * See nsISupports.idl
- */
- QueryInterface: function(aIID) {
- if (!aIID.equals(Components.interfaces.nsIProgressEventSink) &&
- !aIID.equals(Components.interfaces.nsIRequestObserver) &&
- !aIID.equals(Components.interfaces.nsISupports))
- throw Components.results.NS_ERROR_NO_INTERFACE;
- return this;
- }
-};
-#endif
diff --git a/application/palemoon/base/content/aboutDialog.xul b/application/palemoon/base/content/aboutDialog.xul
index 5c344f55d..6edfc2155 100644
--- a/application/palemoon/base/content/aboutDialog.xul
+++ b/application/palemoon/base/content/aboutDialog.xul
@@ -24,9 +24,6 @@
id="PMaboutDialog"
windowtype="Browser:About"
onload="init(event);"
-#ifdef MOZ_UPDATER
- onunload="onUnload(event);"
-#endif
#ifdef XP_MACOSX
inwindowmenu="false"
#else
@@ -38,86 +35,48 @@
<script type="application/javascript" src="chrome://browser/content/aboutDialog.js"/>
- <vbox id="aboutPMDialogContainer">
- <hbox id="PMclientBox">
- <vbox id="PMleftBox" flex="1"/>
- <vbox id="PMrightBox" flex="1">
+ <vbox id="aboutPMDialogContainer" flex="1">
+ <vbox id="aboutHeaderBox" />
+ <vbox id="aboutVersionBox" flex="3">
#ifdef HAVE_64BIT_BUILD
-#expand <label id="PMversion">Version: __MOZ_APP_VERSION__ (64-bit)</label>
+#expand <label id="aboutVersion">Version: __MOZ_APP_VERSION__ (64-bit)</label>
#else
-#expand <label id="PMversion">Version: __MOZ_APP_VERSION__ (32-bit)</label>
+#expand <label id="aboutVersion">Version: __MOZ_APP_VERSION__ (32-bit)</label>
#endif
<label id="distribution" class="text-blurb"/>
<label id="distributionId" class="text-blurb"/>
- <vbox id="detailsBox">
- <vbox id="updateBox">
-#ifdef MOZ_UPDATER
- <deck id="updateDeck" orient="vertical">
- <hbox id="updateButtonBox" align="center">
- <button id="updateButton" align="start"
- oncommand="gAppUpdater.buttonOnCommand();"/>
- <spacer flex="1"/>
- </hbox>
- <hbox id="checkingForUpdates" align="center">
- <image class="update-throbber"/><label>&update.checkingForUpdates;</label>
- </hbox>
- <hbox id="checkingAddonCompat" align="center">
- <image class="update-throbber"/><label>&update.checkingAddonCompat;</label>
- </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>
- </hbox>
- <hbox id="adminDisabled" align="center">
- <label>&update.adminDisabled;</label>
- </hbox>
- <hbox id="noUpdatesFound" align="center">
- <label>&update.noUpdatesFound;</label>
- </hbox>
- <hbox id="manualUpdate" align="center">
- <label>&update.manual.start;</label><label id="manualLink" class="text-link"/><label>&update.manual.end;</label>
- </hbox>
- </deck>
-#endif
- </vbox>
-
- <description class="text-pmcreds">
+ </vbox>
+ <vbox id="aboutTextBox" flex="1">
+ <description class="text-credits text-center">
#if defined(MOZ_OFFICIAL_BRANDING) || defined(MC_OFFICIAL)
#ifdef MC_PRIVATE_BUILD
This is a private build of Pale Moon. If you did not manually build this copy from source yourself, then please download an official version from the <label class="text-link" href="http://www.palemoon.org/">Pale Moon website</label>.
#else
- Pale Moon is released by <label class="text-link" href="http://www.moonchildproductions.info">Moonchild Productions</label>.
+ <label class="text-link" href="http://www.palemoon.org">Pale Moon</label> is released by <label class="text-link" href="http://www.moonchildproductions.info">Moonchild Productions</label>.
</description>
- <description class="text-pmcreds">
+ <description class="text-credits text-center">
Special thanks to all our supporters and donors for making this browser possible!
</description>
- <description class="text-blurb">
+ <description class="text-credits">
If you wish to contribute, please consider helping out by providing support to other users on the <label class="text-link" href="https://forum.palemoon.org/">Pale Moon forum</label>
or getting involved in our development by tackling some of the issues found in our GitHub issue tracker.
#endif
#else
&brandFullName; is released by &vendorShortName;.
</description>
- <description class="text-blurb">
+ <description class="text-credits">
This is an unofficial build of Pale Moon. For official builds, please go to <label class="text-link" href="http://www.palemoon.org/">the Pale Moon website</label>.
#endif
</description>
- </vbox>
- </vbox>
- </hbox>
- <vbox id="PMbottomBox">
+ </vbox>
+ <vbox id="aboutLinkBox">
<hbox pack="center">
- <label class="text-link bottom-link" href="about:license">Licensing information</label>
<label class="text-link bottom-link" href="about:rights">End-user rights</label>
+ <label class="text-link bottom-link" href="about:license">Licensing information</label>
<label class="text-link bottom-link" id="releaseNotesURL">Release notes</label>
</hbox>
- <description id="PMtrademark">&trademarkInfo.part1;</description>
+ <description id="aboutPMtrademark">&trademarkInfo.part1;</description>
</vbox>
</vbox>
diff --git a/application/palemoon/base/content/aboutRobots-icon.png b/application/palemoon/base/content/aboutRobots-icon.png
deleted file mode 100644
index 1c4899aaf..000000000
--- a/application/palemoon/base/content/aboutRobots-icon.png
+++ /dev/null
Binary files differ
diff --git a/application/palemoon/base/content/aboutRobots-widget-left.png b/application/palemoon/base/content/aboutRobots-widget-left.png
deleted file mode 100644
index 3a1e48d5f..000000000
--- a/application/palemoon/base/content/aboutRobots-widget-left.png
+++ /dev/null
Binary files differ
diff --git a/application/palemoon/base/content/aboutRobots.xhtml b/application/palemoon/base/content/aboutRobots.xhtml
deleted file mode 100644
index 23fe3ba17..000000000
--- a/application/palemoon/base/content/aboutRobots.xhtml
+++ /dev/null
@@ -1,108 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- 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/. -->
-
-<!DOCTYPE html [
- <!ENTITY % htmlDTD
- PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "DTD/xhtml1-strict.dtd">
- %htmlDTD;
- <!ENTITY % netErrorDTD
- SYSTEM "chrome://global/locale/netError.dtd">
- %netErrorDTD;
- <!ENTITY % globalDTD
- SYSTEM "chrome://global/locale/global.dtd">
- %globalDTD;
- <!ENTITY % aboutrobotsDTD
- SYSTEM "chrome://browser/locale/aboutRobots.dtd">
- %aboutrobotsDTD;
-]>
-
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>&robots.pagetitle;</title>
- <link rel="stylesheet" href="chrome://global/skin/netError.css" type="text/css" media="all" />
- <link rel="icon" type="image/png" id="favicon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8%2F9hAAAACGFjVEwAAAASAAAAAJNtBPIAAAAaZmNUTAAAAAAAAAAQAAAAEAAAAAAAAAAALuAD6AABhIDeugAAALhJREFUOI2Nk8sNxCAMRDlGohauXFOMpfTiAlxICqAELltHLqlgctg1InzMRhpFAc%2BLGWTnmoeZYamt78zXdZmaQtQMADlnU0OIAlbmJUBEcO4bRKQY2rUXIPmAGnDuG%2FBx3%2FfvOPVaDUg%2BoAPUf1PArIMCSD5glMEsUGaG%2BkyAFWIBaCsKuA%2BHGCNijLgP133XgOEtaPFMy2vUolEGJoCIzBmoRUR9%2B7rxj16DZaW%2FmgtmxnJ8V3oAnApQwNS5zpcAAAAaZmNUTAAAAAEAAAAQAAAAEAAAAAAAAAAAAB4D6AIB52fclgAAACpmZEFUAAAAAjiNY2AYBVhBc3Pzf2LEcGreqcbwH1kDNjHauWAUjAJyAADymxf9WF%2Bu8QAAABpmY1RMAAAAAwAAABAAAAAQAAAAAAAAAAAAHgPoAgEK8Q9%2FAAAAFmZkQVQAAAAEOI1jYBgFo2AUjAIIAAAEEAAB0xIn4wAAABpmY1RMAAAABQAAABAAAAAQAAAAAAAAAAAAHgPoAgHnO30FAAAAQGZkQVQAAAAGOI1jYBieYKcaw39ixHCC%2F6cwFWMTw2rz%2F1MM%2F6Vu%2Ff%2F%2F%2FxTD%2F51qEIwuRjsXILuEGLFRMApgAADhNCsVfozYcAAAABpmY1RMAAAABwAAABAAAAAQAAAAAAAAAAAAHgPoAgEKra7sAAAAFmZkQVQAAAAIOI1jYBgFo2AUjAIIAAAEEAABM9s3hAAAABpmY1RMAAAACQAAABAAAAAQAAAAAAAAAAAAHgPoAgHn3p%2BwAAAAKmZkQVQAAAAKOI1jYBgFWEFzc%2FN%2FYsRwat6pxvAfWQM2Mdq5YBSMAnIAAPKbF%2F1BhPl6AAAAGmZjVEwAAAALAAAAEAAAABAAAAAAAAAAAAAeA%2BgCAQpITFkAAAAWZmRBVAAAAAw4jWNgGAWjYBSMAggAAAQQAAHaszpmAAAAGmZjVEwAAAANAAAAEAAAABAAAAAAAAAAAAAeA%2BgCAeeCPiMAAABAZmRBVAAAAA44jWNgGJ5gpxrDf2LEcIL%2FpzAVYxPDavP%2FUwz%2FpW79%2F%2F%2F%2FFMP%2FnWoQjC5GOxcgu4QYsVEwCmAAAOE0KxUmBL0KAAAAGmZjVEwAAAAPAAAAEAAAABAAAAAAAAAAAAAeA%2BgCAQoU7coAAAAWZmRBVAAAABA4jWNgGAWjYBSMAggAAAQQAAEpOBELAAAAGmZjVEwAAAARAAAAEAAAABAAAAAAAAAAAAAeA%2BgCAeYVWtoAAAAqZmRBVAAAABI4jWNgGAVYQXNz839ixHBq3qnG8B9ZAzYx2rlgFIwCcgAA8psX%2FWvpAecAAAAaZmNUTAAAABMAAAAQAAAAEAAAAAAAAAAAAB4D6AIBC4OJMwAAABZmZEFUAAAAFDiNY2AYBaNgFIwCCAAABBAAAcBQHOkAAAAaZmNUTAAAABUAAAAQAAAAEAAAAAAAAAAAAB4D6AIB5kn7SQAAAEBmZEFUAAAAFjiNY2AYnmCnGsN%2FYsRwgv%2BnMBVjE8Nq8%2F9TDP%2Blbv3%2F%2F%2F8Uw%2F%2BdahCMLkY7FyC7hBixUTAKYAAA4TQrFc%2BcEoQAAAAaZmNUTAAAABcAAAAQAAAAEAAAAAAAAAAAAB4D6AIBC98ooAAAABZmZEFUAAAAGDiNY2AYBaNgFIwCCAAABBAAASCZDI4AAAAaZmNUTAAAABkAAAAQAAAAEAAAAAAAAAAAAB4D6AIB5qwZ%2FAAAACpmZEFUAAAAGjiNY2AYBVhBc3Pzf2LEcGreqcbwH1kDNjHauWAUjAJyAADymxf9cjJWbAAAABpmY1RMAAAAGwAAABAAAAAQAAAAAAAAAAAAHgPoAgELOsoVAAAAFmZkQVQAAAAcOI1jYBgFo2AUjAIIAAAEEAAByfEBbAAAABpmY1RMAAAAHQAAABAAAAAQAAAAAAAAAAAAHgPoAgHm8LhvAAAAQGZkQVQAAAAeOI1jYBieYKcaw39ixHCC%2F6cwFWMTw2rz%2F1MM%2F6Vu%2Ff%2F%2F%2FxTD%2F51qEIwuRjsXILuEGLFRMApgAADhNCsVlxR3%2FgAAABpmY1RMAAAAHwAAABAAAAAQAAAAAAAAAAAAHgPoAgELZmuGAAAAFmZkQVQAAAAgOI1jYBgFo2AUjAIIAAAEEAABHP5cFQAAABpmY1RMAAAAIQAAABAAAAAQAAAAAAAAAAAAHgPoAgHlgtAOAAAAKmZkQVQAAAAiOI1jYBgFWEFzc%2FN%2FYsRwat6pxvAfWQM2Mdq5YBSMAnIAAPKbF%2F0%2FMvDdAAAAAElFTkSuQmCC"/>
-
- <script type="application/javascript"><![CDATA[
- var buttonClicked = false;
- function robotButton()
- {
- var button = document.getElementById('errorTryAgain');
- if (buttonClicked) {
- button.style.visibility = "hidden";
- } else {
- var newLabel = button.getAttribute("label2");
- button.textContent = newLabel;
- buttonClicked = true;
- }
- }
- ]]></script>
-
- <style type="text/css"><![CDATA[
- #errorPageContainer {
- background-image: none;
- }
-
- #errorPageContainer:before {
- content: url('chrome://browser/content/aboutRobots-icon.png');
- position: absolute;
- }
-
- body[dir=rtl] #icon,
- body[dir=rtl] #errorPageContainer:before {
- transform: scaleX(-1);
- }
- ]]></style>
- </head>
-
- <body dir="&locale.dir;">
-
- <!-- PAGE CONTAINER (for styling purposes only) -->
- <div id="errorPageContainer">
-
- <!-- Error Title -->
- <div id="errorTitle">
- <h1 id="errorTitleText">&robots.errorTitleText;</h1>
- </div>
-
- <!-- LONG CONTENT (the section most likely to require scrolling) -->
- <div id="errorLongContent">
-
- <!-- Short Description -->
- <div id="errorShortDesc">
- <p id="errorShortDescText">&robots.errorShortDescText;</p>
- </div>
-
- <!-- Long Description (Note: See netError.dtd for used XHTML tags) -->
- <div id="errorLongDesc">
- <ul>
- <li>&robots.errorLongDesc1;</li>
- <li>&robots.errorLongDesc2;</li>
- <li>&robots.errorLongDesc3;</li>
- <li>&robots.errorLongDesc4;</li>
- </ul>
- </div>
-
- <!-- Short Description -->
- <div id="errorTrailerDesc">
- <p id="errorTrailerDescText">&robots.errorTrailerDescText;</p>
- </div>
-
- </div>
-
- <!-- Button -->
- <button id="errorTryAgain"
- label2="&robots.dontpress;"
- onclick="robotButton();">&retry.label;</button>
-
- <img src="chrome://browser/content/aboutRobots-widget-left.png"
- style="position: absolute; bottom: -12px; left: -10px;"/>
- <img src="chrome://browser/content/aboutRobots-widget-left.png"
- style="position: absolute; bottom: -12px; right: -10px; transform: scaleX(-1);"/>
- </div>
-
- </body>
-</html>
diff --git a/application/palemoon/base/content/baseMenuOverlay.xul b/application/palemoon/base/content/baseMenuOverlay.xul
index e9019dc55..a006ed5c6 100644
--- a/application/palemoon/base/content/baseMenuOverlay.xul
+++ b/application/palemoon/base/content/baseMenuOverlay.xul
@@ -41,7 +41,7 @@
label="&helpMenu.label;"
accesskey="&helpMenu.accesskey;">
#endif
- <menupopup id="menu_HelpPopup">
+ <menupopup id="menu_HelpPopup" onpopupshowing="buildHelpMenu();">
<menuitem id="menu_openHelp"
oncommand="openHelpLink('firefox-help')"
onclick="checkForMiddleClick(this, event);"
@@ -66,6 +66,14 @@
accesskey="&helpSafeMode.accesskey;"
label="&helpSafeMode.label;"
oncommand="restart(true);"/>
+ <menuseparator id="updatesSeparator"/>
+ <menuitem id="checkForUpdates" class="menuitem-iconic"
+#ifdef MOZ_UPDATER
+ label="&updateCmd.label;"
+ oncommand="checkForUpdates();"/>
+#else
+ hidden="true"/>
+#endif
<menuseparator id="aboutSeparator"/>
<menuitem id="aboutName"
accesskey="&aboutProduct.accesskey;"
diff --git a/application/palemoon/base/content/browser-appmenu.inc b/application/palemoon/base/content/browser-appmenu.inc
index cfc855484..ffb117a60 100644
--- a/application/palemoon/base/content/browser-appmenu.inc
+++ b/application/palemoon/base/content/browser-appmenu.inc
@@ -341,7 +341,7 @@
<splitmenu id="appmenu_help"
label="&helpMenu.label;"
oncommand="openHelpLink('firefox-help')">
- <menupopup id="appmenu_helpMenupopup">
+ <menupopup id="appmenu_helpMenupopup" onpopupshowing="buildHelpMenu();">
<menuitem id="appmenu_openHelp"
label="&helpMenu.label;"
oncommand="openHelpLink('firefox-help')"
@@ -358,6 +358,13 @@
<menuitem id="appmenu_safeMode"
label="&appMenuSafeMode.label;"
oncommand="restart(true);"/>
+#ifdef MOZ_UPDATER
+ <menuseparator/>
+ <menuitem id="appmenu_checkForUpdates"
+ class="menuitem-iconic"
+ label="&updateCmd.label;"
+ oncommand="checkForUpdates();"/>
+#endif
<menuseparator/>
<menuitem id="appmenu_about"
label="&aboutProduct.label;"
diff --git a/application/palemoon/base/content/browser-context.inc b/application/palemoon/base/content/browser-context.inc
index f672ede61..38c472508 100644
--- a/application/palemoon/base/content/browser-context.inc
+++ b/application/palemoon/base/content/browser-context.inc
@@ -70,7 +70,7 @@
label="&mediaUnmute.label;"
accesskey="&mediaUnmute.accesskey;"
oncommand="gContextMenu.mediaCommand('unmute');"/>
- <menu id="context-media-playbackrate" label="&mediaPlaybackRate.label;" accesskey="&mediaPlaybackRate.accesskey;">
+ <menu id="context-media-playbackrate" label="&mediaPlaybackRate2.label;" accesskey="&mediaPlaybackRate2.accesskey;">
<menupopup>
<menuitem id="context-media-playbackrate-050x"
label="&mediaPlaybackRate050x.label;"
@@ -99,6 +99,11 @@
oncommand="gContextMenu.mediaCommand('playbackRate', 2.0);"/>
</menupopup>
</menu>
+ <menuitem id="context-media-loop"
+ label="&mediaLoop.label;"
+ accesskey="&mediaLoop.accesskey;"
+ type="checkbox"
+ oncommand="gContextMenu.mediaCommand('loop');"/>
<menuitem id="context-media-showcontrols"
label="&mediaShowControls.label;"
accesskey="&mediaShowControls.accesskey;"
diff --git a/application/palemoon/base/content/browser-fullScreen.js b/application/palemoon/base/content/browser-fullScreen.js
index b1235a8d3..e816ce5c1 100644
--- a/application/palemoon/base/content/browser-fullScreen.js
+++ b/application/palemoon/base/content/browser-fullScreen.js
@@ -53,17 +53,9 @@ var FullScreen = {
document.addEventListener("popupshown", this._setPopupOpen, false);
document.addEventListener("popuphidden", this._setPopupOpen, false);
this._shouldAnimate = true;
- // If it is not safe to collapse, add the mouse position tracker or
- // else it won't be possible to hide the navigation toolbox again
- if (!this._safeToCollapse(document.mozFullScreen)) {
- let rect = gBrowser.mPanelContainer.getBoundingClientRect();
- this._mouseTargetRect = {
- top: rect.top + 50,
- bottom: rect.bottom,
- left: rect.left,
- right: rect.right
- };
- MousePosTracker.addListener(this);
+ if (gPrefService.getBoolPref("browser.fullscreen.autohide")) {
+ gBrowser.mPanelContainer.addEventListener("mousemove",
+ this._collapseCallback, false);
}
// We don't animate the toolbar collapse if in DOM full-screen mode,
// as the size of the content area would still be changing after the
@@ -149,7 +141,8 @@ var FullScreen = {
cleanup: function () {
if (!window.fullScreen) {
- MousePosTracker.removeListener(this);
+ gBrowser.mPanelContainer.removeEventListener("mousemove",
+ this._collapseCallback, false);
document.removeEventListener("keypress", this._keyToggleCallback, false);
document.removeEventListener("popupshown", this._setPopupOpen, false);
document.removeEventListener("popuphidden", this._setPopupOpen, false);
@@ -164,17 +157,12 @@ var FullScreen = {
}
},
- getMouseTargetRect: function()
- {
- return this._mouseTargetRect;
- },
-
// Event callbacks
_expandCallback: function()
{
FullScreen.showNavToolbox();
},
- onMouseEnter: function()
+ _collapseCallback: function()
{
FullScreen.hideNavToolbox();
},
@@ -328,14 +316,8 @@ var FullScreen = {
// Track whether mouse is near the toolbox
this._isChromeCollapsed = false;
if (trackMouse) {
- let rect = gBrowser.mPanelContainer.getBoundingClientRect();
- this._mouseTargetRect = {
- top: rect.top + 50,
- bottom: rect.bottom,
- left: rect.left,
- right: rect.right
- };
- MousePosTracker.addListener(this);
+ gBrowser.mPanelContainer.addEventListener("mousemove",
+ this._collapseCallback, false);
}
},
@@ -378,7 +360,8 @@ var FullScreen = {
gNavToolbox.style.marginTop =
-gNavToolbox.getBoundingClientRect().height + "px";
this._isChromeCollapsed = true;
- MousePosTracker.removeListener(this);
+ gBrowser.mPanelContainer.removeEventListener("mousemove",
+ this._collapseCallback, false);
},
showXULChrome: function(aTag, aShow)
diff --git a/application/palemoon/base/content/browser-menudragging.js b/application/palemoon/base/content/browser-menudragging.js
index cf26b2ba4..f3f00d72c 100644
--- a/application/palemoon/base/content/browser-menudragging.js
+++ b/application/palemoon/base/content/browser-menudragging.js
@@ -52,11 +52,9 @@ var browserMenuDragging = {
initPref: function(){
this.STAY_OPEN_ONDRAGEXIT =
- this.getPref('browser.menu.dragging.stayOpen',
- 'bool', false);
+ Services.prefs.getBoolPref('browser.menu.dragging.stayOpen', false);
this.DEBUG =
- this.getPref('browser.menu.dragging.debug',
- 'bool', false);
+ Services.prefs.getBoolPref('browser.menu.dragging.debug', false);
},
//delayed startup
@@ -291,26 +289,6 @@ var browserMenuDragging = {
.logStringMessage(aMsg);
},
- getPref: function(aPrefString, aPrefType, aDefault){
- var xpPref = Components.classes["@mozilla.org/preferences-service;1"]
- .getService(Components.interfaces.nsIPrefService);
- try{
- switch (aPrefType){
- case 'complex':
- return xpPref.getComplexValue(aPrefString, Components.interfaces.nsILocalFile); break;
- case 'str':
- return xpPref.getCharPref(aPrefString).toString(); break;
- case 'int':
- return xpPref.getIntPref(aPrefString); break;
- case 'bool':
- default:
- return xpPref.getBoolPref(aPrefString); break;
- }
- }catch(e){
- }
- return aDefault;
- },
-
setPref: function(aPrefString, aPrefType, aValue){
var xpPref = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefService);
diff --git a/application/palemoon/base/content/browser-title.css b/application/palemoon/base/content/browser-title.css
index 66b5e6731..5f7e77564 100644
--- a/application/palemoon/base/content/browser-title.css
+++ b/application/palemoon/base/content/browser-title.css
@@ -50,13 +50,6 @@
right: -12px;
}
-/* Lightweight Themes */
-
-#main-window:-moz-lwtheme::after {
- color: inherit;
- text-shadow: inherit;
-}
-
/* Windows Classic theme */
@media all and (-moz-windows-classic) {
@@ -192,6 +185,13 @@
}
+/* Lightweight Themes */
+
+#main-window:-moz-lwtheme::after {
+ color: inherit;
+ text-shadow: inherit;
+}
+
/* Hide for small windows */
diff --git a/application/palemoon/base/content/browser.js b/application/palemoon/base/content/browser.js
index eb4916e37..7672fa3a8 100644
--- a/application/palemoon/base/content/browser.js
+++ b/application/palemoon/base/content/browser.js
@@ -1147,7 +1147,7 @@ var gBrowserInit = {
// Setup click-and-hold gestures access to the session history
// menus if global click-and-hold isn't turned on
- if (!getBoolPref("ui.click_hold_context_menus", false))
+ if (!Services.prefs.getBoolPref("ui.click_hold_context_menus", false))
SetClickAndHoldHandlers();
// Initialize the full zoom setting.
@@ -1783,7 +1783,7 @@ function BrowserGoHome(aEvent) {
case "tabshifted":
case "tab":
urls = homePage.split("|");
- var loadInBackground = getBoolPref("browser.tabs.loadBookmarksInBackground", false);
+ var loadInBackground = Services.prefs.getBoolPref("browser.tabs.loadBookmarksInBackground", false);
gBrowser.loadTabs(urls, loadInBackground);
break;
case "window":
@@ -2661,6 +2661,11 @@ function getWebNavigation()
}
function BrowserReloadWithFlags(reloadFlags) {
+
+ // Reset DOS mitigation for auth prompts when user initiates a reload.
+ let browser = gBrowser.selectedBrowser;
+ delete browser.authPromptCounter;
+
/* First, we'll try to use the session history object to reload so
* that framesets are handled properly. If we're in a special
* window (such as view-source) that has no session history, fall
@@ -3397,7 +3402,7 @@ function BrowserCustomizeToolbar() {
TabsInTitlebar.allowedBy("customizing-toolbars", false);
var customizeURL = "chrome://global/content/customizeToolbar.xul";
- gCustomizeSheet = getBoolPref("toolbar.customization.usesheet", false);
+ gCustomizeSheet = Services.prefs.getBoolPref("toolbar.customization.usesheet", false);
if (gCustomizeSheet) {
let sheetFrame = document.createElement("iframe");
@@ -3481,7 +3486,7 @@ function BrowserToolboxCustomizeDone(aToolboxChanged) {
cmd.removeAttribute("disabled");
// make sure to re-enable click-and-hold
- if (!getBoolPref("ui.click_hold_context_menus", false))
+ if (!Services.prefs.getBoolPref("ui.click_hold_context_menus", false))
SetClickAndHoldHandlers();
gBrowser.selectedBrowser.focus();
@@ -4408,7 +4413,13 @@ nsBrowserAccess.prototype = {
openURI: function (aURI, aOpener, aWhere, aContext) {
var newWindow = null;
- var isExternal = (aContext == Ci.nsIBrowserDOMWindow.OPEN_EXTERNAL);
+ var isExternal = !!(aContext & Ci.nsIBrowserDOMWindow.OPEN_EXTERNAL);
+
+ if (aOpener && isExternal) {
+ Cu.reportError("nsBrowserAccess.openURI did not expect an opener to be " +
+ "passed if the context is OPEN_EXTERNAL.");
+ throw Cr.NS_ERROR_FAILURE;
+ }
if (isExternal && aURI && aURI.schemeIs("chrome")) {
dump("use -chrome command-line option to load external chrome urls\n");
@@ -5327,9 +5338,6 @@ function handleDroppedLink(event, urlOrLinks, name)
let lastLocationChange = gBrowser.selectedBrowser.lastLocationChange;
- let userContextId = gBrowser.selectedBrowser
- .getAttribute("usercontextid") || 0;
-
let inBackground = Services.prefs.getBoolPref("browser.tabs.loadInBackground");
if (event.shiftKey)
inBackground = !inBackground;
@@ -5348,7 +5356,6 @@ function handleDroppedLink(event, urlOrLinks, name)
replace: true,
allowThirdPartyFixup: false,
postDatas,
- userContextId,
});
}
});
diff --git a/application/palemoon/base/content/browser.xul b/application/palemoon/base/content/browser.xul
index ce2a7c5a8..ddc305a7b 100644
--- a/application/palemoon/base/content/browser.xul
+++ b/application/palemoon/base/content/browser.xul
@@ -965,7 +965,8 @@
tabcontainer="tabbrowser-tabs"
contentcontextmenu="contentAreaContextMenu"
autocompletepopup="PopupAutoComplete"
- datetimepicker="DateTimePickerPanel"/>
+ datetimepicker="DateTimePickerPanel"
+ authdosprotected="true"/>
<chatbar id="pinnedchats" layer="true" mousethrough="always" hidden="true"/>
<statuspanel id="statusbar-display" inactive="true"/>
</vbox>
diff --git a/application/palemoon/base/content/content.js b/application/palemoon/base/content/content.js
index 653dac3e3..211a24a8b 100644
--- a/application/palemoon/base/content/content.js
+++ b/application/palemoon/base/content/content.js
@@ -139,7 +139,6 @@ var handleContentContextMenu = function (event) {
let selectionInfo = BrowserUtils.getSelectionDetails(content);
let loadContext = docShell.QueryInterface(Ci.nsILoadContext);
- let userContextId = loadContext.originAttributes.userContextId;
let browser = docShell.chromeEventHandler;
let mainWin = browser.ownerGlobal;
@@ -160,7 +159,6 @@ var handleContentContextMenu = function (event) {
selectionInfo: selectionInfo,
loginFillInfo,
parentAllowsMixedContent,
- userContextId,
};
}
diff --git a/application/palemoon/base/content/nsContextMenu.js b/application/palemoon/base/content/nsContextMenu.js
index 1d4f88816..916dd2637 100644
--- a/application/palemoon/base/content/nsContextMenu.js
+++ b/application/palemoon/base/content/nsContextMenu.js
@@ -381,6 +381,7 @@ nsContextMenu.prototype = {
this.showItem("context-media-mute", onMedia && !this.target.muted);
this.showItem("context-media-unmute", onMedia && this.target.muted);
this.showItem("context-media-playbackrate", onMedia);
+ this.showItem("context-media-loop", onMedia);
this.showItem("context-media-showcontrols", onMedia && !this.target.controls);
this.showItem("context-media-hidecontrols", onMedia && this.target.controls);
this.showItem("context-video-fullscreen", this.onVideo && this.target.ownerDocument.mozFullScreenElement == null);
@@ -394,6 +395,7 @@ nsContextMenu.prototype = {
this.setItemAttr("context-media-playbackrate-100x", "checked", this.target.playbackRate == 1.0);
this.setItemAttr("context-media-playbackrate-150x", "checked", this.target.playbackRate == 1.5);
this.setItemAttr("context-media-playbackrate-200x", "checked", this.target.playbackRate == 2.0);
+ this.setItemAttr("context-media-loop", "checked", this.target.loop);
var hasError = this.target.error != null ||
this.target.networkState == this.target.NETWORK_NO_SOURCE;
this.setItemAttr("context-media-play", "disabled", hasError);
@@ -1531,6 +1533,9 @@ nsContextMenu.prototype = {
case "pause":
media.pause();
break;
+ case "loop":
+ media.loop = !media.loop;
+ break;
case "mute":
media.muted = true;
break;
diff --git a/application/palemoon/base/content/palemoon.xhtml b/application/palemoon/base/content/palemoon.xhtml
index 96757052c..f145550a9 100644
--- a/application/palemoon/base/content/palemoon.xhtml
+++ b/application/palemoon/base/content/palemoon.xhtml
@@ -13,7 +13,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset='utf-8' />
- <title>&chronicles.title.55.2;</title>
+ <title>&chronicles.title.66.1;</title>
<style type="text/css">
html {
@@ -54,11 +54,11 @@ a {
<section>
<p id="moztext">
- &chronicles.quote.55.2;
+ &chronicles.quote.66.1;
</p>
<p id="from">
- &chronicles.from.55.2;
+ &chronicles.from.66.1;
</p>
</section>
diff --git a/application/palemoon/base/content/tabbrowser.xml b/application/palemoon/base/content/tabbrowser.xml
index 988cae55c..868179b5d 100644
--- a/application/palemoon/base/content/tabbrowser.xml
+++ b/application/palemoon/base/content/tabbrowser.xml
@@ -30,7 +30,7 @@
<xul:vbox flex="1" class="browserContainer">
<xul:stack flex="1" class="browserStack" anonid="browserStack">
<xul:browser anonid="initialBrowser" type="content-primary" message="true" disablehistory="true"
- xbl:inherits="tooltip=contenttooltip,contextmenu=contentcontextmenu,autocompletepopup,datetimepicker"/>
+ xbl:inherits="tooltip=contenttooltip,contextmenu=contentcontextmenu,autocompletepopup,datetimepicker,authdosprotected"/>
</xul:stack>
</xul:vbox>
</xul:hbox>
@@ -737,8 +737,7 @@
let autocomplete = this.mTabBrowser._placesAutocomplete;
if (this.mBrowser.registeredOpenURI) {
- autocomplete.unregisterOpenPage(this.mBrowser.registeredOpenURI,
- this.mBrowser.getAttribute("usercontextid") || 0);
+ autocomplete.unregisterOpenPage(this.mBrowser.registeredOpenURI);
delete this.mBrowser.registeredOpenURI;
}
// Tabs in private windows aren't registered as "Open" so
@@ -746,8 +745,7 @@
if (!isBlankPageURL(aLocation.spec) &&
(!PrivateBrowsingUtils.isWindowPrivate(window) ||
PrivateBrowsingUtils.permanentPrivateBrowsing)) {
- autocomplete.registerOpenPage(aLocation,
- this.mBrowser.getAttribute("usercontextid") || 0);
+ autocomplete.registerOpenPage(aLocation);
this.mBrowser.registeredOpenURI = aLocation;
}
}
@@ -1383,7 +1381,6 @@
let aTargetTab;
let aNewIndex = -1;
let aPostDatas = [];
- let aUserContextId;
if (arguments.length == 2 &&
typeof arguments[1] == "object") {
let params = arguments[1];
@@ -1394,7 +1391,6 @@
aNewIndex = typeof params.newIndex === "number" ?
params.newIndex : aNewIndex;
aPostDatas = params.postDatas || aPostDatas;
- aUserContextId = params.userContextId;
}
if (!aURIs.length)
@@ -1443,8 +1439,7 @@
ownerTab: owner,
skipAnimation: multiple,
allowThirdPartyFixup: aAllowThirdPartyFixup,
- postData: aPostDatas[0],
- userContextId: aUserContextId
+ postData: aPostDatas[0]
});
if (aNewIndex !== -1) {
this.moveTabTo(firstTabAdded, aNewIndex);
@@ -1457,8 +1452,7 @@
let tab = this.addTab(aURIs[i], {
skipAnimation: true,
allowThirdPartyFixup: aAllowThirdPartyFixup,
- postData: aPostDatas[i],
- userContextId: aUserContextId
+ postData: aPostDatas[i]
});
if (targetTabIndex !== -1)
this.moveTabTo(tab, ++tabNum);
@@ -1588,6 +1582,10 @@
if (this.hasAttribute("datetimepicker")) {
b.setAttribute("datetimepicker", this.getAttribute("datetimepicker"));
}
+
+ if (this.hasAttribute("authdosprotected")) {
+ b.setAttribute("authdosprotected", this.getAttribute("authdosprotected"));
+ }
// Create the browserStack container
var stack = document.createElementNS(NS_XUL, "stack");
@@ -2055,8 +2053,7 @@
this.mTabListeners[aTab._tPos].destroy();
if (browser.registeredOpenURI && !aTabWillBeMoved) {
- this._placesAutocomplete.unregisterOpenPage(browser.registeredOpenURI,
- browser.getAttribute("usercontextid") || 0);
+ this._placesAutocomplete.unregisterOpenPage(browser.registeredOpenURI);
delete browser.registeredOpenURI;
}
@@ -2424,8 +2421,7 @@
<![CDATA[
// If the current URI is registered as open remove it from the list.
if (aOurBrowser.registeredOpenURI) {
- this._placesAutocomplete.unregisterOpenPage(aOurBrowser.registeredOpenURI,
- aOurBrowser.getAttribute("usercontextid") || 0);
+ this._placesAutocomplete.unregisterOpenPage(aOurBrowser.registeredOpenURI);
delete aOurBrowser.registeredOpenURI;
}
@@ -2458,7 +2454,10 @@
<parameter name="aTab"/>
<body>
<![CDATA[
- this.getBrowserForTab(aTab).reload();
+ let browser = this.getBrowserForTab(aTab);
+ // Reset DOS mitigation for basic auth prompt
+ delete browser.authPromptCounter;
+ browser.reload();
]]>
</body>
</method>
@@ -3332,8 +3331,7 @@
for (var i = 0; i < this.mTabListeners.length; ++i) {
let browser = this.getBrowserAtIndex(i);
if (browser.registeredOpenURI) {
- this._placesAutocomplete.unregisterOpenPage(browser.registeredOpenURI,
- browser.getAttribute("usercontextid") || 0);
+ this._placesAutocomplete.unregisterOpenPage(browser.registeredOpenURI);
delete browser.registeredOpenURI;
}
browser.webProgress.removeProgressListener(this.mTabFilters[i]);
@@ -4792,8 +4790,6 @@
inBackground = !inBackground;
let targetTab = this._getDragTargetTab(event);
- let userContextId = this.selectedItem
- .getAttribute("usercontextid") || 0;
let replace = !(!targetTab || dropEffect == "copy");
let newIndex = this._getDropIndex(event);
let urls = links.map(link => link.url);
@@ -4803,7 +4799,6 @@
allowThirdPartyFixup: true,
targetTab,
newIndex,
- userContextId,
});
}
diff --git a/application/palemoon/base/content/urlbarBindings.xml b/application/palemoon/base/content/urlbarBindings.xml
index d188e6658..d2d9cc720 100644
--- a/application/palemoon/base/content/urlbarBindings.xml
+++ b/application/palemoon/base/content/urlbarBindings.xml
@@ -302,6 +302,10 @@
// but don't let that interfere with the loading of the url.
Cu.reportError(ex);
}
+
+ // Reset DOS mitigations for the basic auth prompt.
+ let browser = gBrowser.selectedBrowser;
+ delete browser.authPromptCounter;
function loadCurrent() {
let flags = Ci.nsIWebNavigation.LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP;
diff --git a/application/palemoon/base/content/utilityOverlay.js b/application/palemoon/base/content/utilityOverlay.js
index 2c1a95f83..c2a8baeed 100644
--- a/application/palemoon/base/content/utilityOverlay.js
+++ b/application/palemoon/base/content/utilityOverlay.js
@@ -75,16 +75,6 @@ function openTopWin(url) {
openUILinkIn(url, "current");
}
-function getBoolPref(prefname, def)
-{
- try {
- return Services.prefs.getBoolPref(prefname);
- }
- catch(er) {
- return def;
- }
-}
-
/* openUILink handles clicks on UI elements that cause URLs to load.
*
* As the third argument, you may pass an object with the same properties as
@@ -151,7 +141,7 @@ function whereToOpenLink( e, ignoreButton, ignoreAlt )
// ignoreButton allows "middle-click paste" to use function without always opening in a new window.
var middle = !ignoreButton && e.button == 1;
- var middleUsesTabs = getBoolPref("browser.tabs.opentabfor.middleclick", true);
+ var middleUsesTabs = Services.prefs.getBoolPref("browser.tabs.opentabfor.middleclick", true);
// Don't do anything special with right-mouse clicks. They're probably clicks on context menu items.
@@ -162,7 +152,7 @@ function whereToOpenLink( e, ignoreButton, ignoreAlt )
#endif
return shift ? "tabshifted" : "tab";
- if (alt && getBoolPref("browser.altClickSave", false))
+ if (alt && Services.prefs.getBoolPref("browser.altClickSave", false))
return "save";
if (shift || (middle && !middleUsesTabs))
@@ -334,7 +324,7 @@ function openLinkIn(url, where, params) {
if (loadInBackground == null) {
loadInBackground = aFromChrome ?
false :
- getBoolPref("browser.tabs.loadInBackground");
+ Services.prefs.getBoolPref("browser.tabs.loadInBackground");
}
let uriObj;
@@ -515,7 +505,7 @@ function getShellService()
function isBidiEnabled() {
// first check the pref.
- if (getBoolPref("bidi.browser.ui", false))
+ if (Services.prefs.getBoolPref("bidi.browser.ui", false))
return true;
// if the pref isn't set, check for an RTL locale and force the pref to true
@@ -541,6 +531,117 @@ function isBidiEnabled() {
return rv;
}
+#ifdef MOZ_UPDATER
+/**
+ * Opens the update manager and checks for updates to the application.
+ */
+function checkForUpdates()
+{
+ var um =
+ Components.classes["@mozilla.org/updates/update-manager;1"].
+ getService(Components.interfaces.nsIUpdateManager);
+ var prompter =
+ Components.classes["@mozilla.org/updates/update-prompt;1"].
+ createInstance(Components.interfaces.nsIUpdatePrompt);
+
+ // If there's an update ready to be applied, show the "Update Downloaded"
+ // UI instead and let the user know they have to restart the application for
+ // the changes to be applied.
+ if (um.activeUpdate && um.activeUpdate.state == "pending")
+ prompter.showUpdateDownloaded(um.activeUpdate);
+ else
+ prompter.checkForUpdates();
+}
+#endif
+
+/**
+ * Set up the help menu software update items to show proper status,
+ * also disabling the items if update is disabled.
+ */
+function buildHelpMenu()
+{
+#ifdef MOZ_UPDATER
+ var updates =
+ Components.classes["@mozilla.org/updates/update-service;1"].
+ getService(Components.interfaces.nsIApplicationUpdateService);
+ var um =
+ Components.classes["@mozilla.org/updates/update-manager;1"].
+ getService(Components.interfaces.nsIUpdateManager);
+
+ // Disable the UI if the update enabled pref has been locked by the
+ // administrator or if we cannot update for some other reason.
+ var checkForUpdates = document.getElementById("checkForUpdates");
+ var appMenuCheckForUpdates = document.getElementById("appmenu_checkForUpdates");
+ var canCheckForUpdates = updates.canCheckForUpdates;
+ checkForUpdates.setAttribute("disabled", !canCheckForUpdates);
+ appMenuCheckForUpdates.setAttribute("disabled", !canCheckForUpdates);
+ if (!canCheckForUpdates)
+ return;
+
+ var strings = document.getElementById("bundle_browser");
+ var activeUpdate = um.activeUpdate;
+
+ // If there's an active update, substitute its name into the label
+ // we show for this item, otherwise display a generic label.
+ function getStringWithUpdateName(key) {
+ if (activeUpdate && activeUpdate.name)
+ return strings.getFormattedString(key, [activeUpdate.name]);
+ return strings.getString(key + "Fallback");
+ }
+
+ // By default, show "Check for Updates..." from updatesItem_default or
+ // updatesItem_defaultFallback
+ var key = "default";
+ if (activeUpdate) {
+ switch (activeUpdate.state) {
+ case "downloading":
+ // If we're downloading an update at present, show the text:
+ // "Downloading Thunderbird x.x..." from updatesItem_downloading or
+ // updatesItem_downloadingFallback, otherwise we're paused, and show
+ // "Resume Downloading Thunderbird x.x..." from updatesItem_resume or
+ // updatesItem_resumeFallback
+ key = updates.isDownloading ? "downloading" : "resume";
+ break;
+ case "pending":
+ // If we're waiting for the user to restart, show: "Apply Downloaded
+ // Updates Now..." from updatesItem_pending or
+ // updatesItem_pendingFallback
+ key = "pending";
+ break;
+ }
+ }
+
+ checkForUpdates.label = getStringWithUpdateName("updatesItem_" + key);
+ appMenuCheckForUpdates.label = getStringWithUpdateName("updatesItem_" + key);
+ // updatesItem_default.accesskey, updatesItem_downloading.accesskey,
+ // updatesItem_resume.accesskey or updatesItem_pending.accesskey
+ checkForUpdates.accessKey = strings.getString("updatesItem_" + key +
+ ".accesskey");
+ appMenuCheckForUpdates.accessKey = strings.getString("updatesItem_" + key +
+ ".accesskey");
+ if (um.activeUpdate && updates.isDownloading) {
+ checkForUpdates.setAttribute("loading", "true");
+ appMenuCheckForUpdates.setAttribute("loading", "true");
+ } else {
+ checkForUpdates.removeAttribute("loading");
+ appMenuCheckForUpdates.removeAttribute("loading");
+ }
+#else
+#ifndef XP_MACOSX
+ // Some extensions may rely on these being present so only hide the about
+ // separator when there are no elements besides the check for updates menuitem
+ // in between the about separator and the updates separator.
+ var updatesSeparator = document.getElementById("updatesSeparator");
+ var aboutSeparator = document.getElementById("aboutSeparator");
+ var checkForUpdates = document.getElementById("checkForUpdates");
+ if (updatesSeparator.nextSibling === checkForUpdates &&
+ checkForUpdates.nextSibling === aboutSeparator)
+ updatesSeparator.hidden = true;
+#endif
+#endif
+}
+
+
function openAboutDialog() {
var enumerator = Services.wm.getEnumerator("Browser:About");
while (enumerator.hasMoreElements()) {
@@ -562,7 +663,7 @@ function openAboutDialog() {
function openPreferences(paneID, extraArgs)
{
- var instantApply = getBoolPref("browser.preferences.instantApply", false);
+ var instantApply = Services.prefs.getBoolPref("browser.preferences.instantApply", false);
var features = "chrome,titlebar,toolbar,centerscreen" + (instantApply ? ",dialog=no" : ",modal");
var win = Services.wm.getMostRecentWindow("Browser:Preferences");
@@ -743,7 +844,7 @@ function openHelpLink(aHelpTopic, aCalledFromModal) {
function openPrefsHelp() {
// non-instant apply prefwindows are usually modal, so we can't open in the topmost window,
// since its probably behind the window.
- var instantApply = getBoolPref("browser.preferences.instantApply");
+ var instantApply = Services.prefs.getBoolPref("browser.preferences.instantApply");
var helpTopic = document.getElementsByTagName("prefwindow")[0].currentPane.helpTopic;
openHelpLink(helpTopic, !instantApply);