Bug 1578067 - Part 4: Update openLinkIn() and use more - switch loadURI. r=frg
This commit is contained in:
Родитель
8b46c7ca3a
Коммит
cf21490544
|
@ -2093,22 +2093,13 @@ function BrowserCloseWindow()
|
||||||
// function loadURI(uri, referrer, postData, allowThirdPartyFixup, referrerPolicy,
|
// function loadURI(uri, referrer, postData, allowThirdPartyFixup, referrerPolicy,
|
||||||
// userContextId, originPrincipal, forceAboutBlankViewerInCurrent,
|
// userContextId, originPrincipal, forceAboutBlankViewerInCurrent,
|
||||||
// triggeringPrincipal)
|
// triggeringPrincipal)
|
||||||
function loadURI(uri, referrer, postData, allowThirdPartyFixup)
|
function loadURI(uri, referrer, postData, allowThirdPartyFixup) {
|
||||||
{
|
|
||||||
try {
|
try {
|
||||||
var flags = nsIWebNavigation.LOAD_FLAGS_NONE;
|
openLinkIn(uri, "current",
|
||||||
if (allowThirdPartyFixup) {
|
{ referrerURI: referrer,
|
||||||
flags = nsIWebNavigation.LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP |
|
postData: postData,
|
||||||
nsIWebNavigation.LOAD_FLAGS_FIXUP_SCHEME_TYPOS;
|
allowThirdPartyFixup: allowThirdPartyFixup });
|
||||||
}
|
} catch (e) {}
|
||||||
if (!flags && typeof postData == "number") {
|
|
||||||
// Deal with legacy code that passes load flags in the third argument.
|
|
||||||
flags = postData;
|
|
||||||
postData = null;
|
|
||||||
}
|
|
||||||
gBrowser.loadURIWithFlags(uri, flags, referrer, null, postData);
|
|
||||||
} catch (e) {
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadOneOrMoreURIs(aURIString, aTriggeringPrincipal) {
|
function loadOneOrMoreURIs(aURIString, aTriggeringPrincipal) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче