Bug 936659 - Remove unused parameters for Browser.addTab [r=sfoster]

This commit is contained in:
Matt Brubeck 2013-11-08 15:44:01 -08:00
parent 454f26a982
commit 43bedf2eeb
2 changed files with 4 additions and 8 deletions

View File

@ -511,9 +511,8 @@ var Browser = {
* new tab creation.
*/
_announceNewTab: function _announceNewTab(aTab, aParams, aBringFront) {
let getAttention = ("getAttention" in aParams ? aParams.getAttention : !aBringFront);
let event = document.createEvent("UIEvents");
event.initUIEvent("TabOpen", true, false, window, getAttention);
event.initUIEvent("TabOpen", true, false, window, 0);
aTab.chromeTab.dispatchEvent(event);
aTab.browser.messageManager.sendAsyncMessage("Browser:TabOpen");
},
@ -1060,7 +1059,7 @@ nsBrowserAccess.prototype = {
return null;
} else if (aWhere == Ci.nsIBrowserDOMWindow.OPEN_NEWTAB) {
let owner = isExternal ? null : Browser.selectedTab;
let tab = Browser.addTab("about:blank", true, owner, { getAttention: true });
let tab = Browser.addTab("about:blank", true, owner);
if (isExternal)
tab.closeOnExit = true;
browser = tab.browser;
@ -1074,7 +1073,7 @@ nsBrowserAccess.prototype = {
if (!browser) {
// Make a new tab to hold the app
let tab = Browser.addTab("about:blank", true, null, { getAttention: true });
let tab = Browser.addTab("about:blank", true);
browser = tab.browser;
browser.appURI = aURI;
} else {

View File

@ -729,14 +729,11 @@ SessionStore.prototype = {
for (let i=0; i<tabs.length; i++) {
let tabData = tabs[i];
// Add a tab, but don't load the URL until we need to
let params = { getAttention: false, delayLoad: true };
// We must have selected tabs as soon as possible, so we let all tabs be selected
// until we get the real selected tab. Then we stop selecting tabs. The end result
// is that the right tab is selected, but we also don't get a bunch of errors
let bringToFront = (i + 1 <= selected) && aBringToFront;
let tab = window.Browser.addTab(tabData.entries[tabData.index - 1].url, bringToFront, null, params);
let tab = window.Browser.addTab(tabData.entries[tabData.index - 1].url, bringToFront);
// Start a real load for the selected tab
if (i + 1 == selected) {