mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 516603 - make existing addTab and loadOneTab callers pass a hashed arguments object. r=dao
This commit is contained in:
parent
b2508cbfdd
commit
2d21461a7d
@ -1799,7 +1799,7 @@ function BrowserOpenTab()
|
||||
"chrome,all,dialog=no", "about:blank");
|
||||
return;
|
||||
}
|
||||
gBrowser.loadOneTab("about:blank", null, null, null, false, false);
|
||||
gBrowser.loadOneTab("about:blank", {inBackground: false});
|
||||
if (gURLBar)
|
||||
gURLBar.focus();
|
||||
}
|
||||
@ -1822,7 +1822,12 @@ function delayedOpenWindow(chrome, flags, href, postData)
|
||||
the URI kicked off before becoming the active content area. */
|
||||
function delayedOpenTab(aUrl, aReferrer, aCharset, aPostData, aAllowThirdPartyFixup)
|
||||
{
|
||||
gBrowser.loadOneTab(aUrl, aReferrer, aCharset, aPostData, false, aAllowThirdPartyFixup);
|
||||
gBrowser.loadOneTab(aUrl, {
|
||||
referrerURI: aReferrer,
|
||||
charset: aCharset,
|
||||
postData: aPostData,
|
||||
inBackground: false,
|
||||
allowThirdPartyFixup: aAllowThirdPartyFixup});
|
||||
}
|
||||
|
||||
var gLastOpenDirectory = {
|
||||
@ -4445,8 +4450,9 @@ nsBrowserAccess.prototype =
|
||||
// If this is an external load, we need to load a blank tab first,
|
||||
// because loadflags can't be passed to loadOneTab.
|
||||
let loadBlankFirst = !aURI || isExternal;
|
||||
let tab = win.gBrowser.loadOneTab(loadBlankFirst ? "about:blank" : aURI.spec,
|
||||
referrer, null, null, loadInBackground, false);
|
||||
let tab = win.gBrowser.loadOneTab(loadBlankFirst ? "about:blank" : aURI.spec, {
|
||||
referrerURI: referrer,
|
||||
inBackground: loadInBackground});
|
||||
let browser = win.gBrowser.getBrowserForTab(tab);
|
||||
|
||||
if (loadBlankFirst && aURI)
|
||||
@ -6006,7 +6012,7 @@ function blocklistInfo()
|
||||
var formatter = Components.classes["@mozilla.org/toolkit/URLFormatterService;1"]
|
||||
.getService(Components.interfaces.nsIURLFormatter);
|
||||
var url = formatter.formatURLPref("extensions.blocklist.detailsURL");
|
||||
gBrowser.loadOneTab(url, null, null, null, false, false);
|
||||
gBrowser.loadOneTab(url, {inBackground: false});
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -1145,7 +1145,7 @@
|
||||
}
|
||||
}
|
||||
else
|
||||
firstTabAdded = this.addTab(aURIs[0], null, null, null, owner, false);
|
||||
firstTabAdded = this.addTab(aURIs[0], {ownerTab: owner});
|
||||
|
||||
var tabNum = this.mTabContainer.selectedIndex;
|
||||
for (let i = 1; i < aURIs.length; ++i) {
|
||||
@ -2160,7 +2160,7 @@
|
||||
if (document.getBindingParent(aEvent.originalTarget).localName != "tab" || dropEffect == "copy") {
|
||||
// We're adding a new tab.
|
||||
newIndex = this.getNewIndex(aEvent);
|
||||
newTab = this.loadOneTab(getShortcutOrURI(url), null, null, null, bgLoad, false);
|
||||
newTab = this.loadOneTab(getShortcutOrURI(url), {inBackground: bgLoad});
|
||||
this.moveTabTo(newTab, newIndex);
|
||||
}
|
||||
else {
|
||||
|
@ -43,7 +43,7 @@ function test() {
|
||||
function tabOpenDance() {
|
||||
let tabs = [];
|
||||
function addTab(aURL,aReferrer)
|
||||
tabs.push(gBrowser.addTab(aURL, aReferrer));
|
||||
tabs.push(gBrowser.addTab(aURL, {referrerURI: aReferrer}));
|
||||
|
||||
addTab("http://localhost:8888/#0");
|
||||
gBrowser.selectedTab = tabs[0];
|
||||
|
@ -124,8 +124,10 @@
|
||||
if (aTriggeringEvent && aTriggeringEvent.altKey) {
|
||||
this.handleRevert();
|
||||
content.focus();
|
||||
gBrowser.loadOneTab(url, null, null, postData, false,
|
||||
true /* allow third party fixup */);
|
||||
gBrowser.loadOneTab(url, {
|
||||
postData: postData,
|
||||
inBackground: false,
|
||||
allowThirdPartyFixup: true});
|
||||
aTriggeringEvent.preventDefault();
|
||||
aTriggeringEvent.stopPropagation();
|
||||
}
|
||||
|
@ -227,8 +227,11 @@ function openUILinkIn( url, where, allowThirdPartyFixup, postData, referrerUrl )
|
||||
// fall through
|
||||
case "tab":
|
||||
let browser = w.getBrowser();
|
||||
browser.loadOneTab(url, referrerUrl, null, postData, loadInBackground,
|
||||
allowThirdPartyFixup || false);
|
||||
browser.loadOneTab(url, {
|
||||
referrerURI: referrerUrl,
|
||||
postData: postData,
|
||||
inBackground: loadInBackground,
|
||||
allowThirdPartyFixup: allowThirdPartyFixup});
|
||||
break;
|
||||
}
|
||||
|
||||
@ -586,8 +589,12 @@ function openNewTabWith(aURL, aDocument, aPostData, aEvent,
|
||||
// open link in new tab
|
||||
var referrerURI = aDocument ? aDocument.documentURIObject : aReferrer;
|
||||
var browser = top.document.getElementById("content");
|
||||
return browser.loadOneTab(aURL, referrerURI, originCharset, aPostData,
|
||||
loadInBackground, aAllowThirdPartyFixup || false);
|
||||
return browser.loadOneTab(aURL, {
|
||||
referrerURI: referrerURI,
|
||||
charset: originCharset,
|
||||
postData: aPostData,
|
||||
inBackground: loadInBackground,
|
||||
allowThirdPartyFixup: aAllowThirdPartyFixup});
|
||||
}
|
||||
|
||||
function openNewWindowWith(aURL, aDocument, aPostData, aAllowThirdPartyFixup,
|
||||
|
Loading…
Reference in New Issue
Block a user