Fix click hook for nesting new tabs in e10s mode

This commit is contained in:
John Schoenick 2014-08-27 16:12:39 -07:00
parent 8fa1d76281
commit 0cc0714723
2 changed files with 4 additions and 5 deletions

View File

@ -212,7 +212,7 @@ var TreeStyleTabWindowHelper = {
eval('window.openLinkIn = '+
window.openLinkIn.toSource().replace(
/((b|newTab = w\.gB)rowser.loadOneTab\()/g,
'TreeStyleTabService.onBeforeOpenLinkWithParams(params); $1'
'TreeStyleTabService.onBeforeOpenLinkWithTab(gBrowser.selectedTab); $1'
)
);
}

View File

@ -1213,11 +1213,10 @@ TreeStyleTabWindow.prototype = inherit(TreeStyleTabBase, {
this.handleNewTabFromCurrent(aOwner);
},
onBeforeOpenLinkWithParams : function TSTWindow_onBeforeOpenLinkWithParams(aParams)
onBeforeOpenLinkWithTab : function TSTWindow_onBeforeOpenLinkWithParams(aTab)
{
if (aParams.linkNode &&
!this.checkToOpenChildTab(aParams.linkNode.ownerDocument.defaultView))
this.handleNewTabFromCurrent(aParams.linkNode.ownerDocument.defaultView);
if (aTab && !this.checkToOpenChildTab(aTab))
this.handleNewTabFromCurrent(aTab);
},
onBeforeOpenNewTabByThirdParty : function TSTWindow_onBeforeOpenNewTabByThirdParty(aOwner)