mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-01 04:47:31 +09:00
[PALEMOON] [frontend and backend] Added support for "referrerPolicy"
Issue #121 https://bugzilla.mozilla.org/show_bug.cgi?id=1113431
This commit is contained in:
parent
cc9da6628f
commit
3991e27340
4 changed files with 99 additions and 22 deletions
|
|
@ -990,12 +990,23 @@ var gBrowserInit = {
|
||||||
|
|
||||||
gBrowser.swapBrowsersAndCloseOther(gBrowser.selectedTab, uriToLoad);
|
gBrowser.swapBrowsersAndCloseOther(gBrowser.selectedTab, uriToLoad);
|
||||||
}
|
}
|
||||||
// window.arguments[2]: referrer (nsIURI)
|
// window.arguments[2]: referrer (nsIURI | string)
|
||||||
// [3]: postData (nsIInputStream)
|
// [3]: postData (nsIInputStream)
|
||||||
// [4]: allowThirdPartyFixup (bool)
|
// [4]: allowThirdPartyFixup (bool)
|
||||||
|
// [5]: referrerPolicy (int)
|
||||||
else if (window.arguments.length >= 3) {
|
else if (window.arguments.length >= 3) {
|
||||||
loadURI(uriToLoad, window.arguments[2], window.arguments[3] || null,
|
let referrerURI = window.arguments[2];
|
||||||
window.arguments[4] || false);
|
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();
|
window.focus();
|
||||||
}
|
}
|
||||||
// Note: loadOneOrMoreURIs *must not* be called if window.arguments.length >= 3.
|
// Note: loadOneOrMoreURIs *must not* be called if window.arguments.length >= 3.
|
||||||
|
|
@ -1883,7 +1894,7 @@ function BrowserTryToCloseWindow()
|
||||||
window.close(); // WindowIsClosing does all the necessary checks
|
window.close(); // WindowIsClosing does all the necessary checks
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadURI(uri, referrer, postData, allowThirdPartyFixup) {
|
function loadURI(uri, referrer, postData, allowThirdPartyFixup, referrerPolicy) {
|
||||||
if (postData === undefined)
|
if (postData === undefined)
|
||||||
postData = null;
|
postData = null;
|
||||||
|
|
||||||
|
|
@ -1894,7 +1905,12 @@ function loadURI(uri, referrer, postData, allowThirdPartyFixup) {
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
gBrowser.loadURIWithFlags(uri, flags, referrer, null, postData);
|
gBrowser.loadURIWithFlags(uri, {
|
||||||
|
flags: flags,
|
||||||
|
referrerURI: referrer,
|
||||||
|
referrerPolicy: referrerPolicy,
|
||||||
|
postData: postData,
|
||||||
|
});
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -4288,6 +4304,13 @@ nsBrowserAccess.prototype = {
|
||||||
else
|
else
|
||||||
aWhere = gPrefService.getIntPref("browser.link.open_newwindow");
|
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) {
|
switch (aWhere) {
|
||||||
case Ci.nsIBrowserDOMWindow.OPEN_NEWWINDOW :
|
case Ci.nsIBrowserDOMWindow.OPEN_NEWWINDOW :
|
||||||
// FIXME: Bug 408379. So how come this doesn't send the
|
// 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", {
|
let tab = win.gBrowser.loadOneTab(aURI ? aURI.spec : "about:blank", {
|
||||||
referrerURI: referrer,
|
referrerURI: referrer,
|
||||||
|
referrerPolicy: referrerPolicy,
|
||||||
fromExternal: isExternal,
|
fromExternal: isExternal,
|
||||||
inBackground: loadInBackground});
|
inBackground: loadInBackground});
|
||||||
let browser = win.gBrowser.getBrowserForTab(tab);
|
let browser = win.gBrowser.getBrowserForTab(tab);
|
||||||
|
|
@ -4341,11 +4365,14 @@ nsBrowserAccess.prototype = {
|
||||||
default : // OPEN_CURRENTWINDOW or an illegal value
|
default : // OPEN_CURRENTWINDOW or an illegal value
|
||||||
newWindow = content;
|
newWindow = content;
|
||||||
if (aURI) {
|
if (aURI) {
|
||||||
let referrer = aOpener ? makeURI(aOpener.location.href) : null;
|
|
||||||
let loadflags = isExternal ?
|
let loadflags = isExternal ?
|
||||||
Ci.nsIWebNavigation.LOAD_FLAGS_FROM_EXTERNAL :
|
Ci.nsIWebNavigation.LOAD_FLAGS_FROM_EXTERNAL :
|
||||||
Ci.nsIWebNavigation.LOAD_FLAGS_NONE;
|
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"))
|
if (!gPrefService.getBoolPref("browser.tabs.loadDivertedInBackground"))
|
||||||
window.focus();
|
window.focus();
|
||||||
|
|
@ -5075,7 +5102,8 @@ function handleLinkClick(event, href, linkNode) {
|
||||||
|
|
||||||
urlSecurityCheck(href, doc.nodePrincipal);
|
urlSecurityCheck(href, doc.nodePrincipal);
|
||||||
openLinkIn(href, where, { referrerURI: doc.documentURIObject,
|
openLinkIn(href, where, { referrerURI: doc.documentURIObject,
|
||||||
charset: doc.characterSet });
|
charset: doc.characterSet,
|
||||||
|
referrerPolicy: doc.referrerPolicy });
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -753,7 +753,8 @@ nsContextMenu.prototype = {
|
||||||
urlSecurityCheck(this.linkURL, doc.nodePrincipal);
|
urlSecurityCheck(this.linkURL, doc.nodePrincipal);
|
||||||
openLinkIn(this.linkURL, "window",
|
openLinkIn(this.linkURL, "window",
|
||||||
{ charset: doc.characterSet,
|
{ charset: doc.characterSet,
|
||||||
referrerURI: doc.documentURIObject });
|
referrerURI: doc.documentURIObject,
|
||||||
|
referrerPolicy: doc.referrerPolicy });
|
||||||
},
|
},
|
||||||
|
|
||||||
// Open linked-to URL in a new private window.
|
// Open linked-to URL in a new private window.
|
||||||
|
|
@ -763,6 +764,7 @@ nsContextMenu.prototype = {
|
||||||
openLinkIn(this.linkURL, "window",
|
openLinkIn(this.linkURL, "window",
|
||||||
{ charset: doc.characterSet,
|
{ charset: doc.characterSet,
|
||||||
referrerURI: doc.documentURIObject,
|
referrerURI: doc.documentURIObject,
|
||||||
|
referrerPolicy: doc.referrerPolicy,
|
||||||
private: true });
|
private: true });
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -772,7 +774,8 @@ nsContextMenu.prototype = {
|
||||||
urlSecurityCheck(this.linkURL, doc.nodePrincipal);
|
urlSecurityCheck(this.linkURL, doc.nodePrincipal);
|
||||||
openLinkIn(this.linkURL, "tab",
|
openLinkIn(this.linkURL, "tab",
|
||||||
{ charset: doc.characterSet,
|
{ charset: doc.characterSet,
|
||||||
referrerURI: doc.documentURIObject });
|
referrerURI: doc.documentURIObject,
|
||||||
|
referrerPolicy: doc.referrerPolicy });
|
||||||
},
|
},
|
||||||
|
|
||||||
// open URL in current tab
|
// open URL in current tab
|
||||||
|
|
|
||||||
|
|
@ -1264,6 +1264,7 @@
|
||||||
<parameter name="aAllowThirdPartyFixup"/>
|
<parameter name="aAllowThirdPartyFixup"/>
|
||||||
<body>
|
<body>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
|
var aReferrerPolicy;
|
||||||
var aFromExternal;
|
var aFromExternal;
|
||||||
var aRelatedToCurrent;
|
var aRelatedToCurrent;
|
||||||
if (arguments.length == 2 &&
|
if (arguments.length == 2 &&
|
||||||
|
|
@ -1271,6 +1272,7 @@
|
||||||
!(arguments[1] instanceof Ci.nsIURI)) {
|
!(arguments[1] instanceof Ci.nsIURI)) {
|
||||||
let params = arguments[1];
|
let params = arguments[1];
|
||||||
aReferrerURI = params.referrerURI;
|
aReferrerURI = params.referrerURI;
|
||||||
|
aReferrerPolicy = params.referrerPolicy;
|
||||||
aCharset = params.charset;
|
aCharset = params.charset;
|
||||||
aPostData = params.postData;
|
aPostData = params.postData;
|
||||||
aLoadInBackground = params.inBackground;
|
aLoadInBackground = params.inBackground;
|
||||||
|
|
@ -1284,6 +1286,7 @@
|
||||||
var owner = bgLoad ? null : this.selectedTab;
|
var owner = bgLoad ? null : this.selectedTab;
|
||||||
var tab = this.addTab(aURI, {
|
var tab = this.addTab(aURI, {
|
||||||
referrerURI: aReferrerURI,
|
referrerURI: aReferrerURI,
|
||||||
|
referrerPolicy: aReferrerPolicy,
|
||||||
charset: aCharset,
|
charset: aCharset,
|
||||||
postData: aPostData,
|
postData: aPostData,
|
||||||
ownerTab: owner,
|
ownerTab: owner,
|
||||||
|
|
@ -1409,6 +1412,7 @@
|
||||||
<body>
|
<body>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
const NS_XUL = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
|
const NS_XUL = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
|
||||||
|
var aReferrerPolicy;
|
||||||
var aFromExternal;
|
var aFromExternal;
|
||||||
var aRelatedToCurrent;
|
var aRelatedToCurrent;
|
||||||
var aSkipAnimation;
|
var aSkipAnimation;
|
||||||
|
|
@ -1417,6 +1421,7 @@
|
||||||
!(arguments[1] instanceof Ci.nsIURI)) {
|
!(arguments[1] instanceof Ci.nsIURI)) {
|
||||||
let params = arguments[1];
|
let params = arguments[1];
|
||||||
aReferrerURI = params.referrerURI;
|
aReferrerURI = params.referrerURI;
|
||||||
|
aReferrerPolicy = params.referrerPolicy;
|
||||||
aCharset = params.charset;
|
aCharset = params.charset;
|
||||||
aPostData = params.postData;
|
aPostData = params.postData;
|
||||||
aOwner = params.ownerTab;
|
aOwner = params.ownerTab;
|
||||||
|
|
@ -1588,7 +1593,13 @@
|
||||||
if (aFromExternal)
|
if (aFromExternal)
|
||||||
flags |= Ci.nsIWebNavigation.LOAD_FLAGS_FROM_EXTERNAL;
|
flags |= Ci.nsIWebNavigation.LOAD_FLAGS_FROM_EXTERNAL;
|
||||||
try {
|
try {
|
||||||
b.loadURIWithFlags(aURI, flags, aReferrerURI, aCharset, aPostData);
|
b.loadURIWithFlags(aURI, {
|
||||||
|
flags: flags,
|
||||||
|
referrerURI: aReferrerURI,
|
||||||
|
referrerPolicy: aReferrerPolicy,
|
||||||
|
charset: aCharset,
|
||||||
|
postData: aPostData,
|
||||||
|
});
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
Cu.reportError(ex);
|
Cu.reportError(ex);
|
||||||
}
|
}
|
||||||
|
|
@ -2700,6 +2711,11 @@
|
||||||
<parameter name="aPostData"/>
|
<parameter name="aPostData"/>
|
||||||
<body>
|
<body>
|
||||||
<![CDATA[
|
<![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);
|
return this.mCurrentBrowser.loadURIWithFlags(aURI, aFlags, aReferrerURI, aCharset, aPostData);
|
||||||
]]>
|
]]>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,8 @@ function openUILink(url, event, aIgnoreButton, aIgnoreAlt, aAllowThirdPartyFixup
|
||||||
allowThirdPartyFixup: aAllowThirdPartyFixup,
|
allowThirdPartyFixup: aAllowThirdPartyFixup,
|
||||||
postData: aPostData,
|
postData: aPostData,
|
||||||
referrerURI: aReferrerURI,
|
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 = {
|
params = {
|
||||||
allowThirdPartyFixup: aAllowThirdPartyFixup,
|
allowThirdPartyFixup: aAllowThirdPartyFixup,
|
||||||
postData: aPostData,
|
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) {
|
function openLinkIn(url, where, params) {
|
||||||
if (!where || !url)
|
if (!where || !url)
|
||||||
return;
|
return;
|
||||||
|
const Cc = Components.classes;
|
||||||
|
const Ci = Components.interfaces;
|
||||||
|
|
||||||
var aFromChrome = params.fromChrome;
|
var aFromChrome = params.fromChrome;
|
||||||
var aAllowThirdPartyFixup = params.allowThirdPartyFixup;
|
var aAllowThirdPartyFixup = params.allowThirdPartyFixup;
|
||||||
var aPostData = params.postData;
|
var aPostData = params.postData;
|
||||||
var aCharset = params.charset;
|
var aCharset = params.charset;
|
||||||
var aReferrerURI = params.referrerURI;
|
var aReferrerURI = params.referrerURI;
|
||||||
|
var aReferrerPolicy = ('referrerPolicy' in params ?
|
||||||
|
params.referrerPolicy : Ci.nsIHttpChannel.REFERRER_POLICY_DEFAULT);
|
||||||
var aRelatedToCurrent = params.relatedToCurrent;
|
var aRelatedToCurrent = params.relatedToCurrent;
|
||||||
var aForceAllowDataURI = params.forceAllowDataURI;
|
var aForceAllowDataURI = params.forceAllowDataURI;
|
||||||
var aInBackground = params.inBackground;
|
var aInBackground = params.inBackground;
|
||||||
|
|
@ -229,11 +235,10 @@ function openLinkIn(url, where, params) {
|
||||||
"where == 'save' but without initiatingDoc. See bug 814264.");
|
"where == 'save' but without initiatingDoc. See bug 814264.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// TODO(1073187): propagate referrerPolicy.
|
||||||
saveURL(url, null, null, true, null, aReferrerURI, aInitiatingDoc);
|
saveURL(url, null, null, true, null, aReferrerURI, aInitiatingDoc);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const Cc = Components.classes;
|
|
||||||
const Ci = Components.interfaces;
|
|
||||||
|
|
||||||
var w = getTopWin();
|
var w = getTopWin();
|
||||||
if ((where == "tab" || where == "tabshifted") &&
|
if ((where == "tab" || where == "tabshifted") &&
|
||||||
|
|
@ -243,6 +248,7 @@ function openLinkIn(url, where, params) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!w || where == "window") {
|
if (!w || where == "window") {
|
||||||
|
// This propagates to window.arguments.
|
||||||
// Strip referrer data when opening a new private window, to prevent
|
// Strip referrer data when opening a new private window, to prevent
|
||||||
// regular browsing data from leaking into it.
|
// regular browsing data from leaking into it.
|
||||||
if (aIsPrivate) {
|
if (aIsPrivate) {
|
||||||
|
|
@ -267,12 +273,23 @@ function openLinkIn(url, where, params) {
|
||||||
createInstance(Ci.nsISupportsPRBool);
|
createInstance(Ci.nsISupportsPRBool);
|
||||||
allowThirdPartyFixupSupports.data = aAllowThirdPartyFixup;
|
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(wuri);
|
||||||
sa.AppendElement(charset);
|
sa.AppendElement(charset);
|
||||||
if (sendReferrerURI)
|
sa.AppendElement(referrerURISupports);
|
||||||
sa.AppendElement(aReferrerURI);
|
|
||||||
sa.AppendElement(aPostData);
|
sa.AppendElement(aPostData);
|
||||||
sa.AppendElement(allowThirdPartyFixupSupports);
|
sa.AppendElement(allowThirdPartyFixupSupports);
|
||||||
|
sa.AppendElement(referrerPolicySupports);
|
||||||
|
|
||||||
let features = "chrome,dialog=no,all";
|
let features = "chrome,dialog=no,all";
|
||||||
if (aIsPrivate) {
|
if (aIsPrivate) {
|
||||||
|
|
@ -320,7 +337,12 @@ function openLinkIn(url, where, params) {
|
||||||
if (aForceAllowDataURI) {
|
if (aForceAllowDataURI) {
|
||||||
flags |= Ci.nsIWebNavigation.LOAD_FLAGS_FORCE_ALLOW_DATA_URI;
|
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;
|
break;
|
||||||
case "tabshifted":
|
case "tabshifted":
|
||||||
loadInBackground = !loadInBackground;
|
loadInBackground = !loadInBackground;
|
||||||
|
|
@ -329,6 +351,7 @@ function openLinkIn(url, where, params) {
|
||||||
let browser = w.gBrowser;
|
let browser = w.gBrowser;
|
||||||
browser.loadOneTab(url, {
|
browser.loadOneTab(url, {
|
||||||
referrerURI: aReferrerURI,
|
referrerURI: aReferrerURI,
|
||||||
|
referrerPolicy: aReferrerPolicy,
|
||||||
charset: aCharset,
|
charset: aCharset,
|
||||||
postData: aPostData,
|
postData: aPostData,
|
||||||
inBackground: loadInBackground,
|
inBackground: loadInBackground,
|
||||||
|
|
@ -577,9 +600,11 @@ function makeURLAbsolute(aBase, aUrl)
|
||||||
* @param [optional] aReferrer
|
* @param [optional] aReferrer
|
||||||
* If aDocument is null, then this will be used as the referrer.
|
* If aDocument is null, then this will be used as the referrer.
|
||||||
* There will be no security check.
|
* There will be no security check.
|
||||||
|
* @param [optional] aReferrerPolicy
|
||||||
|
* Referrer policy - Ci.nsIHttpChannel.REFERRER_POLICY_*.
|
||||||
*/
|
*/
|
||||||
function openNewTabWith(aURL, aDocument, aPostData, aEvent,
|
function openNewTabWith(aURL, aDocument, aPostData, aEvent,
|
||||||
aAllowThirdPartyFixup, aReferrer) {
|
aAllowThirdPartyFixup, aReferrer, aReferrerPolicy) {
|
||||||
if (aDocument)
|
if (aDocument)
|
||||||
urlSecurityCheck(aURL, aDocument.nodePrincipal);
|
urlSecurityCheck(aURL, aDocument.nodePrincipal);
|
||||||
|
|
||||||
|
|
@ -594,10 +619,13 @@ function openNewTabWith(aURL, aDocument, aPostData, aEvent,
|
||||||
{ charset: originCharset,
|
{ charset: originCharset,
|
||||||
postData: aPostData,
|
postData: aPostData,
|
||||||
allowThirdPartyFixup: aAllowThirdPartyFixup,
|
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)
|
if (aDocument)
|
||||||
urlSecurityCheck(aURL, aDocument.nodePrincipal);
|
urlSecurityCheck(aURL, aDocument.nodePrincipal);
|
||||||
|
|
||||||
|
|
@ -614,7 +642,9 @@ function openNewWindowWith(aURL, aDocument, aPostData, aAllowThirdPartyFixup, aR
|
||||||
{ charset: originCharset,
|
{ charset: originCharset,
|
||||||
postData: aPostData,
|
postData: aPostData,
|
||||||
allowThirdPartyFixup: aAllowThirdPartyFixup,
|
allowThirdPartyFixup: aAllowThirdPartyFixup,
|
||||||
referrerURI: aDocument ? aDocument.documentURIObject : aReferrer });
|
referrerURI: aDocument ? aDocument.documentURIObject : aReferrer,
|
||||||
|
referrerPolicy: aReferrerPolicy,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue