зеркало из https://github.com/mozilla/gecko-dev.git
Merge mozilla-central to inbound. a=merge CLOSED TREE
This commit is contained in:
Коммит
5e8042bb20
|
@ -1021,7 +1021,7 @@ function handleUriInChrome(aBrowser, aUri) {
|
|||
|
||||
// A shared function used by both remote and non-remote browser XBL bindings to
|
||||
// load a URI or redirect it to the correct process.
|
||||
function _loadURIWithFlags(browser, uri, params) {
|
||||
function _loadURI(browser, uri, params = {}) {
|
||||
let tab = gBrowser.getTabForBrowser(browser);
|
||||
// Preloaded browsers don't have tabs, so we ignore those.
|
||||
if (tab) {
|
||||
|
@ -1031,12 +1031,15 @@ function _loadURIWithFlags(browser, uri, params) {
|
|||
if (!uri) {
|
||||
uri = "about:blank";
|
||||
}
|
||||
let triggeringPrincipal = params.triggeringPrincipal || null;
|
||||
let flags = params.flags || 0;
|
||||
let referrer = params.referrerURI;
|
||||
let referrerPolicy = ("referrerPolicy" in params ? params.referrerPolicy :
|
||||
Ci.nsIHttpChannel.REFERRER_POLICY_UNSET);
|
||||
let postData = params.postData;
|
||||
|
||||
let {
|
||||
flags = Ci.nsIWebNavigation.LOAD_FLAGS_NONE,
|
||||
referrerURI,
|
||||
referrerPolicy = Ci.nsIHttpChannel.REFERRER_POLICY_UNSET,
|
||||
triggeringPrincipal,
|
||||
postData,
|
||||
userContextId,
|
||||
} = params || {};
|
||||
|
||||
let currentRemoteType = browser.remoteType;
|
||||
let requiredRemoteType;
|
||||
|
@ -1082,12 +1085,12 @@ function _loadURIWithFlags(browser, uri, params) {
|
|||
}
|
||||
try {
|
||||
if (!mustChangeProcess) {
|
||||
if (params.userContextId) {
|
||||
browser.webNavigation.setOriginAttributesBeforeLoading({ userContextId: params.userContextId });
|
||||
if (userContextId) {
|
||||
browser.webNavigation.setOriginAttributesBeforeLoading({ userContextId });
|
||||
}
|
||||
|
||||
browser.webNavigation.loadURIWithOptions(uri, flags,
|
||||
referrer, referrerPolicy,
|
||||
referrerURI, referrerPolicy,
|
||||
postData, null, null, triggeringPrincipal);
|
||||
} else {
|
||||
// Check if the current browser is allowed to unload.
|
||||
|
@ -1106,15 +1109,15 @@ function _loadURIWithFlags(browser, uri, params) {
|
|||
? gSerializationHelper.serializeToString(triggeringPrincipal)
|
||||
: null,
|
||||
flags,
|
||||
referrer: referrer ? referrer.spec : null,
|
||||
referrer: referrerURI ? referrerURI.spec : null,
|
||||
referrerPolicy,
|
||||
remoteType: requiredRemoteType,
|
||||
postData,
|
||||
newFrameloader,
|
||||
};
|
||||
|
||||
if (params.userContextId) {
|
||||
loadParams.userContextId = params.userContextId;
|
||||
if (userContextId) {
|
||||
loadParams.userContextId = userContextId;
|
||||
}
|
||||
|
||||
LoadInOtherProcess(browser, loadParams);
|
||||
|
@ -1129,11 +1132,11 @@ function _loadURIWithFlags(browser, uri, params) {
|
|||
Cu.reportError(e);
|
||||
gBrowser.updateBrowserRemotenessByURL(browser, uri);
|
||||
|
||||
if (params.userContextId) {
|
||||
browser.webNavigation.setOriginAttributesBeforeLoading({ userContextId: params.userContextId });
|
||||
if (userContextId) {
|
||||
browser.webNavigation.setOriginAttributesBeforeLoading({ userContextId });
|
||||
}
|
||||
|
||||
browser.webNavigation.loadURIWithOptions(uri, flags, referrer, referrerPolicy,
|
||||
browser.webNavigation.loadURIWithOptions(uri, flags, referrerURI, referrerPolicy,
|
||||
postData, null, null, triggeringPrincipal);
|
||||
} else {
|
||||
throw e;
|
||||
|
@ -3171,9 +3174,9 @@ var BrowserOnClick = {
|
|||
// Allow users to override and continue through to the site,
|
||||
// but add a notify bar as a reminder, so that they don't lose
|
||||
// track after, e.g., tab switching.
|
||||
gBrowser.loadURIWithFlags(gBrowser.currentURI.spec,
|
||||
Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_CLASSIFIER,
|
||||
null, null, null);
|
||||
gBrowser.loadURI(gBrowser.currentURI.spec, {
|
||||
flags: Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_CLASSIFIER,
|
||||
});
|
||||
|
||||
Services.perms.add(gBrowser.currentURI, "safe-browsing",
|
||||
Ci.nsIPermissionManager.ALLOW_ACTION,
|
||||
|
@ -3296,13 +3299,13 @@ function BrowserReloadWithFlags(reloadFlags) {
|
|||
// If the remoteness has changed, the new browser doesn't have any
|
||||
// information of what was loaded before, so we need to load the previous
|
||||
// URL again.
|
||||
gBrowser.loadURIWithFlags(url, reloadFlags);
|
||||
gBrowser.loadURI(url, { flags: reloadFlags });
|
||||
return;
|
||||
}
|
||||
|
||||
// Do this after the above case where we might flip remoteness.
|
||||
// Unfortunately, we'll count the remoteness flip case as a
|
||||
// "newURL" load, since we're using loadURIWithFlags, but hopefully
|
||||
// "newURL" load, since we're using loadURI, but hopefully
|
||||
// that's rare enough to not matter.
|
||||
maybeRecordAbandonmentTelemetry(gBrowser.selectedTab, "reload");
|
||||
|
||||
|
@ -5340,8 +5343,8 @@ nsBrowserAccess.prototype = {
|
|||
let loadflags = isExternal ?
|
||||
Ci.nsIWebNavigation.LOAD_FLAGS_FROM_EXTERNAL :
|
||||
Ci.nsIWebNavigation.LOAD_FLAGS_NONE;
|
||||
gBrowser.loadURIWithFlags(aURI.spec, {
|
||||
aTriggeringPrincipal,
|
||||
gBrowser.loadURI(aURI.spec, {
|
||||
triggeringPrincipal: aTriggeringPrincipal,
|
||||
flags: loadflags,
|
||||
referrerURI: referrer,
|
||||
referrerPolicy,
|
||||
|
|
|
@ -627,12 +627,18 @@ ContentSearchUIController.prototype = {
|
|||
return;
|
||||
}
|
||||
let searchWithHeader = document.getElementById("contentSearchSearchWithHeader");
|
||||
let labels = searchWithHeader.querySelectorAll("label");
|
||||
if (this.input.value) {
|
||||
// eslint-disable-next-line no-unsanitized/property
|
||||
searchWithHeader.innerHTML = this._strings.searchForSomethingWith;
|
||||
searchWithHeader.querySelector(".contentSearchSearchWithHeaderSearchText").textContent = this.input.value;
|
||||
let header = this._strings.searchForSomethingWith2;
|
||||
// Translators can use both %S and %1$S.
|
||||
header = header.replace("%1$S", "%S").split("%S");
|
||||
labels[0].textContent = header[0];
|
||||
labels[1].textContent = this.input.value;
|
||||
labels[2].textContent = header[1];
|
||||
} else {
|
||||
searchWithHeader.textContent = this._strings.searchWithHeader;
|
||||
labels[0].textContent = this._strings.searchWithHeader;
|
||||
labels[1].textContent = "";
|
||||
labels[2].textContent = "";
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -790,6 +796,13 @@ ContentSearchUIController.prototype = {
|
|||
header.setAttribute("class", "contentSearchHeader");
|
||||
headerRow.appendChild(header);
|
||||
header.id = "contentSearchSearchWithHeader";
|
||||
let start = document.createElement("label");
|
||||
let inputLabel = document.createElement("label");
|
||||
inputLabel.setAttribute("class", "contentSearchSearchWithHeaderSearchText");
|
||||
let end = document.createElement("label");
|
||||
header.appendChild(start);
|
||||
header.appendChild(inputLabel);
|
||||
header.appendChild(end);
|
||||
this._oneOffsTable.appendChild(headerRow);
|
||||
|
||||
let button = document.createElementNS(HTML_NS, "button");
|
||||
|
|
|
@ -120,7 +120,7 @@ window._gBrowser = {
|
|||
*/
|
||||
_browserBindingProperties: [
|
||||
"canGoBack", "canGoForward", "goBack", "goForward", "permitUnload",
|
||||
"reload", "reloadWithFlags", "stop", "loadURI", "loadURIWithFlags",
|
||||
"reload", "reloadWithFlags", "stop", "loadURI",
|
||||
"gotoIndex", "currentURI", "documentURI",
|
||||
"preferences", "imageDocument", "isRemoteBrowser", "messageManager",
|
||||
"getTabBrowser", "finder", "fastFind", "sessionHistory", "contentTitle",
|
||||
|
@ -346,20 +346,8 @@ window._gBrowser = {
|
|||
/**
|
||||
* throws exception for unknown schemes
|
||||
*/
|
||||
loadURI(aURI, aReferrerURI, aCharset) {
|
||||
return this.selectedBrowser.loadURI(aURI, aReferrerURI, aCharset);
|
||||
},
|
||||
|
||||
/**
|
||||
* throws exception for unknown schemes
|
||||
*/
|
||||
loadURIWithFlags(aURI, aFlags, aReferrerURI, aCharset, aPostData) {
|
||||
// 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.selectedBrowser.loadURIWithFlags(aURI, aFlags, aReferrerURI, aCharset, aPostData);
|
||||
loadURI(aURI, aParams) {
|
||||
return this.selectedBrowser.loadURI(aURI, aParams);
|
||||
},
|
||||
|
||||
gotoIndex(aIndex) {
|
||||
|
@ -1498,7 +1486,7 @@ window._gBrowser = {
|
|||
Ci.nsIWebNavigation.LOAD_FLAGS_FIXUP_SCHEME_TYPOS;
|
||||
}
|
||||
try {
|
||||
browser.loadURIWithFlags(aURIs[0], {
|
||||
browser.loadURI(aURIs[0], {
|
||||
flags,
|
||||
postData: aPostDatas[0],
|
||||
triggeringPrincipal: aTriggeringPrincipal,
|
||||
|
@ -2431,7 +2419,7 @@ window._gBrowser = {
|
|||
if (aDisallowInheritPrincipal)
|
||||
flags |= Ci.nsIWebNavigation.LOAD_FLAGS_DISALLOW_INHERIT_PRINCIPAL;
|
||||
try {
|
||||
b.loadURIWithFlags(aURI, {
|
||||
b.loadURI(aURI, {
|
||||
flags,
|
||||
triggeringPrincipal: aTriggeringPrincipal,
|
||||
referrerURI: aNoReferrer ? null : aReferrerURI,
|
||||
|
@ -4716,4 +4704,3 @@ var StatusPanel = {
|
|||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -2311,24 +2311,12 @@
|
|||
<field name="tabModalPromptBox">null</field>
|
||||
|
||||
<!-- throws exception for unknown schemes -->
|
||||
<method name="loadURIWithFlags">
|
||||
<method name="loadURI">
|
||||
<parameter name="aURI"/>
|
||||
<parameter name="aFlags"/>
|
||||
<parameter name="aReferrerURI"/>
|
||||
<parameter name="aCharset"/>
|
||||
<parameter name="aPostData"/>
|
||||
<parameter name="aParams"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
var params = arguments[1];
|
||||
if (typeof(params) == "number") {
|
||||
params = {
|
||||
flags: aFlags,
|
||||
referrerURI: aReferrerURI,
|
||||
charset: aCharset,
|
||||
postData: aPostData,
|
||||
};
|
||||
}
|
||||
_loadURIWithFlags(this, aURI, params);
|
||||
_loadURI(this, aURI, aParams);
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
@ -2341,24 +2329,12 @@
|
|||
<field name="tabModalPromptBox">null</field>
|
||||
|
||||
<!-- throws exception for unknown schemes -->
|
||||
<method name="loadURIWithFlags">
|
||||
<method name="loadURI">
|
||||
<parameter name="aURI"/>
|
||||
<parameter name="aFlags"/>
|
||||
<parameter name="aReferrerURI"/>
|
||||
<parameter name="aCharset"/>
|
||||
<parameter name="aPostData"/>
|
||||
<parameter name="aParams"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
var params = arguments[1];
|
||||
if (typeof(params) == "number") {
|
||||
params = {
|
||||
flags: aFlags,
|
||||
referrerURI: aReferrerURI,
|
||||
charset: aCharset,
|
||||
postData: aPostData,
|
||||
};
|
||||
}
|
||||
_loadURIWithFlags(this, aURI, params);
|
||||
_loadURI(this, aURI, aParams);
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
|
|
@ -77,7 +77,7 @@ var waitForLoad = async function(uri) {
|
|||
// Waits for a load and updates the known history
|
||||
var waitForLoadWithFlags = async function(uri, flags = Ci.nsIWebNavigation.LOAD_FLAGS_NONE) {
|
||||
info("Loading " + uri + " flags = " + flags);
|
||||
gBrowser.selectedBrowser.loadURIWithFlags(uri, flags, null, null, null);
|
||||
gBrowser.selectedBrowser.loadURI(uri, { flags });
|
||||
|
||||
await BrowserTestUtils.browserStopped(gBrowser);
|
||||
if (!(flags & Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_HISTORY)) {
|
||||
|
|
|
@ -9,10 +9,6 @@
|
|||
* the end of the test, there is an assertion that all items have been
|
||||
* removed from the whitelist, thus ensuring there are no stale entries. */
|
||||
let gWhitelist = [{
|
||||
file: "search.properties",
|
||||
key: "searchForSomethingWith",
|
||||
type: "single-quote"
|
||||
}, {
|
||||
file: "netError.dtd",
|
||||
key: "certerror.introPara",
|
||||
type: "single-quote"
|
||||
|
|
|
@ -448,7 +448,7 @@ function openLinkIn(url, where, params) {
|
|||
targetBrowser.createAboutBlankContentViewer(aPrincipal);
|
||||
}
|
||||
|
||||
targetBrowser.loadURIWithFlags(url, {
|
||||
targetBrowser.loadURI(url, {
|
||||
triggeringPrincipal: aTriggeringPrincipal,
|
||||
flags,
|
||||
referrerURI: aNoReferrer ? null : aReferrerURI,
|
||||
|
|
|
@ -108,6 +108,6 @@ function loadPanel(extensionId, extensionUrl, browserStyle) {
|
|||
getBrowser(sidebar).then(browser => {
|
||||
let uri = Services.io.newURI(policy.getURL());
|
||||
let triggeringPrincipal = Services.scriptSecurityManager.createCodebasePrincipal(uri, {});
|
||||
browser.loadURIWithFlags(extensionUrl, {triggeringPrincipal});
|
||||
browser.loadURI(extensionUrl, {triggeringPrincipal});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -316,7 +316,7 @@ class BasePopup {
|
|||
stylesheets: this.STYLESHEETS,
|
||||
});
|
||||
|
||||
browser.loadURIWithFlags(popupURL, {triggeringPrincipal: this.extension.principal});
|
||||
browser.loadURI(popupURL, {triggeringPrincipal: this.extension.principal});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -278,7 +278,7 @@ class ParentDevToolsPanel {
|
|||
},
|
||||
});
|
||||
|
||||
browser.loadURIWithFlags(url, {
|
||||
browser.loadURI(url, {
|
||||
triggeringPrincipal: extension.principal,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -176,7 +176,7 @@ class DevToolsPage extends HiddenExtensionPage {
|
|||
},
|
||||
});
|
||||
|
||||
this.browser.loadURIWithFlags(this.url, {
|
||||
this.browser.loadURI(this.url, {
|
||||
triggeringPrincipal: this.extension.principal,
|
||||
});
|
||||
|
||||
|
|
|
@ -614,7 +614,7 @@ this.tabs = class extends ExtensionAPI {
|
|||
: Ci.nsIWebNavigation.LOAD_FLAGS_NONE,
|
||||
triggeringPrincipal: context.principal,
|
||||
};
|
||||
nativeTab.linkedBrowser.loadURIWithFlags(url, options);
|
||||
nativeTab.linkedBrowser.loadURI(url, options);
|
||||
}
|
||||
|
||||
if (updateProperties.active !== null) {
|
||||
|
|
|
@ -58,8 +58,9 @@ function replaceUrlInTab(gBrowser, tab, url) {
|
|||
},
|
||||
});
|
||||
});
|
||||
gBrowser.loadURIWithFlags(
|
||||
url, {flags: Ci.nsIWebNavigation.LOAD_FLAGS_REPLACE_HISTORY});
|
||||
gBrowser.loadURI(url, {
|
||||
flags: Ci.nsIWebNavigation.LOAD_FLAGS_REPLACE_HISTORY,
|
||||
});
|
||||
return loaded;
|
||||
}
|
||||
|
||||
|
|
|
@ -33,10 +33,10 @@ function checkTelemetryRecords(expectedValue) {
|
|||
function promiseStoppedLoad(expectedURL) {
|
||||
return new Promise(resolve => {
|
||||
let browser = gBrowser.selectedBrowser;
|
||||
let original = browser.loadURIWithFlags;
|
||||
browser.loadURIWithFlags = function(URI) {
|
||||
let original = browser.loadURI;
|
||||
browser.loadURI = function(URI) {
|
||||
if (URI == expectedURL) {
|
||||
browser.loadURIWithFlags = original;
|
||||
browser.loadURI = original;
|
||||
ok(true, "loaded expected url: " + URI);
|
||||
resolve();
|
||||
return;
|
||||
|
|
|
@ -2901,7 +2901,7 @@ var SessionStoreInternal = {
|
|||
// a flash of the about:tabcrashed page after selecting
|
||||
// the revived tab.
|
||||
aTab.removeAttribute("crashed");
|
||||
browser.loadURI("about:blank", null, null);
|
||||
browser.loadURI("about:blank");
|
||||
|
||||
let data = TabState.collect(aTab);
|
||||
this.restoreTab(aTab, data, {
|
||||
|
|
|
@ -17,7 +17,7 @@ add_task(async function() {
|
|||
|
||||
// Load a new URI with a specific referrer.
|
||||
let referrerURI = Services.io.newURI(REFERRER1);
|
||||
browser.loadURI("http://example.org", referrerURI, null);
|
||||
browser.loadURI("http://example.org", { referrerURI });
|
||||
await promiseBrowserLoaded(browser);
|
||||
|
||||
await TabStateFlusher.flush(browser);
|
||||
|
|
|
@ -12,7 +12,7 @@ let notificationsCount = 0;
|
|||
async function openWindow(url) {
|
||||
let win = await promiseNewWindowLoaded();
|
||||
let flags = Ci.nsIWebNavigation.LOAD_FLAGS_REPLACE_HISTORY;
|
||||
win.gBrowser.selectedBrowser.loadURIWithFlags(url, flags);
|
||||
win.gBrowser.selectedBrowser.loadURI(url, { flags });
|
||||
await promiseBrowserLoaded(win.gBrowser.selectedBrowser, true, url);
|
||||
return win;
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ let notificationsCount = 0;
|
|||
async function openWindow(url) {
|
||||
let win = await promiseNewWindowLoaded();
|
||||
let flags = Ci.nsIWebNavigation.LOAD_FLAGS_REPLACE_HISTORY;
|
||||
win.gBrowser.selectedBrowser.loadURIWithFlags(url, flags);
|
||||
win.gBrowser.selectedBrowser.loadURI(url, { flags });
|
||||
await promiseBrowserLoaded(win.gBrowser.selectedBrowser, true, url);
|
||||
return win;
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ add_task(async function test() {
|
|||
|
||||
// Load some URL in the current tab.
|
||||
let flags = Ci.nsIWebNavigation.LOAD_FLAGS_REPLACE_HISTORY;
|
||||
win.gBrowser.selectedBrowser.loadURIWithFlags("about:robots", flags);
|
||||
win.gBrowser.selectedBrowser.loadURI("about:robots", { flags });
|
||||
await promiseBrowserLoaded(win.gBrowser.selectedBrowser);
|
||||
|
||||
// Open a second tab and close the first one.
|
||||
|
|
|
@ -17,7 +17,7 @@ async function openAndCloseTab(window, url) {
|
|||
async function openWindow(url) {
|
||||
let win = await promiseNewWindowLoaded();
|
||||
let flags = Ci.nsIWebNavigation.LOAD_FLAGS_REPLACE_HISTORY;
|
||||
win.gBrowser.selectedBrowser.loadURIWithFlags(url, flags);
|
||||
win.gBrowser.selectedBrowser.loadURI(url, { flags });
|
||||
await promiseBrowserLoaded(win.gBrowser.selectedBrowser, true, url);
|
||||
return win;
|
||||
}
|
||||
|
|
|
@ -33,15 +33,14 @@ cmd_addFoundEngine=Add “%S”
|
|||
# grouped in a submenu using cmd_addFoundEngineMenu as a label.
|
||||
cmd_addFoundEngineMenu=Add search engine
|
||||
|
||||
# LOCALIZATION NOTE (searchForSomethingWith):
|
||||
# LOCALIZATION NOTE (searchForSomethingWith2):
|
||||
# This string is used to build the header above the list of one-click
|
||||
# search providers: "Search for <user-typed string> with:"
|
||||
# NB: please leave the <span> and its class exactly as it is in English.
|
||||
searchForSomethingWith=Search for <span class='contentSearchSearchWithHeaderSearchText'></span> with:
|
||||
searchForSomethingWith2=Search for %S with:
|
||||
|
||||
# LOCALIZATION NOTE (searchWithHeader):
|
||||
# The wording of this string should be as close as possible to
|
||||
# searchForSomethingWith. This string will be used when the user
|
||||
# searchForSomethingWith2. This string will be used when the user
|
||||
# has not typed anything.
|
||||
searchWithHeader=Search with:
|
||||
|
||||
|
|
|
@ -118,7 +118,7 @@ var ContentSearch = {
|
|||
}
|
||||
this._searchSuggestionUIStrings = {};
|
||||
let searchBundle = Services.strings.createBundle("chrome://browser/locale/search.properties");
|
||||
let stringNames = ["searchHeader", "searchForSomethingWith",
|
||||
let stringNames = ["searchHeader", "searchForSomethingWith2",
|
||||
"searchWithHeader", "searchSettings"];
|
||||
|
||||
for (let name of stringNames) {
|
||||
|
@ -239,9 +239,9 @@ var ContentSearch = {
|
|||
// Since we're going to load the search in the same browser, blur the search
|
||||
// UI to prevent further interaction before we start loading.
|
||||
this._reply(msg, "Blur");
|
||||
browser.loadURIWithFlags(submission.uri.spec,
|
||||
Ci.nsIWebNavigation.LOAD_FLAGS_NONE, null, null,
|
||||
submission.postData);
|
||||
browser.loadURI(submission.uri.spec, {
|
||||
postData: submission.postData
|
||||
});
|
||||
} else {
|
||||
let params = {
|
||||
postData: submission.postData,
|
||||
|
|
|
@ -167,7 +167,7 @@ add_task(async function() {
|
|||
|
||||
store.dispatch(Actions.batchEnable(false));
|
||||
|
||||
tab.linkedBrowser.loadURI(TOP_URL, null, null);
|
||||
tab.linkedBrowser.loadURI(TOP_URL);
|
||||
|
||||
await waitForNetworkEvents(monitor, REQUEST_COUNT);
|
||||
|
||||
|
|
|
@ -124,7 +124,7 @@ function swapToInnerBrowser({ tab, containerURL, getInnerBrowser }) {
|
|||
});
|
||||
// Prevent the `containerURL` from ending up in the tab's history.
|
||||
debug("Load container URL");
|
||||
containerBrowser.loadURIWithFlags(containerURL, {
|
||||
containerBrowser.loadURI(containerURL, {
|
||||
flags: Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_HISTORY,
|
||||
});
|
||||
|
||||
|
|
|
@ -315,7 +315,7 @@ function waitForViewportLoad(ui) {
|
|||
|
||||
function load(browser, url) {
|
||||
let loaded = BrowserTestUtils.browserLoaded(browser, false, url);
|
||||
browser.loadURI(url, null, null);
|
||||
browser.loadURI(url);
|
||||
return loaded;
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ add_task(async function test_dataURI_unique_opaque_origin() {
|
|||
let pagePrincipal = browser.contentPrincipal;
|
||||
info("pagePrincial " + pagePrincipal.origin);
|
||||
|
||||
browser.loadURIWithFlags("data:text/html,hi", 0, null, null, null);
|
||||
browser.loadURI("data:text/html,hi");
|
||||
await BrowserTestUtils.browserLoaded(browser);
|
||||
|
||||
await ContentTask.spawn(browser, { principal: pagePrincipal }, async function(args) {
|
||||
|
|
|
@ -22,7 +22,7 @@ function startTest() {
|
|||
BrowserTestUtils.browserLoaded(browser, false, url).then(() => {
|
||||
func();
|
||||
});
|
||||
browser.loadURIWithFlags(url, flags, null, null, null);
|
||||
browser.loadURI(url, { flags });
|
||||
}
|
||||
|
||||
// Load a normal http URL
|
||||
|
@ -68,4 +68,3 @@ function startTest() {
|
|||
|
||||
nextTest();
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,9 @@ function test() {
|
|||
postStream.addHeader("Content-Type", "application/x-www-form-urlencoded");
|
||||
postStream.setData(dataStream);
|
||||
|
||||
tab.linkedBrowser.loadURIWithFlags("http://mochi.test:8888/browser/docshell/test/browser/print_postdata.sjs", 0, null, null, postStream);
|
||||
tab.linkedBrowser.loadURI("http://mochi.test:8888/browser/docshell/test/browser/print_postdata.sjs", {
|
||||
postData: postStream,
|
||||
});
|
||||
BrowserTestUtils.browserLoaded(tab.linkedBrowser).then(() => {
|
||||
ContentTask.spawn(tab.linkedBrowser, gPostData, function(postData) {
|
||||
var bodyText = content.document.body.textContent;
|
||||
|
|
|
@ -1172,7 +1172,12 @@ var BrowserApp = {
|
|||
}
|
||||
|
||||
try {
|
||||
aBrowser.loadURIWithFlags(aURI, flags, referrerURI, charset, postData);
|
||||
aBrowser.loadURI(aURI, {
|
||||
flags,
|
||||
referrerURI,
|
||||
charset,
|
||||
postData,
|
||||
});
|
||||
} catch(e) {
|
||||
if (tab) {
|
||||
let message = {
|
||||
|
@ -3492,7 +3497,7 @@ nsBrowserAccess.prototype = {
|
|||
}
|
||||
|
||||
let openerWindow = (aFlags & Ci.nsIBrowserDOMWindow.OPEN_NO_OPENER) ? null : aOpener;
|
||||
// BrowserApp.addTab calls loadURIWithFlags with the appropriate params
|
||||
// BrowserApp.addTab calls loadURI with the appropriate params
|
||||
let tab = BrowserApp.addTab(aURI ? aURI.spec : "about:blank", { flags: loadflags,
|
||||
referrerURI: referrer,
|
||||
external: isExternal,
|
||||
|
@ -3509,7 +3514,7 @@ nsBrowserAccess.prototype = {
|
|||
// OPEN_CURRENTWINDOW and illegal values
|
||||
let browser = BrowserApp.selectedBrowser;
|
||||
if (aURI && browser) {
|
||||
browser.loadURIWithFlags(aURI.spec, {
|
||||
browser.loadURI(aURI.spec, {
|
||||
flags: loadflags,
|
||||
referrerURI: referrer,
|
||||
triggeringPrincipal: aTriggeringPrincipal,
|
||||
|
@ -3775,7 +3780,12 @@ Tab.prototype = {
|
|||
this.isSearch = "isSearch" in aParams ? aParams.isSearch : false;
|
||||
|
||||
try {
|
||||
this.browser.loadURIWithFlags(aURL, flags, referrerURI, charset, postData);
|
||||
this.browser.loadURI(aURL, {
|
||||
flags,
|
||||
referrerURI,
|
||||
charset,
|
||||
postData,
|
||||
});
|
||||
} catch(e) {
|
||||
let message = {
|
||||
type: "Content:LoadError",
|
||||
|
|
|
@ -54,7 +54,7 @@ class GeckoViewNavigation extends GeckoViewModule {
|
|||
this.browser.goForward();
|
||||
break;
|
||||
case "GeckoView:LoadUri":
|
||||
const { uri, referrer, baseUri, flags } = aData;
|
||||
const { uri, referrer, flags } = aData;
|
||||
|
||||
let navFlags = 0;
|
||||
|
||||
|
@ -75,9 +75,10 @@ class GeckoViewNavigation extends GeckoViewModule {
|
|||
navFlags |= Ci.nsIWebNavigation.LOAD_FLAGS_ALLOW_POPUPS;
|
||||
}
|
||||
|
||||
this.browser.loadURIWithFlags(uri, navFlags, referrer || null,
|
||||
baseUri ? Services.io.newURI(baseUri) : null,
|
||||
/* nsIPrincipal */ null);
|
||||
this.browser.loadURI(uri, {
|
||||
flags: navFlags,
|
||||
referrerURI: referrer,
|
||||
});
|
||||
break;
|
||||
case "GeckoView:Reload":
|
||||
this.browser.reload();
|
||||
|
|
|
@ -1163,4 +1163,4 @@ static const TransportSecurityPreload kPublicKeyPinningPreloadList[] = {
|
|||
|
||||
static const int32_t kUnknownId = -1;
|
||||
|
||||
static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1530430700215000);
|
||||
static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1530476950125000);
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -8,7 +8,7 @@
|
|||
/*****************************************************************************/
|
||||
|
||||
#include <stdint.h>
|
||||
const PRTime gPreloadListExpirationTime = INT64_C(1532849887739000);
|
||||
const PRTime gPreloadListExpirationTime = INT64_C(1532896136917000);
|
||||
%%
|
||||
0-1.party, 1
|
||||
0.me.uk, 1
|
||||
|
@ -558,7 +558,6 @@ const PRTime gPreloadListExpirationTime = INT64_C(1532849887739000);
|
|||
394922.com, 1
|
||||
396422.com, 1
|
||||
398.info, 1
|
||||
3ags.de, 1
|
||||
3bakayottu.com, 1
|
||||
3bigking.com, 1
|
||||
3c-d.de, 1
|
||||
|
@ -831,6 +830,7 @@ const PRTime gPreloadListExpirationTime = INT64_C(1532849887739000);
|
|||
645722.com, 1
|
||||
645822.com, 1
|
||||
645922.com, 1
|
||||
645ds.cn, 1
|
||||
646.io, 0
|
||||
646022.com, 1
|
||||
646322.com, 1
|
||||
|
@ -3703,7 +3703,6 @@ balist.es, 1
|
|||
baliyano.com, 1
|
||||
balkonien.org, 1
|
||||
ball.holdings, 1
|
||||
ballarin.cc, 1
|
||||
ballbusting-cbt.com, 1
|
||||
ballejaune.com, 1
|
||||
ballinarsl.com.au, 1
|
||||
|
@ -4740,6 +4739,24 @@ bl4ckb0x.eu, 1
|
|||
bl4ckb0x.info, 1
|
||||
bl4ckb0x.net, 1
|
||||
bl4ckb0x.org, 1
|
||||
blablacar.co.uk, 1
|
||||
blablacar.com, 1
|
||||
blablacar.com.tr, 1
|
||||
blablacar.com.ua, 1
|
||||
blablacar.de, 1
|
||||
blablacar.es, 1
|
||||
blablacar.fr, 1
|
||||
blablacar.hr, 1
|
||||
blablacar.hu, 1
|
||||
blablacar.in, 1
|
||||
blablacar.it, 1
|
||||
blablacar.mx, 1
|
||||
blablacar.nl, 1
|
||||
blablacar.pl, 1
|
||||
blablacar.pt, 1
|
||||
blablacar.ro, 1
|
||||
blablacar.rs, 1
|
||||
blablacar.ru, 1
|
||||
black-gay-porn.biz, 1
|
||||
black-khat.com, 1
|
||||
black-mail.nl, 1
|
||||
|
@ -7004,7 +7021,7 @@ cirugiasplasticas.com.mx, 1
|
|||
cirujanooral.com, 1
|
||||
cirurgicagervasio.com.br, 1
|
||||
cirurgicalucena.com.br, 1
|
||||
ciscodude.net, 0
|
||||
ciscodude.net, 1
|
||||
cisoaid.com, 1
|
||||
ciss.ltd, 1
|
||||
cisy.me, 1
|
||||
|
@ -8385,7 +8402,6 @@ cybermeldpunt.nl, 1
|
|||
cyberoptic.de, 1
|
||||
cyberpeace.nl, 1
|
||||
cyberphaze.com, 1
|
||||
cyberprey.com, 1
|
||||
cyberregister.nl, 1
|
||||
cyberregister.org, 1
|
||||
cyberscan.io, 1
|
||||
|
@ -10285,6 +10301,7 @@ dyktig.no, 1
|
|||
dylanboudro.com, 1
|
||||
dylankatz.com, 1
|
||||
dylanknoll.ca, 1
|
||||
dymersion.com, 1
|
||||
dyn-dnhensel.de, 1
|
||||
dyn-nserve.net, 1
|
||||
dyn.im, 1
|
||||
|
@ -13155,6 +13172,7 @@ frly.de, 1
|
|||
frob.nl, 1
|
||||
frodriguez.xyz, 1
|
||||
froehlich.it, 1
|
||||
frogatto.com, 1
|
||||
frogeye.fr, 1
|
||||
froggitt.com, 1
|
||||
frogsonamission.de, 1
|
||||
|
@ -13909,7 +13927,6 @@ gha.st, 1
|
|||
ghaglund.se, 1
|
||||
ghcif.de, 1
|
||||
ghislainphu.fr, 1
|
||||
ghostblog.info, 1
|
||||
ghostcir.com, 1
|
||||
ghrelinblocker.info, 1
|
||||
ghrelinblocker.org, 1
|
||||
|
@ -14056,6 +14073,7 @@ glicerina.online, 1
|
|||
glidingshop.cz, 1
|
||||
glidingshop.de, 1
|
||||
glidingshop.eu, 1
|
||||
glittersjabloon.nl, 1
|
||||
glloq.org, 1
|
||||
glob-coin.com, 1
|
||||
global-adult-webcams.com, 1
|
||||
|
@ -15300,6 +15318,9 @@ hestervanderheijden.nl, 1
|
|||
hetene.nl, 1
|
||||
hethely.ch, 1
|
||||
hetmeisjeachterpauw.nl, 1
|
||||
hetmer.com, 1
|
||||
hetmer.cz, 1
|
||||
hetmer.net, 1
|
||||
heute-kaufen.de, 1
|
||||
heute.training, 1
|
||||
heverhagen.rocks, 1
|
||||
|
@ -15963,11 +15984,11 @@ husakbau.at, 1
|
|||
hushfile.it, 1
|
||||
husic.net, 0
|
||||
husky.xyz, 1
|
||||
huskyduvercors.com, 1
|
||||
huskyinc.us, 1
|
||||
hussam.eu.org, 1
|
||||
hustle.com, 1
|
||||
hustle.life, 1
|
||||
hustlehope.com, 1
|
||||
hustunique.com, 1
|
||||
huto.ml, 1
|
||||
huutonauru.net, 1
|
||||
|
@ -20186,6 +20207,7 @@ lionlyrics.com, 1
|
|||
lionsdeal.com, 1
|
||||
lipartydepot.com, 1
|
||||
lipex.com, 1
|
||||
lipo.lol, 1
|
||||
lipoabaltimore.org, 1
|
||||
liqd.net, 1
|
||||
liquid.cz, 1
|
||||
|
@ -21076,7 +21098,6 @@ mammaw.com, 1
|
|||
mammeitalianeavienna.com, 1
|
||||
mammooc.org, 1
|
||||
mamochka.org.ua, 1
|
||||
mamospienas.lt, 1
|
||||
mamot.fr, 0
|
||||
mamout.xyz, 1
|
||||
mamuko.nl, 1
|
||||
|
@ -21531,6 +21552,7 @@ maynardnetworks.com, 0
|
|||
mayomarquees.com, 1
|
||||
mayopartyhire.com, 1
|
||||
mayoristassexshop.com, 1
|
||||
maypolevilla.co.uk, 1
|
||||
mayrhofer.eu.org, 1
|
||||
mazda-mps.de, 1
|
||||
mazda-thermote.com, 1
|
||||
|
@ -21704,7 +21726,6 @@ medicinskavranje.edu.rs, 1
|
|||
medicocompetente.it, 1
|
||||
medicoresponde.com.br, 1
|
||||
medienweite.de, 1
|
||||
medifab.online, 1
|
||||
medifi.com, 1
|
||||
medigap-quote.net, 1
|
||||
medinside.ch, 1
|
||||
|
@ -22647,8 +22668,6 @@ moonkin.eu, 1
|
|||
moonmelo.com, 1
|
||||
moonraptor.co.uk, 1
|
||||
moonraptor.com, 1
|
||||
moonrhythm.info, 1
|
||||
moonrhythm.io, 1
|
||||
moonshyne.org, 1
|
||||
moonvpn.org, 1
|
||||
moorewelliver.com, 1
|
||||
|
@ -23598,7 +23617,6 @@ ncconsumer.org, 1
|
|||
ncdesigns-studio.com, 1
|
||||
ncea.net.au, 1
|
||||
nchangfong.com, 1
|
||||
nchristo.com, 1
|
||||
nclvle.co.uk, 1
|
||||
ncpw.gov, 1
|
||||
ncrmnt.org, 1
|
||||
|
@ -25456,7 +25474,6 @@ parisfranceparking.de, 1
|
|||
parisfranceparking.fr, 1
|
||||
parisfranceparking.nl, 1
|
||||
parishome.jp, 1
|
||||
parisprovincedemenagements.fr, 1
|
||||
parkeren.in, 1
|
||||
parkhillsbaptist.church, 1
|
||||
parkinginparis.fr, 1
|
||||
|
@ -25909,7 +25926,6 @@ peterhuetz.com, 1
|
|||
peterjohnson.io, 1
|
||||
peterlew.is, 1
|
||||
petersontoscano.com, 1
|
||||
pethelpers.org, 1
|
||||
petit-archer.com, 1
|
||||
petite-maison.ch, 1
|
||||
petitsfrenchies.com, 1
|
||||
|
@ -26855,7 +26871,6 @@ prestonandsons.com.au, 1
|
|||
prestonbrant.com, 1
|
||||
pretachique.com.br, 1
|
||||
pretix.eu, 1
|
||||
pretrialservices.gov, 1
|
||||
pretty.hu, 1
|
||||
prettytunesapp.com, 1
|
||||
pretwolk.nl, 1
|
||||
|
@ -27040,6 +27055,7 @@ projektzentrisch.de, 1
|
|||
projest.ch, 1
|
||||
prok.pw, 1
|
||||
prokop.ovh, 1
|
||||
promedicalapplications.com, 1
|
||||
promesa.net, 1
|
||||
prometheanfire.net, 1
|
||||
prometheanfire.org, 1
|
||||
|
@ -27145,7 +27161,6 @@ przemas.pl, 1
|
|||
ps-provider.co.jp, 1
|
||||
ps-qa.com, 1
|
||||
ps4all.nl, 1
|
||||
psa.gov, 1
|
||||
psb.cloud, 1
|
||||
psb1.org, 1
|
||||
psb1911.com, 1
|
||||
|
@ -27252,7 +27267,6 @@ punkapoule.fr, 1
|
|||
punkdns.top, 1
|
||||
punknews.org, 1
|
||||
puntacanalink.com, 1
|
||||
punte-juwelier.nl, 1
|
||||
pupboss.com, 1
|
||||
puppet.pl, 1
|
||||
purahealthyliving.com, 1
|
||||
|
@ -27438,6 +27452,7 @@ quanwuji.com, 1
|
|||
quanyin.eu.org, 1
|
||||
quareal.ru, 1
|
||||
quarkdose.de, 1
|
||||
quarryhillrentals.com, 1
|
||||
quarterfull.com, 1
|
||||
quartix.com, 1
|
||||
quartzclinical.com, 1
|
||||
|
@ -28795,6 +28810,7 @@ rullzer.com, 1
|
|||
rulu.co, 1
|
||||
rulu.tv, 1
|
||||
rulutv.com, 1
|
||||
rumlager.de, 1
|
||||
rummel-platz.de, 1
|
||||
rumplesinflatables.co.uk, 1
|
||||
rumtaste.com, 1
|
||||
|
@ -29429,6 +29445,7 @@ scijinks.gov, 1
|
|||
scimage.com, 1
|
||||
scintilla.nl, 1
|
||||
scintillating.stream, 1
|
||||
scionasset.com, 1
|
||||
scis.com.ua, 1
|
||||
scistarter.com, 1
|
||||
scitopia.me, 1
|
||||
|
@ -29804,7 +29821,6 @@ seokay.com, 1
|
|||
seolib.org, 1
|
||||
seomarketingdeals.com, 1
|
||||
seomen.biz, 1
|
||||
seon.me, 1
|
||||
seoprovider.nl, 1
|
||||
seoquake.com, 1
|
||||
seoscribe.net, 1
|
||||
|
@ -29897,6 +29913,7 @@ setfix.de, 1
|
|||
sethcaplan.com, 1
|
||||
sethvargo.com, 1
|
||||
seti-germany.de, 1
|
||||
setkit.net, 1
|
||||
settberg.de, 1
|
||||
setterirlandes.com.br, 1
|
||||
settleapp.co, 1
|
||||
|
@ -30050,6 +30067,7 @@ shavegazette.com, 1
|
|||
shavingks.com, 1
|
||||
shawcentral.ca, 0
|
||||
shawnhogan.com, 1
|
||||
shawnstarrcustomhomes.com, 1
|
||||
shawnwilkerson.com, 1
|
||||
shawnwilson.info, 1
|
||||
shazbots.org, 1
|
||||
|
@ -30385,6 +30403,7 @@ silvobeat.blog, 1
|
|||
silvobeat.com, 1
|
||||
sim-karten.net, 1
|
||||
sim-minaoshi.jp, 1
|
||||
sim-sim.appspot.com, 1
|
||||
sim4seed.org, 1
|
||||
simam.de, 1
|
||||
simark.ca, 1
|
||||
|
@ -32025,12 +32044,12 @@ sundayfundayjapan.com, 1
|
|||
suneilpatel.com, 1
|
||||
sunfeathers.net, 1
|
||||
sunfireshop.com.br, 1
|
||||
sunflyer.cn, 0
|
||||
sunfox.cz, 1
|
||||
sunfulong.blog, 1
|
||||
sunfulong.me, 1
|
||||
sunjaydhama.com, 1
|
||||
sunn.ie, 1
|
||||
sunriseafricarelief.com, 1
|
||||
sunsetwx.com, 1
|
||||
sunshinesf.org, 1
|
||||
sunsmartresorts.com, 1
|
||||
|
@ -32721,7 +32740,6 @@ teemperor.de, 1
|
|||
teemulintula.fi, 1
|
||||
teencounseling.com, 1
|
||||
teenerotic.net, 1
|
||||
teeplelaw.com, 1
|
||||
teesypeesy.com, 1
|
||||
teeworlds-friends.de, 1
|
||||
tefek.cz, 1
|
||||
|
@ -32749,7 +32767,6 @@ telecamera.pro, 0
|
|||
telecharger-itunes.com, 1
|
||||
telecharger-open-office.com, 1
|
||||
telecharger-winrar.com, 1
|
||||
telecomwestland.nl, 1
|
||||
teledivi.com, 1
|
||||
telefon.report, 1
|
||||
telefonabonnement.dk, 1
|
||||
|
@ -32827,6 +32844,7 @@ terminalvelocity.co.nz, 1
|
|||
termitemounds.org, 1
|
||||
termitinitus.org, 1
|
||||
terra-x.net, 1
|
||||
terra.fitness, 1
|
||||
terrab.de, 0
|
||||
terracloud.de, 0
|
||||
terraelectronica.ru, 1
|
||||
|
@ -32967,7 +32985,6 @@ the-gist.io, 1
|
|||
the-hemingway-code.de, 1
|
||||
the-mystery.org, 1
|
||||
the-paddies.de, 1
|
||||
the-pcca.org, 1
|
||||
the-webmaster.com, 1
|
||||
the-zenti.de, 1
|
||||
the2f.de, 1
|
||||
|
@ -32995,7 +33012,6 @@ thebodyprinciple.com, 1
|
|||
thebouncedepartment.co.uk, 1
|
||||
thebouncyman.co.uk, 1
|
||||
theboxofcarlos.com, 1
|
||||
thebreakhotel.com, 1
|
||||
thebreakroom.org, 1
|
||||
thebte.com, 1
|
||||
thebuffalotavern.com, 1
|
||||
|
@ -33980,7 +33996,6 @@ traceroute.guru, 1
|
|||
traceroute.link, 1
|
||||
traceroute.network, 1
|
||||
traces.ml, 1
|
||||
tracetracker.no, 1
|
||||
tracfinancialservices.com, 1
|
||||
tracinsurance.com, 1
|
||||
track.plus, 1
|
||||
|
@ -35006,7 +35021,7 @@ valorem-tax.ch, 1
|
|||
valoremtax.ch, 1
|
||||
valoremtax.com, 1
|
||||
valshamar.is, 1
|
||||
valsk.is, 1
|
||||
valsk.is, 0
|
||||
valskis.lt, 1
|
||||
valtlai.fi, 1
|
||||
valtoaho.com, 1
|
||||
|
@ -35073,6 +35088,7 @@ varimedoma.com, 1
|
|||
varshathacker.com, 1
|
||||
varta.io, 1
|
||||
varunagw.com, 0
|
||||
varunpriolkar.com, 1
|
||||
varvy.com, 1
|
||||
vascomm.co.id, 1
|
||||
vase-eroticke-povidky.cz, 1
|
||||
|
@ -35596,7 +35612,7 @@ vorodevops.com, 1
|
|||
vos-fleurs.ch, 1
|
||||
vos-fleurs.com, 1
|
||||
vosgym.jp, 1
|
||||
voshod.org, 1
|
||||
voshod.org, 0
|
||||
vosjesweb.nl, 1
|
||||
vosky.fr, 1
|
||||
vosn.de, 1
|
||||
|
@ -36378,7 +36394,6 @@ wienerwichtelchallenge.at, 1
|
|||
wieobensounten.de, 1
|
||||
wifi-hack.com, 1
|
||||
wifi-names.com, 1
|
||||
wifimask.com, 1
|
||||
wifipineapple.com, 1
|
||||
wifirst.net, 1
|
||||
wifree.lv, 1
|
||||
|
@ -36693,7 +36708,6 @@ worldofterra.net, 1
|
|||
worldofvnc.net, 1
|
||||
worldofwobble.co.uk, 1
|
||||
worldpeacetechnology.com, 1
|
||||
worldpovertysolutions.org, 1
|
||||
worldsgreatestazuredemo.com, 1
|
||||
worldsoccerclips.com, 1
|
||||
worldstone777.com, 1
|
||||
|
@ -37372,7 +37386,6 @@ ybresson.com, 1
|
|||
ybscareers.co.uk, 1
|
||||
ybsul.com, 1
|
||||
ybti.net, 1
|
||||
ycaaz.com, 1
|
||||
ych.art, 1
|
||||
ycherbonnel.fr, 1
|
||||
ychon.com, 1
|
||||
|
|
|
@ -321,7 +321,9 @@ function startAndLoadURI(pageName) {
|
|||
|
||||
start_time = Date.now();
|
||||
if (loadNoCache) {
|
||||
content.loadURIWithFlags(pageName, Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_CACHE);
|
||||
content.loadURI(pageName, {
|
||||
flags: Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_CACHE
|
||||
});
|
||||
} else {
|
||||
content.loadURI(pageName);
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ class BackgroundPage extends HiddenExtensionPage {
|
|||
|
||||
extensions.emit("extension-browser-inserted", this.browser);
|
||||
|
||||
this.browser.loadURIWithFlags(this.url, {triggeringPrincipal: this.extension.principal});
|
||||
this.browser.loadURI(this.url, {triggeringPrincipal: this.extension.principal});
|
||||
|
||||
let context = await promiseExtensionViewLoaded(this.browser);
|
||||
TelemetryStopwatch.finish("WEBEXT_BACKGROUND_PAGE_LOAD_MS", this);
|
||||
|
|
|
@ -103,52 +103,25 @@
|
|||
<!-- throws exception for unknown schemes -->
|
||||
<method name="loadURI">
|
||||
<parameter name="aURI"/>
|
||||
<parameter name="aReferrerURI"/>
|
||||
<parameter name="aCharset"/>
|
||||
<parameter name="aParams"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
const nsIWebNavigation = Ci.nsIWebNavigation;
|
||||
const flags = nsIWebNavigation.LOAD_FLAGS_NONE;
|
||||
this._wrapURIChangeCall(() =>
|
||||
this.loadURIWithFlags(aURI, flags, aReferrerURI, aCharset));
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
<!-- throws exception for unknown schemes -->
|
||||
<method name="loadURIWithFlags">
|
||||
<parameter name="aURI"/>
|
||||
<parameter name="aFlags"/>
|
||||
<parameter name="aReferrerURI"/>
|
||||
<parameter name="aCharset"/>
|
||||
<parameter name="aPostData"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
if (!aURI)
|
||||
if (!aURI) {
|
||||
aURI = "about:blank";
|
||||
|
||||
var aReferrerPolicy = Ci.nsIHttpChannel.REFERRER_POLICY_UNSET;
|
||||
var aTriggeringPrincipal;
|
||||
|
||||
// Check for loadURIWithFlags(uri, { ... });
|
||||
var params = arguments[1];
|
||||
if (params && typeof(params) == "object") {
|
||||
aFlags = params.flags;
|
||||
aReferrerURI = params.referrerURI;
|
||||
if ("referrerPolicy" in params) {
|
||||
aReferrerPolicy = params.referrerPolicy;
|
||||
}
|
||||
if ("triggeringPrincipal" in params) {
|
||||
aTriggeringPrincipal = params.triggeringPrincipal;
|
||||
}
|
||||
aCharset = params.charset;
|
||||
aPostData = params.postData;
|
||||
}
|
||||
|
||||
let {
|
||||
flags = Ci.nsIWebNavigation.LOAD_FLAGS_NONE,
|
||||
referrerURI,
|
||||
referrerPolicy = Ci.nsIHttpChannel.REFERRER_POLICY_UNSET,
|
||||
triggeringPrincipal,
|
||||
postData,
|
||||
} = aParams || {};
|
||||
|
||||
this._wrapURIChangeCall(() =>
|
||||
this.webNavigation.loadURIWithOptions(
|
||||
aURI, aFlags, aReferrerURI, aReferrerPolicy,
|
||||
aPostData, null, null, aTriggeringPrincipal));
|
||||
aURI, flags, referrerURI, referrerPolicy,
|
||||
postData, null, null, triggeringPrincipal));
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
|
|
@ -2220,7 +2220,7 @@ var gDiscoverView = {
|
|||
if (!aKeepHistory)
|
||||
flags |= Ci.nsIWebNavigation.LOAD_FLAGS_REPLACE_HISTORY;
|
||||
|
||||
this._browser.loadURIWithFlags(aURL, flags);
|
||||
this._browser.loadURI(aURL, { flags });
|
||||
},
|
||||
|
||||
onLocationChange(aWebProgress, aRequest, aLocation, aFlags) {
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
// 6) Start reloading first tab.
|
||||
function loadFirstTab() {
|
||||
var browser = document.getElementById("tab1browser");
|
||||
browser.loadURI("data:text/html;charset=utf-8,<body><h2>First Tab</h2><p><input type='submit' value='Button' id='button1'/></body>", null, null);
|
||||
browser.loadURI("data:text/html;charset=utf-8,<body><h2>First Tab</h2><p><input type='submit' value='Button' id='button1'/></body>");
|
||||
}
|
||||
|
||||
function configureFirstTab() {
|
||||
|
@ -81,7 +81,7 @@
|
|||
// 8) Start loading second tab.
|
||||
function loadSecondTab() {
|
||||
var browser = document.getElementById("tab2browser");
|
||||
browser.loadURI("data:text/html;charset=utf-8,<body><h2>Second Tab</h2><p><input type='submit' value='Button' id='button1'/></body>", null, null);
|
||||
browser.loadURI("data:text/html;charset=utf-8,<body><h2>Second Tab</h2><p><input type='submit' value='Button' id='button1'/></body>");
|
||||
}
|
||||
|
||||
function configureSecondTab() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче