summaryrefslogtreecommitdiffstats
path: root/application/palemoon
diff options
context:
space:
mode:
Diffstat (limited to 'application/palemoon')
-rw-r--r--application/palemoon/app/Makefile.in2
-rw-r--r--application/palemoon/app/macversion.py2
-rw-r--r--application/palemoon/app/profile/palemoon.js9
-rw-r--r--application/palemoon/base/content/browser-fullScreen.js207
-rw-r--r--application/palemoon/base/content/browser.css4
-rw-r--r--application/palemoon/base/content/browser.js54
-rw-r--r--application/palemoon/base/content/browser.xul2
-rw-r--r--application/palemoon/base/content/nsContextMenu.js7
-rw-r--r--application/palemoon/base/content/openLocation.js2
-rw-r--r--application/palemoon/base/content/tabbrowser.xml18
-rw-r--r--application/palemoon/base/content/urlbarBindings.xml4
-rw-r--r--application/palemoon/base/content/utilityOverlay.js54
-rw-r--r--application/palemoon/base/jar.mn2
-rw-r--r--application/palemoon/components/feeds/FeedWriter.js2
-rw-r--r--application/palemoon/components/nsBrowserGlue.js114
-rw-r--r--application/palemoon/components/places/content/editBookmarkOverlay.js21
-rw-r--r--application/palemoon/components/sessionstore/SessionStore.jsm30
-rw-r--r--application/palemoon/confvars.sh14
-rw-r--r--application/palemoon/locales/en-US/chrome/browser/browser.properties8
-rw-r--r--application/palemoon/themes/linux/Push-16.pngbin606 -> 0 bytes
-rw-r--r--application/palemoon/themes/linux/Push-64.pngbin8056 -> 0 bytes
-rw-r--r--application/palemoon/themes/linux/browser.css4
-rw-r--r--application/palemoon/themes/osx/Push-16.pngbin312 -> 0 bytes
-rw-r--r--application/palemoon/themes/osx/Push-64.pngbin8490 -> 0 bytes
-rw-r--r--application/palemoon/themes/osx/browser.css4
25 files changed, 308 insertions, 256 deletions
diff --git a/application/palemoon/app/Makefile.in b/application/palemoon/app/Makefile.in
index 6f9bbfaf0..c0f01212c 100644
--- a/application/palemoon/app/Makefile.in
+++ b/application/palemoon/app/Makefile.in
@@ -76,7 +76,7 @@ AB := $(firstword $(subst -, ,$(AB_CD)))
clean clobber repackage::
$(RM) -r $(dist_dest)
-MAC_BUNDLE_VERSION = $(shell $(PYTHON) $(srcdir)/macversion.py --version=$(MOZ_APP_VERSION) --buildid=$(DEPTH)/config/buildid)
+MAC_BUNDLE_VERSION = $(shell $(PYTHON) $(srcdir)/macversion.py --version=$(MOZ_APP_VERSION) --buildid=$(DEPTH)/buildid.h)
.PHONY: repackage
tools repackage:: $(PROGRAM)
diff --git a/application/palemoon/app/macversion.py b/application/palemoon/app/macversion.py
index 8c360368e..839aac1ff 100644
--- a/application/palemoon/app/macversion.py
+++ b/application/palemoon/app/macversion.py
@@ -28,7 +28,7 @@ if not options.version:
# builds), but also so that newly-built older versions (e.g. beta build) aren't
# considered "newer" than previously-built newer versions (e.g. a trunk nightly)
-buildid = open(options.buildid, 'r').read()
+define, MOZ_BUILDID, buildid = open(options.buildid, 'r').read().split()
# extract only the major version (i.e. "14" from "14.0b1")
majorVersion = re.match(r'^(\d+)[^\d].*', options.version).group(1)
diff --git a/application/palemoon/app/profile/palemoon.js b/application/palemoon/app/profile/palemoon.js
index 20919eca4..f0e860749 100644
--- a/application/palemoon/app/profile/palemoon.js
+++ b/application/palemoon/app/profile/palemoon.js
@@ -236,6 +236,15 @@ pref("general.useragent.complexOverride.moodle", false); // bug 797703
// At startup, check if we're the default browser and prompt user if not.
pref("browser.shell.checkDefaultBrowser", true);
pref("browser.shell.shortcutFavicons",true);
+pref("browser.shell.mostRecentDateSetAsDefault", "");
+#ifdef RELEASE_OR_BETA
+pref("browser.shell.skipDefaultBrowserCheckOnFirstRun", false);
+#else
+pref("browser.shell.skipDefaultBrowserCheckOnFirstRun", true);
+#endif
+pref("browser.shell.skipDefaultBrowserCheck", true);
+pref("browser.shell.defaultBrowserCheckCount", 0);
+pref("browser.defaultbrowser.notificationbar", false);
// 0 = blank, 1 = home (browser.startup.homepage), 2 = last visited page, 3 = resume previous browser session
// The behavior of option 3 is detailed at: http://wiki.mozilla.org/Session_Restore
diff --git a/application/palemoon/base/content/browser-fullScreen.js b/application/palemoon/base/content/browser-fullScreen.js
index 73b10ae85..ffe1da450 100644
--- a/application/palemoon/base/content/browser-fullScreen.js
+++ b/application/palemoon/base/content/browser-fullScreen.js
@@ -5,16 +5,9 @@
var FullScreen = {
_XULNS: "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
- get _fullScrToggler() {
- delete this._fullScrToggler;
- return this._fullScrToggler = document.getElementById("fullscr-toggler");
- },
- toggle: function (event) {
- var enterFS = window.fullScreen;
- // We get the fullscreen event _before_ the window transitions into or out of FS mode.
- if (event && event.type == "fullscreen")
- enterFS = !enterFS;
+ toggle: function () {
+ var enterFS = window.fullScreen;
// Toggle the View:FullScreen command, which controls elements like the
// fullscreen menuitem, menubars, and the appmenu.
@@ -31,6 +24,12 @@ var FullScreen = {
document.getElementById("exitFullScreenItem").hidden = !enterFS;
#endif
+ if (!this._fullScrToggler) {
+ this._fullScrToggler = document.getElementById("fullscr-toggler");
+ this._fullScrToggler.addEventListener("mouseover", this._expandCallback, false);
+ this._fullScrToggler.addEventListener("dragenter", this._expandCallback, false);
+ }
+
// On OS X Lion we don't want to hide toolbars when entering fullscreen, unless
// we're entering DOM fullscreen, in which case we should hide the toolbars.
// If we're leaving fullscreen, then we'll go through the exit code below to
@@ -50,36 +49,17 @@ var FullScreen = {
this.showXULChrome("toolbar", !enterFS);
if (enterFS) {
- // Add a tiny toolbar to receive mouseover and dragenter events, and provide affordance.
- // This will help simulate the "collapse" metaphor while also requiring less code and
- // events than raw listening of mouse coords. We don't add the toolbar in DOM full-screen
- // mode, only browser full-screen mode.
- if (!document.mozFullScreen) {
- this._fullScrToggler.addEventListener("mouseover", this._expandCallback, false);
- this._fullScrToggler.addEventListener("dragenter", this._expandCallback, false);
- }
- if (gPrefService.getBoolPref("browser.fullscreen.autohide"))
- gBrowser.mPanelContainer.addEventListener("mousemove",
- this._collapseCallback, false);
-
document.addEventListener("keypress", this._keyToggleCallback, false);
document.addEventListener("popupshown", this._setPopupOpen, false);
document.addEventListener("popuphidden", this._setPopupOpen, false);
+ this._shouldAnimate = true;
// 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
// mozfullscreenchange event fired, which could confuse content script.
- this._shouldAnimate = !document.mozFullScreen;
- this.mouseoverToggle(false);
-
- // Autohide prefs
- gPrefService.addObserver("browser.fullscreen", this, false);
+ this.hideNavToolbox(document.mozFullScreen);
}
else {
- // The user may quit fullscreen during an animation
- this._cancelAnimation();
- gNavToolbox.style.marginTop = "";
- if (this._isChromeCollapsed)
- this.mouseoverToggle(true);
+ this.showNavToolbox(false);
// This is needed if they use the context menu to quit fullscreen
this._isPopupOpen = false;
@@ -152,26 +132,16 @@ var FullScreen = {
// Cancel any "hide the toolbar" animation which is in progress, and make
// the toolbar hide immediately.
- this._cancelAnimation();
- this.mouseoverToggle(false);
-
- // Remove listeners on the full-screen toggler, so that mouseover
- // the top of the screen will not cause the toolbar to re-appear.
- this._fullScrToggler.removeEventListener("mouseover", this._expandCallback, false);
- this._fullScrToggler.removeEventListener("dragenter", this._expandCallback, false);
+ this.hideNavToolbox(true);
},
cleanup: function () {
- if (window.fullScreen) {
- gBrowser.mPanelContainer.removeEventListener("mousemove",
- this._collapseCallback, false);
+ if (!window.fullScreen) {
+ MousePosTracker.removeListener(this);
document.removeEventListener("keypress", this._keyToggleCallback, false);
document.removeEventListener("popupshown", this._setPopupOpen, false);
document.removeEventListener("popuphidden", this._setPopupOpen, false);
- gPrefService.removeObserver("browser.fullscreen", this);
- this._fullScrToggler.removeEventListener("mouseover", this._expandCallback, false);
- this._fullScrToggler.removeEventListener("dragenter", this._expandCallback, false);
this.cancelWarning();
gBrowser.tabContainer.removeEventListener("TabOpen", this.exitDomFullScreen);
gBrowser.tabContainer.removeEventListener("TabClose", this.exitDomFullScreen);
@@ -182,40 +152,30 @@ var FullScreen = {
}
},
- observe: function(aSubject, aTopic, aData)
+ getMouseTargetRect: function()
{
- if (aData == "browser.fullscreen.autohide") {
- if (gPrefService.getBoolPref("browser.fullscreen.autohide")) {
- gBrowser.mPanelContainer.addEventListener("mousemove",
- this._collapseCallback, false);
- }
- else {
- gBrowser.mPanelContainer.removeEventListener("mousemove",
- this._collapseCallback, false);
- }
- }
+ return this._mouseTargetRect;
},
// Event callbacks
_expandCallback: function()
{
- FullScreen.mouseoverToggle(true);
+ FullScreen.showNavToolbox();
},
- _collapseCallback: function()
+ onMouseEnter: function()
{
- FullScreen.mouseoverToggle(false);
+ FullScreen.hideNavToolbox();
},
_keyToggleCallback: function(aEvent)
{
// if we can use the keyboard (eg Ctrl+L or Ctrl+E) to open the toolbars, we
// should provide a way to collapse them too.
if (aEvent.keyCode == aEvent.DOM_VK_ESCAPE) {
- FullScreen._shouldAnimate = false;
- FullScreen.mouseoverToggle(false, true);
+ FullScreen.hideNavToolbox(true);
}
// F6 is another shortcut to the address bar, but its not covered in OpenLocation()
else if (aEvent.keyCode == aEvent.DOM_VK_F6)
- FullScreen.mouseoverToggle(true);
+ FullScreen.showNavToolbox();
},
// Checks whether we are allowed to collapse the chrome
@@ -269,47 +229,6 @@ var FullScreen = {
// Animate the toolbars disappearing
_shouldAnimate: true,
- _isAnimating: false,
- _animationTimeout: 0,
- _animationHandle: 0,
- _animateUp: function() {
- // check again, the user may have done something before the animation was due to start
- if (!window.fullScreen || !this._safeToCollapse(false)) {
- this._isAnimating = false;
- this._shouldAnimate = true;
- return;
- }
-
- this._animateStartTime = window.mozAnimationStartTime;
- if (!this._animationHandle)
- this._animationHandle = window.mozRequestAnimationFrame(this);
- },
-
- sample: function (timeStamp) {
- const duration = 1500;
- const timePassed = timeStamp - this._animateStartTime;
- const pos = timePassed >= duration ? 1 :
- 1 - Math.pow(1 - timePassed / duration, 4);
-
- if (pos >= 1) {
- // We've animated enough
- this._cancelAnimation();
- gNavToolbox.style.marginTop = "";
- this.mouseoverToggle(false);
- return;
- }
-
- gNavToolbox.style.marginTop = (gNavToolbox.boxObject.height * pos * -1) + "px";
- this._animationHandle = window.mozRequestAnimationFrame(this);
- },
-
- _cancelAnimation: function() {
- window.cancelAnimationFrame(this._animationHandle);
- this._animationHandle = 0;
- clearTimeout(this._animationTimeout);
- this._isAnimating = false;
- this._shouldAnimate = false;
- },
cancelWarning: function(event) {
if (!this.warningBox)
@@ -463,49 +382,69 @@ var FullScreen = {
3000);
},
- mouseoverToggle: function(aShow, forceHide)
- {
- // Don't do anything if:
- // a) we're already in the state we want,
- // b) we're animating and will become collapsed soon, or
- // c) we can't collapse because it would be undesirable right now
- if (aShow != this._isChromeCollapsed || (!aShow && this._isAnimating) ||
- (!aShow && !this._safeToCollapse(forceHide)))
+ showNavToolbox: function(trackMouse = true) {
+ this._fullScrToggler.hidden = true;
+ gNavToolbox.removeAttribute("fullscreenShouldAnimate");
+ gNavToolbox.style.marginTop = "";
+
+ if (!this._isChromeCollapsed) {
+ return;
+ }
+
+ // 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);
+ }
+ },
+
+ hideNavToolbox: function(forceHide = false) {
+ this._fullScrToggler.hidden = document.mozFullScreen;
+ if (this._isChromeCollapsed) {
+ if (forceHide) {
+ gNavToolbox.removeAttribute("fullscreenShouldAnimate");
+ }
+ return;
+ }
+ if (!this._safeToCollapse(forceHide)) {
+ this._fullScrToggler.hidden = true;
return;
+ }
// browser.fullscreen.animateUp
// 0 - never animate up
// 1 - animate only for first collapse after entering fullscreen (default for perf's sake)
// 2 - animate every time it collapses
- if (gPrefService.getIntPref("browser.fullscreen.animateUp") == 0)
- this._shouldAnimate = false;
-
- if (!aShow && this._shouldAnimate) {
- this._isAnimating = true;
+ let animateUp = gPrefService.getIntPref("browser.fullscreen.animateUp");
+ if (animateUp == 0) {
this._shouldAnimate = false;
- this._animationTimeout = setTimeout(this._animateUp.bind(this), 800);
- return;
- }
-
- // The chrome is collapsed so don't spam needless mousemove events
- if (aShow) {
- gBrowser.mPanelContainer.addEventListener("mousemove",
- this._collapseCallback, false);
+ } else if (animateUp == 2) {
+ this._shouldAnimate = true;
}
- else {
- gBrowser.mPanelContainer.removeEventListener("mousemove",
- this._collapseCallback, false);
+ if (this._shouldAnimate && !forceHide) {
+ gNavToolbox.setAttribute("fullscreenShouldAnimate", true);
+ this._shouldAnimate = false;
+ // Hide the fullscreen toggler until the transition ends.
+ let listener = () => {
+ gNavToolbox.removeEventListener("transitionend", listener, true);
+ if (this._isChromeCollapsed)
+ this._fullScrToggler.hidden = false;
+ };
+ gNavToolbox.addEventListener("transitionend", listener, true);
+ this._fullScrToggler.hidden = true;
}
- // Hiding/collapsing the toolbox interferes with the tab bar's scrollbox,
- // so we just move it off-screen instead. See bug 430687.
gNavToolbox.style.marginTop =
- aShow ? "" : -gNavToolbox.getBoundingClientRect().height + "px";
-
- this._fullScrToggler.collapsed = aShow;
- this._isChromeCollapsed = !aShow;
- if (gPrefService.getIntPref("browser.fullscreen.animateUp") == 2)
- this._shouldAnimate = true;
+ -gNavToolbox.getBoundingClientRect().height + "px";
+ this._isChromeCollapsed = true;
+ MousePosTracker.removeListener(this);
},
showXULChrome: function(aTag, aShow)
diff --git a/application/palemoon/base/content/browser.css b/application/palemoon/base/content/browser.css
index 658655970..05dd00997 100644
--- a/application/palemoon/base/content/browser.css
+++ b/application/palemoon/base/content/browser.css
@@ -760,3 +760,7 @@ toolbarbutton[pmkit-button="true"] > .toolbarbutton-badge-stack > .toolbarbutton
#main-window[inFullscreen] #high-priority-global-notificationbox {
visibility: collapse;
}
+
+#navigator-toolbox[fullscreenShouldAnimate] {
+ transition: 1.5s margin-top ease-out;
+}
diff --git a/application/palemoon/base/content/browser.js b/application/palemoon/base/content/browser.js
index 6dbd9677e..72d51ce4a 100644
--- a/application/palemoon/base/content/browser.js
+++ b/application/palemoon/base/content/browser.js
@@ -122,7 +122,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils",
XPCOMUtils.defineLazyModuleGetter(this, "FormValidationHandler",
"resource:///modules/FormValidationHandler.jsm");
-let gInitialPages = [
+var gInitialPages = [
"about:blank",
"about:newtab",
"about:home",
@@ -990,12 +990,23 @@ var gBrowserInit = {
gBrowser.swapBrowsersAndCloseOther(gBrowser.selectedTab, uriToLoad);
}
- // window.arguments[2]: referrer (nsIURI)
+ // window.arguments[2]: referrer (nsIURI | string)
// [3]: postData (nsIInputStream)
// [4]: allowThirdPartyFixup (bool)
+ // [5]: referrerPolicy (int)
else if (window.arguments.length >= 3) {
- loadURI(uriToLoad, window.arguments[2], window.arguments[3] || null,
- window.arguments[4] || false);
+ let referrerURI = window.arguments[2];
+ if (typeof(referrerURI) == "string") {
+ try {
+ referrerURI = makeURI(referrerURI);
+ } catch (e) {
+ referrerURI = null;
+ }
+ }
+ let referrerPolicy = (window.arguments[5] != undefined ?
+ window.arguments[5] : Ci.nsIHttpChannel.REFERRER_POLICY_DEFAULT);
+ loadURI(uriToLoad, referrerURI, window.arguments[3] || null,
+ window.arguments[4] || false, referrerPolicy);
window.focus();
}
// Note: loadOneOrMoreURIs *must not* be called if window.arguments.length >= 3.
@@ -1730,7 +1741,7 @@ function loadOneOrMoreURIs(aURIString)
function focusAndSelectUrlBar() {
if (gURLBar) {
if (window.fullScreen)
- FullScreen.mouseoverToggle(true);
+ FullScreen.showNavToolbox();
gURLBar.select();
if (document.activeElement == gURLBar.inputField)
@@ -1883,7 +1894,7 @@ function BrowserTryToCloseWindow()
window.close(); // WindowIsClosing does all the necessary checks
}
-function loadURI(uri, referrer, postData, allowThirdPartyFixup) {
+function loadURI(uri, referrer, postData, allowThirdPartyFixup, referrerPolicy) {
if (postData === undefined)
postData = null;
@@ -1894,7 +1905,12 @@ function loadURI(uri, referrer, postData, allowThirdPartyFixup) {
}
try {
- gBrowser.loadURIWithFlags(uri, flags, referrer, null, postData);
+ gBrowser.loadURIWithFlags(uri, {
+ flags: flags,
+ referrerURI: referrer,
+ referrerPolicy: referrerPolicy,
+ postData: postData,
+ });
} catch (e) {}
}
@@ -2517,8 +2533,8 @@ function BrowserFullScreen()
window.fullScreen = !window.fullScreen;
}
-function onFullScreen(event) {
- FullScreen.toggle(event);
+function onFullScreen() {
+ FullScreen.toggle();
}
function onMozEnteredDomFullscreen(event) {
@@ -2999,7 +3015,7 @@ const BrowserSearch = {
#endif
var searchBar = this.searchBar;
if (searchBar && window.fullScreen)
- FullScreen.mouseoverToggle(true);
+ FullScreen.showNavToolbox();
if (searchBar)
searchBar.select();
if (!searchBar || document.activeElement != searchBar.textbox.inputField)
@@ -4288,6 +4304,13 @@ nsBrowserAccess.prototype = {
else
aWhere = gPrefService.getIntPref("browser.link.open_newwindow");
}
+
+ let referrer = aOpener ? makeURI(aOpener.location.href) : null;
+ let referrerPolicy = Ci.nsIHttpChannel.REFERRER_POLICY_DEFAULT;
+ if (aOpener && aOpener.document) {
+ referrerPolicy = aOpener.document.referrerPolicy;
+ }
+
switch (aWhere) {
case Ci.nsIBrowserDOMWindow.OPEN_NEWWINDOW :
// FIXME: Bug 408379. So how come this doesn't send the
@@ -4326,6 +4349,7 @@ nsBrowserAccess.prototype = {
let tab = win.gBrowser.loadOneTab(aURI ? aURI.spec : "about:blank", {
referrerURI: referrer,
+ referrerPolicy: referrerPolicy,
fromExternal: isExternal,
inBackground: loadInBackground});
let browser = win.gBrowser.getBrowserForTab(tab);
@@ -4341,11 +4365,14 @@ nsBrowserAccess.prototype = {
default : // OPEN_CURRENTWINDOW or an illegal value
newWindow = content;
if (aURI) {
- let referrer = aOpener ? makeURI(aOpener.location.href) : null;
let loadflags = isExternal ?
Ci.nsIWebNavigation.LOAD_FLAGS_FROM_EXTERNAL :
Ci.nsIWebNavigation.LOAD_FLAGS_NONE;
- gBrowser.loadURIWithFlags(aURI.spec, loadflags, referrer, null, null);
+ gBrowser.loadURIWithFlags(aURI.spec, {
+ flags: loadflags,
+ referrerURI: referrer,
+ referrerPolicy: referrerPolicy,
+ });
}
if (!gPrefService.getBoolPref("browser.tabs.loadDivertedInBackground"))
window.focus();
@@ -5075,7 +5102,8 @@ function handleLinkClick(event, href, linkNode) {
urlSecurityCheck(href, doc.nodePrincipal);
openLinkIn(href, where, { referrerURI: doc.documentURIObject,
- charset: doc.characterSet });
+ charset: doc.characterSet,
+ referrerPolicy: doc.referrerPolicy });
event.preventDefault();
return true;
}
diff --git a/application/palemoon/base/content/browser.xul b/application/palemoon/base/content/browser.xul
index c2553f295..9b37f7b6f 100644
--- a/application/palemoon/base/content/browser.xul
+++ b/application/palemoon/base/content/browser.xul
@@ -941,7 +941,7 @@
</toolbarpalette>
</toolbox>
- <hbox id="fullscr-toggler" collapsed="true"/>
+ <hbox id="fullscr-toggler" hidden="true"/>
<hbox flex="1" id="browser">
<vbox id="browser-border-start" hidden="true" layer="true"/>
diff --git a/application/palemoon/base/content/nsContextMenu.js b/application/palemoon/base/content/nsContextMenu.js
index 830c20998..f389491d3 100644
--- a/application/palemoon/base/content/nsContextMenu.js
+++ b/application/palemoon/base/content/nsContextMenu.js
@@ -753,7 +753,8 @@ nsContextMenu.prototype = {
urlSecurityCheck(this.linkURL, doc.nodePrincipal);
openLinkIn(this.linkURL, "window",
{ charset: doc.characterSet,
- referrerURI: doc.documentURIObject });
+ referrerURI: doc.documentURIObject,
+ referrerPolicy: doc.referrerPolicy });
},
// Open linked-to URL in a new private window.
@@ -763,6 +764,7 @@ nsContextMenu.prototype = {
openLinkIn(this.linkURL, "window",
{ charset: doc.characterSet,
referrerURI: doc.documentURIObject,
+ referrerPolicy: doc.referrerPolicy,
private: true });
},
@@ -772,7 +774,8 @@ nsContextMenu.prototype = {
urlSecurityCheck(this.linkURL, doc.nodePrincipal);
openLinkIn(this.linkURL, "tab",
{ charset: doc.characterSet,
- referrerURI: doc.documentURIObject });
+ referrerURI: doc.documentURIObject,
+ referrerPolicy: doc.referrerPolicy });
},
// open URL in current tab
diff --git a/application/palemoon/base/content/openLocation.js b/application/palemoon/base/content/openLocation.js
index 1a10334c7..f39e34666 100644
--- a/application/palemoon/base/content/openLocation.js
+++ b/application/palemoon/base/content/openLocation.js
@@ -83,7 +83,7 @@ function open()
var flags = webNav.LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP |
webNav.LOAD_FLAGS_FIXUP_SCHEME_TYPOS;
if (!mayInheritPrincipal)
- flags |= webNav.LOAD_FLAGS_DISALLOW_INHERIT_OWNER;
+ flags |= webNav.LOAD_FLAGS_DISALLOW_INHERIT_PRINCIPAL;
browser.gBrowser.loadURIWithFlags(url, flags, null, null, postData);
break;
case "1":
diff --git a/application/palemoon/base/content/tabbrowser.xml b/application/palemoon/base/content/tabbrowser.xml
index c06b49af0..1b8099785 100644
--- a/application/palemoon/base/content/tabbrowser.xml
+++ b/application/palemoon/base/content/tabbrowser.xml
@@ -1264,6 +1264,7 @@
<parameter name="aAllowThirdPartyFixup"/>
<body>
<![CDATA[
+ var aReferrerPolicy;
var aFromExternal;
var aRelatedToCurrent;
if (arguments.length == 2 &&
@@ -1271,6 +1272,7 @@
!(arguments[1] instanceof Ci.nsIURI)) {
let params = arguments[1];
aReferrerURI = params.referrerURI;
+ aReferrerPolicy = params.referrerPolicy;
aCharset = params.charset;
aPostData = params.postData;
aLoadInBackground = params.inBackground;
@@ -1284,6 +1286,7 @@
var owner = bgLoad ? null : this.selectedTab;
var tab = this.addTab(aURI, {
referrerURI: aReferrerURI,
+ referrerPolicy: aReferrerPolicy,
charset: aCharset,
postData: aPostData,
ownerTab: owner,
@@ -1409,6 +1412,7 @@
<body>
<![CDATA[
const NS_XUL = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
+ var aReferrerPolicy;
var aFromExternal;
var aRelatedToCurrent;
var aSkipAnimation;
@@ -1417,6 +1421,7 @@
!(arguments[1] instanceof Ci.nsIURI)) {
let params = arguments[1];
aReferrerURI = params.referrerURI;
+ aReferrerPolicy = params.referrerPolicy;
aCharset = params.charset;
aPostData = params.postData;
aOwner = params.ownerTab;
@@ -1588,7 +1593,13 @@
if (aFromExternal)
flags |= Ci.nsIWebNavigation.LOAD_FLAGS_FROM_EXTERNAL;
try {
- b.loadURIWithFlags(aURI, flags, aReferrerURI, aCharset, aPostData);
+ b.loadURIWithFlags(aURI, {
+ flags: flags,
+ referrerURI: aReferrerURI,
+ referrerPolicy: aReferrerPolicy,
+ charset: aCharset,
+ postData: aPostData,
+ });
} catch (ex) {
Cu.reportError(ex);
}
@@ -2700,6 +2711,11 @@
<parameter name="aPostData"/>
<body>
<![CDATA[
+ // Note - the callee understands both:
+ // (a) loadURIWithFlags(aURI, aFlags, ...)
+ // (b) loadURIWithFlags(aURI, { flags: aFlags, ... })
+ // Forwarding it as (a) here actually supports both (a) and (b),
+ // so you can call us either way too.
return this.mCurrentBrowser.loadURIWithFlags(aURI, aFlags, aReferrerURI, aCharset, aPostData);
]]>
</body>
diff --git a/application/palemoon/base/content/urlbarBindings.xml b/application/palemoon/base/content/urlbarBindings.xml
index 985769ec2..d188e6658 100644
--- a/application/palemoon/base/content/urlbarBindings.xml
+++ b/application/palemoon/base/content/urlbarBindings.xml
@@ -305,12 +305,12 @@
function loadCurrent() {
let flags = Ci.nsIWebNavigation.LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP;
- // Pass LOAD_FLAGS_DISALLOW_INHERIT_OWNER to prevent any loads from
+ // Pass LOAD_FLAGS_DISALLOW_INHERIT_PRINCIPAL to prevent any loads from
// inheriting the currently loaded document's principal, unless this
// URL is marked as safe to inherit (e.g. came from a bookmark
// keyword).
if (!mayInheritPrincipal)
- flags |= Ci.nsIWebNavigation.LOAD_FLAGS_DISALLOW_INHERIT_OWNER;
+ flags |= Ci.nsIWebNavigation.LOAD_FLAGS_DISALLOW_INHERIT_PRINCIPAL;
// If the value wasn't typed, we know that we decoded the value as
// UTF-8 (see losslessDecodeURI)
if (!this.valueIsTyped)
diff --git a/application/palemoon/base/content/utilityOverlay.js b/application/palemoon/base/content/utilityOverlay.js
index 86cc5cea5..633cb8853 100644
--- a/application/palemoon/base/content/utilityOverlay.js
+++ b/application/palemoon/base/content/utilityOverlay.js
@@ -104,7 +104,8 @@ function openUILink(url, event, aIgnoreButton, aIgnoreAlt, aAllowThirdPartyFixup
allowThirdPartyFixup: aAllowThirdPartyFixup,
postData: aPostData,
referrerURI: aReferrerURI,
- initiatingDoc: event ? event.target.ownerDocument : null
+ referrerPolicy: Components.interfaces.nsIHttpChannel.REFERRER_POLICY_DEFAULT,
+ initiatingDoc: event ? event.target.ownerDocument : null,
};
}
@@ -196,7 +197,8 @@ function openUILinkIn(url, where, aAllowThirdPartyFixup, aPostData, aReferrerURI
params = {
allowThirdPartyFixup: aAllowThirdPartyFixup,
postData: aPostData,
- referrerURI: aReferrerURI
+ referrerURI: aReferrerURI,
+ referrerPolicy: Components.interfaces.nsIHttpChannel.REFERRER_POLICY_DEFAULT,
};
}
@@ -209,12 +211,16 @@ function openUILinkIn(url, where, aAllowThirdPartyFixup, aPostData, aReferrerURI
function openLinkIn(url, where, params) {
if (!where || !url)
return;
+ const Cc = Components.classes;
+ const Ci = Components.interfaces;
var aFromChrome = params.fromChrome;
var aAllowThirdPartyFixup = params.allowThirdPartyFixup;
var aPostData = params.postData;
var aCharset = params.charset;
var aReferrerURI = params.referrerURI;
+ var aReferrerPolicy = ('referrerPolicy' in params ?
+ params.referrerPolicy : Ci.nsIHttpChannel.REFERRER_POLICY_DEFAULT);
var aRelatedToCurrent = params.relatedToCurrent;
var aForceAllowDataURI = params.forceAllowDataURI;
var aInBackground = params.inBackground;
@@ -229,11 +235,10 @@ function openLinkIn(url, where, params) {
"where == 'save' but without initiatingDoc. See bug 814264.");
return;
}
+ // TODO(1073187): propagate referrerPolicy.
saveURL(url, null, null, true, null, aReferrerURI, aInitiatingDoc);
return;
}
- const Cc = Components.classes;
- const Ci = Components.interfaces;
var w = getTopWin();
if ((where == "tab" || where == "tabshifted") &&
@@ -243,6 +248,7 @@ function openLinkIn(url, where, params) {
}
if (!w || where == "window") {
+ // This propagates to window.arguments.
// Strip referrer data when opening a new private window, to prevent
// regular browsing data from leaking into it.
if (aIsPrivate) {
@@ -267,12 +273,23 @@ function openLinkIn(url, where, params) {
createInstance(Ci.nsISupportsPRBool);
allowThirdPartyFixupSupports.data = aAllowThirdPartyFixup;
+ var referrerURISupports = null;
+ if (aReferrerURI && sendReferrerURI) {
+ referrerURISupports = Cc["@mozilla.org/supports-string;1"].
+ createInstance(Ci.nsISupportsString);
+ referrerURISupports.data = aReferrerURI.spec;
+ }
+
+ var referrerPolicySupports = Cc["@mozilla.org/supports-PRUint32;1"].
+ createInstance(Ci.nsISupportsPRUint32);
+ referrerPolicySupports.data = aReferrerPolicy;
+
sa.AppendElement(wuri);
sa.AppendElement(charset);
- if (sendReferrerURI)
- sa.AppendElement(aReferrerURI);
+ sa.AppendElement(referrerURISupports);
sa.AppendElement(aPostData);
sa.AppendElement(allowThirdPartyFixupSupports);
+ sa.AppendElement(referrerPolicySupports);
let features = "chrome,dialog=no,all";
if (aIsPrivate) {
@@ -316,11 +333,16 @@ function openLinkIn(url, where, params) {
flags |= Ci.nsIWebNavigation.LOAD_FLAGS_FIXUP_SCHEME_TYPOS;
}
if (aDisallowInheritPrincipal)
- flags |= Ci.nsIWebNavigation.LOAD_FLAGS_DISALLOW_INHERIT_OWNER;
+ flags |= Ci.nsIWebNavigation.LOAD_FLAGS_DISALLOW_INHERIT_PRINCIPAL;
if (aForceAllowDataURI) {
flags |= Ci.nsIWebNavigation.LOAD_FLAGS_FORCE_ALLOW_DATA_URI;
}
- w.gBrowser.loadURIWithFlags(url, flags, aReferrerURI, null, aPostData);
+ w.gBrowser.loadURIWithFlags(url, {
+ flags: flags,
+ referrerURI: aReferrerURI,
+ referrerPolicy: aReferrerPolicy,
+ postData: aPostData,
+ });
break;
case "tabshifted":
loadInBackground = !loadInBackground;
@@ -329,6 +351,7 @@ function openLinkIn(url, where, params) {
let browser = w.gBrowser;
browser.loadOneTab(url, {
referrerURI: aReferrerURI,
+ referrerPolicy: aReferrerPolicy,
charset: aCharset,
postData: aPostData,
inBackground: loadInBackground,
@@ -577,9 +600,11 @@ function makeURLAbsolute(aBase, aUrl)
* @param [optional] aReferrer
* If aDocument is null, then this will be used as the referrer.
* There will be no security check.
+ * @param [optional] aReferrerPolicy
+ * Referrer policy - Ci.nsIHttpChannel.REFERRER_POLICY_*.
*/
function openNewTabWith(aURL, aDocument, aPostData, aEvent,
- aAllowThirdPartyFixup, aReferrer) {
+ aAllowThirdPartyFixup, aReferrer, aReferrerPolicy) {
if (aDocument)
urlSecurityCheck(aURL, aDocument.nodePrincipal);
@@ -594,10 +619,13 @@ function openNewTabWith(aURL, aDocument, aPostData, aEvent,
{ charset: originCharset,
postData: aPostData,
allowThirdPartyFixup: aAllowThirdPartyFixup,
- referrerURI: aDocument ? aDocument.documentURIObject : aReferrer });
+ referrerURI: aDocument ? aDocument.documentURIObject : aReferrer,
+ referrerPolicy: aReferrerPolicy,
+ });
}
-function openNewWindowWith(aURL, aDocument, aPostData, aAllowThirdPartyFixup, aReferrer) {
+function openNewWindowWith(aURL, aDocument, aPostData, aAllowThirdPartyFixup,
+ aReferrer, aReferrerPolicy) {
if (aDocument)
urlSecurityCheck(aURL, aDocument.nodePrincipal);
@@ -614,7 +642,9 @@ function openNewWindowWith(aURL, aDocument, aPostData, aAllowThirdPartyFixup, aR
{ charset: originCharset,
postData: aPostData,
allowThirdPartyFixup: aAllowThirdPartyFixup,
- referrerURI: aDocument ? aDocument.documentURIObject : aReferrer });
+ referrerURI: aDocument ? aDocument.documentURIObject : aReferrer,
+ referrerPolicy: aReferrerPolicy,
+ });
}
/**
diff --git a/application/palemoon/base/jar.mn b/application/palemoon/base/jar.mn
index fd2df79e1..622d8e0da 100644
--- a/application/palemoon/base/jar.mn
+++ b/application/palemoon/base/jar.mn
@@ -108,7 +108,7 @@ browser.jar:
* content/browser/sanitize.xul (content/sanitize.xul)
* content/browser/sanitizeDialog.js (content/sanitizeDialog.js)
content/browser/sanitizeDialog.css (content/sanitizeDialog.css)
-* content/browser/autocomplete.css (content/autocomplete.css)
+ content/browser/autocomplete.css (content/autocomplete.css)
* content/browser/autocomplete.xml (content/autocomplete.xml)
content/browser/tabbrowser.css (content/tabbrowser.css)
* content/browser/tabbrowser.xml (content/tabbrowser.xml)
diff --git a/application/palemoon/components/feeds/FeedWriter.js b/application/palemoon/components/feeds/FeedWriter.js
index cbb146564..2ae31dffa 100644
--- a/application/palemoon/components/feeds/FeedWriter.js
+++ b/application/palemoon/components/feeds/FeedWriter.js
@@ -1173,7 +1173,7 @@ FeedWriter.prototype = {
var secman = Cc["@mozilla.org/scriptsecuritymanager;1"].
getService(Ci.nsIScriptSecurityManager);
- this._feedPrincipal = secman.getSimpleCodebasePrincipal(this._feedURI);
+ this._feedPrincipal = secman.createCodebasePrincipal(this._feedURI, {});
LOG("Subscribe Preview: feed uri = " + this._window.location.href);
diff --git a/application/palemoon/components/nsBrowserGlue.js b/application/palemoon/components/nsBrowserGlue.js
index 6563df4e6..aa24d88ef 100644
--- a/application/palemoon/components/nsBrowserGlue.js
+++ b/application/palemoon/components/nsBrowserGlue.js
@@ -13,7 +13,11 @@ const XULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
-// Define Lazy Module Gitters
+// Define Lazy Service Getters
+XPCOMUtils.defineLazyServiceGetter(this, "AlertsService",
+ "@mozilla.org/alerts-service;1", "nsIAlertsService");
+
+// Define Lazy Module Getters
[
["AddonManager", "resource://gre/modules/AddonManager.jsm"],
["NetUtil", "resource://gre/modules/NetUtil.jsm"],
@@ -37,10 +41,18 @@ Cu.import("resource://gre/modules/Services.jsm");
["FormValidationHandler", "resource:///modules/FormValidationHandler.jsm"],
["AutoCompletePopup", "resource:///modules/AutoCompletePopup.jsm"],
["DateTimePickerHelper", "resource://gre/modules/DateTimePickerHelper.jsm"],
+ ["ShellService", "resource:///modules/ShellService.jsm"],
].forEach(([name, resource]) => XPCOMUtils.defineLazyModuleGetter(this, name, resource));
-XPCOMUtils.defineLazyServiceGetter(this, "AlertsService",
- "@mozilla.org/alerts-service;1", "nsIAlertsService");
+// Define Lazy Getters
+
+XPCOMUtils.defineLazyGetter(this, "gBrandBundle", function() {
+ return Services.strings.createBundle('chrome://branding/locale/brand.properties');
+});
+
+XPCOMUtils.defineLazyGetter(this, "gBrowserBundle", function() {
+ return Services.strings.createBundle('chrome://browser/locale/browser.properties');
+});
const PREF_PLUGINS_NOTIFYUSER = "plugins.update.notifyUser";
const PREF_PLUGINS_UPDATEURL = "plugins.update.url";
@@ -463,9 +475,7 @@ BrowserGlue.prototype = {
if (!win)
return;
- let productName = Services.strings
- .createBundle("chrome://branding/locale/brand.properties")
- .GetStringFromName("brandFullName");
+ let productName = gBrandBundle.GetStringFromName("brandFullName");
let message = win.gNavigatorBundle.getFormattedString("slowStartup.message", [productName]);
let buttons = [
@@ -562,17 +572,17 @@ BrowserGlue.prototype = {
}
// Perform default browser checking.
- var shell;
- try {
- shell = Components.classes["@mozilla.org/browser/shell-service;1"]
- .getService(Components.interfaces.nsIShellService);
- } catch (e) { }
- if (shell) {
-#ifdef DEBUG
- let shouldCheck = false;
-#else
- let shouldCheck = shell.shouldCheckDefaultBrowser;
-#endif
+ if (ShellService) {
+ let shouldCheck = ShellService.shouldCheckDefaultBrowser;
+
+ const skipDefaultBrowserCheck =
+ Services.prefs.getBoolPref("browser.shell.skipDefaultBrowserCheckOnFirstRun") &&
+ Services.prefs.getBoolPref("browser.shell.skipDefaultBrowserCheck");
+
+ const usePromptLimit = false;
+ let promptCount =
+ usePromptLimit ? Services.prefs.getIntPref("browser.shell.defaultBrowserCheckCount") : 0;
+
let willRecoverSession = false;
try {
let ss = Cc["@mozilla.org/browser/sessionstartup;1"].
@@ -582,9 +592,25 @@ BrowserGlue.prototype = {
}
catch (ex) { /* never mind; suppose SessionStore is broken */ }
- let isDefault = shell.isDefaultBrowser(true, false); // startup check, check all assoc
+ // startup check, check all assoc
+ let isDefault = false;
+ let isDefaultError = false;
+ try {
+ isDefault = ShellService.isDefaultBrowser(true, false);
+ } catch (ex) {
+ isDefaultError = true;
+ }
+
+ if (isDefault) {
+ let now = (Math.floor(Date.now() / 1000)).toString();
+ Services.prefs.setCharPref("browser.shell.mostRecentDateSetAsDefault", now);
+ }
+
+ let willPrompt = shouldCheck && !isDefault && !willRecoverSession;
- if (shouldCheck && !isDefault && !willRecoverSession) {
+ // Skip the "Set Default Browser" check during first-run or after the
+ // browser has been run a few times.
+ if (willPrompt) {
Services.tm.mainThread.dispatch(function() {
var win = this.getMostRecentBrowserWindow();
var brandBundle = win.document.getElementById("bundle_brand");
@@ -613,9 +639,9 @@ BrowserGlue.prototype = {
claimAllTypes = (parseFloat(version) < 6.2);
} catch (ex) { }
#endif
- shell.setDefaultBrowser(claimAllTypes, false);
+ ShellService.setDefaultBrowser(claimAllTypes, false);
}
- shell.shouldCheckDefaultBrowser = checkEveryTime.value;
+ ShellService.shouldCheckDefaultBrowser = checkEveryTime.value;
}.bind(this), Ci.nsIThread.DISPATCH_NORMAL);
}
}
@@ -696,9 +722,8 @@ BrowserGlue.prototype = {
let prompt = Services.prompt;
let quitBundle = Services.strings.createBundle("chrome://browser/locale/quitDialog.properties");
- let brandBundle = Services.strings.createBundle("chrome://branding/locale/brand.properties");
- let appName = brandBundle.GetStringFromName("brandShortName");
+ let appName = gBrandBundle.GetStringFromName("brandShortName");
let quitDialogTitle = quitBundle.formatStringFromName("quitDialogTitle",
[appName], 1);
let neverAskText = quitBundle.GetStringFromName("neverAsk2");
@@ -775,9 +800,7 @@ BrowserGlue.prototype = {
var formatter = Cc["@mozilla.org/toolkit/URLFormatterService;1"].
getService(Ci.nsIURLFormatter);
- var browserBundle = Services.strings.createBundle("chrome://browser/locale/browser.properties");
- var brandBundle = Services.strings.createBundle("chrome://branding/locale/brand.properties");
- var appName = brandBundle.GetStringFromName("brandShortName");
+ var appName = gBrandBundle.GetStringFromName("brandShortName");
function getNotifyString(aPropData) {
var propValue = update.getProperty(aPropData.propName);
@@ -785,11 +808,11 @@ BrowserGlue.prototype = {
if (aPropData.prefName)
propValue = formatter.formatURLPref(aPropData.prefName);
else if (aPropData.stringParams)
- propValue = browserBundle.formatStringFromName(aPropData.stringName,
- aPropData.stringParams,
- aPropData.stringParams.length);
+ propValue = gBrowserBundle.formatStringFromName(aPropData.stringName,
+ aPropData.stringParams,
+ aPropData.stringParams.length);
else
- propValue = browserBundle.GetStringFromName(aPropData.stringName);
+ propValue = gBrowserBundle.GetStringFromName(aPropData.stringName);
}
return propValue;
}
@@ -1150,8 +1173,7 @@ BrowserGlue.prototype = {
* Show the notificationBox for a locked places database.
*/
_showPlacesLockedNotificationBox: function BG__showPlacesLockedNotificationBox() {
- var brandBundle = Services.strings.createBundle("chrome://branding/locale/brand.properties");
- var applicationName = brandBundle.GetStringFromName("brandShortName");
+ var applicationName = gBrandBundle.GetStringFromName("brandShortName");
var placesBundle = Services.strings.createBundle("chrome://browser/locale/places/places.properties");
var title = placesBundle.GetStringFromName("lockPrompt.title");
var text = placesBundle.formatStringFromName("lockPrompt.text", [applicationName], 1);
@@ -1719,8 +1741,6 @@ ContentPermissionPrompt.prototype = {
popup.remove();
}
- var browserBundle = Services.strings.createBundle("chrome://browser/locale/browser.properties");
-
var requestingWindow = aRequest.window.top;
var chromeWin = this._getChromeWindow(requestingWindow).wrappedJSObject;
var browser = chromeWin.gBrowser.getBrowserForDocument(requestingWindow.document);
@@ -1746,8 +1766,8 @@ ContentPermissionPrompt.prototype = {
}
var action = {
- label: browserBundle.GetStringFromName(promptAction.stringId),
- accessKey: browserBundle.GetStringFromName(promptAction.stringId + ".accesskey"),
+ label: gBrowserBundle.GetStringFromName(promptAction.stringId),
+ accessKey: gBrowserBundle.GetStringFromName(promptAction.stringId + ".accesskey"),
callback: function() {
if (promptAction.callback) {
promptAction.callback();
@@ -1806,7 +1826,6 @@ ContentPermissionPrompt.prototype = {
},
_promptGeo : function(aRequest) {
- var browserBundle = Services.strings.createBundle("chrome://browser/locale/browser.properties");
var requestingURI = aRequest.principal.URI;
var message;
@@ -1822,11 +1841,11 @@ ContentPermissionPrompt.prototype = {
}];
if (requestingURI.schemeIs("file")) {
- message = browserBundle.formatStringFromName("geolocation.shareWithFile",
- [requestingURI.path], 1);
+ message = gBrowserBundle.formatStringFromName("geolocation.shareWithFile",
+ [requestingURI.path], 1);
} else {
- message = browserBundle.formatStringFromName("geolocation.shareWithSite",
- [requestingURI.host], 1);
+ message = gBrowserBundle.formatStringFromName("geolocation.shareWithSite",
+ [requestingURI.host], 1);
// Always share location action.
actions.push({
stringId: "geolocation.alwaysShareLocation",
@@ -1857,11 +1876,10 @@ ContentPermissionPrompt.prototype = {
},
_promptWebNotifications : function(aRequest) {
- var browserBundle = Services.strings.createBundle("chrome://browser/locale/browser.properties");
var requestingURI = aRequest.principal.URI;
- var message = browserBundle.formatStringFromName("webNotifications.showFromSite",
- [requestingURI.host], 1);
+ var message = gBrowserBundle.formatStringFromName("webNotifications.showFromSite",
+ [requestingURI.host], 1);
var actions;
@@ -1909,14 +1927,12 @@ ContentPermissionPrompt.prototype = {
},
_promptPointerLock: function CPP_promtPointerLock(aRequest, autoAllow) {
-
- let browserBundle = Services.strings.createBundle("chrome://browser/locale/browser.properties");
let requestingURI = aRequest.principal.URI;
let originString = requestingURI.schemeIs("file") ? requestingURI.path : requestingURI.host;
- let message = browserBundle.formatStringFromName(autoAllow ?
- "pointerLock.autoLock.title2" : "pointerLock.title2",
- [originString], 1);
+ let message = gBrowserBundle.formatStringFromName(autoAllow ?
+ "pointerLock.autoLock.title2" : "pointerLock.title2",
+ [originString], 1);
// If this is an autoAllow info prompt, offer no actions.
// _showPrompt() will allow the request when it's dismissed.
let actions = [];
diff --git a/application/palemoon/components/places/content/editBookmarkOverlay.js b/application/palemoon/components/places/content/editBookmarkOverlay.js
index 43645cc73..69d7d32eb 100644
--- a/application/palemoon/components/places/content/editBookmarkOverlay.js
+++ b/application/palemoon/components/places/content/editBookmarkOverlay.js
@@ -12,6 +12,7 @@ var gEditItemOverlay = {
_uris: [],
_tags: [],
_allTags: [],
+ _keyword: null,
_multiEdit: false,
_itemType: -1,
_readOnly: false,
@@ -139,9 +140,8 @@ var gEditItemOverlay = {
this._itemType = PlacesUtils.bookmarks.getItemType(this._itemId);
if (this._itemType == Ci.nsINavBookmarksService.TYPE_BOOKMARK) {
this._uri = PlacesUtils.bookmarks.getBookmarkURI(this._itemId);
- this._initTextField("keywordField",
- PlacesUtils.bookmarks
- .getKeywordForBookmark(this._itemId));
+ this._keyword = PlacesUtils.bookmarks.getKeywordForBookmark(this._itemId);
+ this._initTextField("keywordField", this._keyword);
this._element("loadInSidebarCheckbox").checked =
PlacesUtils.annotations.itemHasAnnotation(this._itemId,
PlacesUIUtils.LOAD_IN_SIDEBAR_ANNO);
@@ -610,9 +610,13 @@ var gEditItemOverlay = {
},
onKeywordFieldBlur: function EIO_onKeywordFieldBlur() {
- var keyword = this._element("keywordField").value;
- if (keyword != PlacesUtils.bookmarks.getKeywordForBookmark(this._itemId)) {
- var txn = new PlacesEditBookmarkKeywordTransaction(this._itemId, keyword);
+ let oldKeyword = this._keyword;
+ let keyword = this._keyword = this._element("keywordField").value;
+ if (keyword != oldKeyword) {
+ let txn = new PlacesEditBookmarkKeywordTransaction(this._itemId,
+ keyword,
+ null,
+ oldKeyword);
PlacesUtils.transactionManager.doTransaction(txn);
}
},
@@ -1004,9 +1008,8 @@ var gEditItemOverlay = {
}
break;
case "keyword":
- this._initTextField("keywordField",
- PlacesUtils.bookmarks
- .getKeywordForBookmark(this._itemId));
+ this._keyword = PlacesUtils.bookmarks.getKeywordForBookmark(this._itemId);
+ this._initTextField("keywordField", this._keyword);
break;
case PlacesUIUtils.DESCRIPTION_ANNO:
this._initTextField("descriptionField",
diff --git a/application/palemoon/components/sessionstore/SessionStore.jsm b/application/palemoon/components/sessionstore/SessionStore.jsm
index b8d126e21..4f95f10a7 100644
--- a/application/palemoon/components/sessionstore/SessionStore.jsm
+++ b/application/palemoon/components/sessionstore/SessionStore.jsm
@@ -2085,7 +2085,7 @@ var SessionStoreInternal = {
}
catch (ex) { debug(ex); } // POSTDATA is tricky - especially since some extensions don't get it right
- if (aEntry.owner) {
+ if (aEntry.triggeringPrincipal) {
// Not catching anything specific here, just possible errors
// from writeCompoundObject and the like.
try {
@@ -2094,19 +2094,19 @@ var SessionStoreInternal = {
var pipe = Cc["@mozilla.org/pipe;1"].createInstance(Ci.nsIPipe);
pipe.init(false, false, 0, 0xffffffff, null);
binaryStream.setOutputStream(pipe.outputStream);
- binaryStream.writeCompoundObject(aEntry.owner, Ci.nsISupports, true);
+ binaryStream.writeCompoundObject(aEntry.triggeringPrincipal, Ci.nsIPrincipal, true);
binaryStream.close();
// Now we want to read the data from the pipe's input end and encode it.
var scriptableStream = Cc["@mozilla.org/binaryinputstream;1"].
createInstance(Ci.nsIBinaryInputStream);
scriptableStream.setInputStream(pipe.inputStream);
- var ownerBytes =
+ var triggeringPrincipalBytes =
scriptableStream.readByteArray(scriptableStream.available());
// We can stop doing base64 encoding once our serialization into JSON
// is guaranteed to handle all chars in strings, including embedded
// nulls.
- entry.owner_b64 = btoa(String.fromCharCode.apply(null, ownerBytes));
+ entry.triggeringPrincipal_b64 = btoa(String.fromCharCode.apply(null, triggeringPrincipalBytes));
}
catch (ex) { debug(ex); }
}
@@ -3400,16 +3400,24 @@ var SessionStoreInternal = {
}
}
- if (aEntry.owner_b64) {
- var ownerInput = Cc["@mozilla.org/io/string-input-stream;1"].
- createInstance(Ci.nsIStringInputStream);
- var binaryData = atob(aEntry.owner_b64);
- ownerInput.setData(binaryData, binaryData.length);
+ // The field aEntry.owner_b64 got renamed to aEntry.triggeringPricipal_b64 in
+ // Bug 1286472. To remain backward compatible we still have to support that
+ // field for a few cycles before we can remove it within Bug 1289785.
+ if (aEntry.owner_b64) {
+ aEntry.triggeringPrincipal_b64 = aEntry.owner_b64;
+ delete aEntry.owner_b64;
+ }
+
+ if (aEntry.triggeringPrincipal_b64) {
+ var triggeringPrincipalInput = Cc["@mozilla.org/io/string-input-stream;1"].
+ createInstance(Ci.nsIStringInputStream);
+ var binaryData = atob(aEntry.triggeringPrincipal_b64);
+ triggeringPrincipalInput.setData(binaryData, binaryData.length);
var binaryStream = Cc["@mozilla.org/binaryinputstream;1"].
createInstance(Ci.nsIObjectInputStream);
- binaryStream.setInputStream(ownerInput);
+ binaryStream.setInputStream(triggeringPrincipalInput);
try { // Catch possible deserialization exceptions
- shEntry.owner = binaryStream.readObject(true);
+ shEntry.triggeringPrincipal = binaryStream.readObject(true);
} catch (ex) { debug(ex); }
}
diff --git a/application/palemoon/confvars.sh b/application/palemoon/confvars.sh
index 8a1d00c68..5109c0829 100644
--- a/application/palemoon/confvars.sh
+++ b/application/palemoon/confvars.sh
@@ -79,12 +79,6 @@ MOZ_JSDOWNLOADS=1
# conformant implementations.
MOZ_WEBGL_CONFORMANT=1
-# Platform Feature: Windows Maintaince Service
-# XXX: This is never used
-if test "$OS_ARCH" = "WINNT"; then
- MOZ_MAINTENANCE_SERVICE=
-fi
-
# Set the chrome packing format
# Possible values are omni, jar, and flat
# Currently, only omni and flat are supported
@@ -103,3 +97,11 @@ if test "$OS_ARCH" = "WINNT" -o \
"$OS_ARCH" = "Linux"; then
MOZ_BUNDLED_FONTS=1
fi
+
+# Short-circuit a few services to be removed
+MOZ_MAINTENANCE_SERVICE=
+MOZ_SERVICES_HEALTHREPORT=
+MOZ_ADDON_SIGNING=0
+MOZ_REQUIRE_SIGNING=0
+MOZ_PROFILE_MIGRATOR=
+
diff --git a/application/palemoon/locales/en-US/chrome/browser/browser.properties b/application/palemoon/locales/en-US/chrome/browser/browser.properties
index 7f1c88a88..481a061d9 100644
--- a/application/palemoon/locales/en-US/chrome/browser/browser.properties
+++ b/application/palemoon/locales/en-US/chrome/browser/browser.properties
@@ -59,7 +59,8 @@ addonError-1=The add-on could not be downloaded because of a connection failure
addonError-2=The add-on from #2 could not be installed because it does not match the add-on #3 expected.
addonError-3=The add-on downloaded from #2 could not be installed because it appears to be corrupt.
addonError-4=#1 could not be installed because #3 cannot modify the needed file.
-addonError-5=The add-on downloaded from #2 could not be installed because #3 does not support WebExtensions.
+addonError-8=The add-on downloaded from #2 could not be installed because #3 does not support Jetpack (SDK) extensions.
+addonError-9=The add-on downloaded from #2 could not be installed because #3 does not support WebExtensions.
# LOCALIZATION NOTE (addonLocalError-1, addonLocalError-2, addonLocalError-3, addonLocalError-4, addonErrorIncompatible, addonErrorBlocklisted):
# #1 is the add-on name, #3 is the application name, #4 is the application version
@@ -67,10 +68,11 @@ addonLocalError-1=This add-on could not be installed because of a filesystem err
addonLocalError-2=This add-on could not be installed because it does not match the add-on #3 expected.
addonLocalError-3=This add-on could not be installed because it appears to be corrupt.
addonLocalError-4=#1 could not be installed because #3 cannot modify the needed file.
-addonLocalError-5=This add-on could not be installed because #3 does not support WebExtensions.
+addonLocalError-8=This add-on could not be installed because #3 does not support Jetpack (SDK) extensions.
+addonLocalError-9=This add-on could not be installed because #3 does not support WebExtensions.
addonErrorIncompatible=#1 could not be installed because it is not compatible with #3 #4.
addonErrorBlocklisted=#1 could not be installed because it has a high risk of causing stability or security problems.
-addonErrorJetSDK=#1 could not be installed because it is a Jetpack/SDK extension which are not supported in #3 #4.
+
# LOCALIZATION NOTE (lwthemeInstallRequest.message): %S will be replaced with
# the host name of the site.
diff --git a/application/palemoon/themes/linux/Push-16.png b/application/palemoon/themes/linux/Push-16.png
deleted file mode 100644
index 082b17781..000000000
--- a/application/palemoon/themes/linux/Push-16.png
+++ /dev/null
Binary files differ
diff --git a/application/palemoon/themes/linux/Push-64.png b/application/palemoon/themes/linux/Push-64.png
deleted file mode 100644
index 6e09ab9c3..000000000
--- a/application/palemoon/themes/linux/Push-64.png
+++ /dev/null
Binary files differ
diff --git a/application/palemoon/themes/linux/browser.css b/application/palemoon/themes/linux/browser.css
index 131a63a90..43fd637fb 100644
--- a/application/palemoon/themes/linux/browser.css
+++ b/application/palemoon/themes/linux/browser.css
@@ -1292,10 +1292,6 @@ toolbar[iconsize="small"] #webrtc-status-button {
list-style-image: url(chrome://browser/skin/Geolocation-16.png);
}
-#push-notification-icon {
- list-style-image: url(chrome://browser/skin/Push-16.png);
-}
-
#addons-notification-icon {
list-style-image: url(chrome://mozapps/skin/extensions/extensionGeneric-16.png);
}
diff --git a/application/palemoon/themes/osx/Push-16.png b/application/palemoon/themes/osx/Push-16.png
deleted file mode 100644
index 54ef8f8ea..000000000
--- a/application/palemoon/themes/osx/Push-16.png
+++ /dev/null
Binary files differ
diff --git a/application/palemoon/themes/osx/Push-64.png b/application/palemoon/themes/osx/Push-64.png
deleted file mode 100644
index 099b9c76f..000000000
--- a/application/palemoon/themes/osx/Push-64.png
+++ /dev/null
Binary files differ
diff --git a/application/palemoon/themes/osx/browser.css b/application/palemoon/themes/osx/browser.css
index 58443fa76..d5feadf29 100644
--- a/application/palemoon/themes/osx/browser.css
+++ b/application/palemoon/themes/osx/browser.css
@@ -1975,10 +1975,6 @@ toolbarbutton.bookmark-item[dragover="true"][open="true"] {
list-style-image: url(chrome://browser/skin/Geolocation-16.png);
}
-#push-notification-icon {
- list-style-image: url(chrome://browser/skin/Push-16.png);
-}
-
#addons-notification-icon {
list-style-image: url(chrome://mozapps/skin/extensions/extensionGeneric-16.png);
}