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 = '+ eval('window.openLinkIn = '+
window.openLinkIn.toSource().replace( window.openLinkIn.toSource().replace(
/((b|newTab = w\.gB)rowser.loadOneTab\()/g, /((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); this.handleNewTabFromCurrent(aOwner);
}, },
onBeforeOpenLinkWithParams : function TSTWindow_onBeforeOpenLinkWithParams(aParams) onBeforeOpenLinkWithTab : function TSTWindow_onBeforeOpenLinkWithParams(aTab)
{ {
if (aParams.linkNode && if (aTab && !this.checkToOpenChildTab(aTab))
!this.checkToOpenChildTab(aParams.linkNode.ownerDocument.defaultView)) this.handleNewTabFromCurrent(aTab);
this.handleNewTabFromCurrent(aParams.linkNode.ownerDocument.defaultView);
}, },
onBeforeOpenNewTabByThirdParty : function TSTWindow_onBeforeOpenNewTabByThirdParty(aOwner) onBeforeOpenNewTabByThirdParty : function TSTWindow_onBeforeOpenNewTabByThirdParty(aOwner)