Merge pull request #760 from Nephyrin/master

Fix treestyletab in multiprocess (e10s) firefox
This commit is contained in:
YUKI "Piro" Hiroshi 2014-09-30 14:19:24 +09:00
commit 8962230b0e
3 changed files with 11 additions and 7 deletions

View File

@ -207,10 +207,12 @@ var TreeStyleTabWindowHelper = {
}
if ('openLinkIn' in window) {
// Bug 1050447 changed this line in Fx 34 to
// newTab = w.gBrowser.loadOneTab(
eval('window.openLinkIn = '+
window.openLinkIn.toSource().replace(
'browser.loadOneTab(',
'TreeStyleTabService.onBeforeOpenLinkWithParams(params); $&'
/((b|newTab = w\.gB)rowser.loadOneTab\()/g,
'TreeStyleTabService.onBeforeOpenLinkWithTab(gBrowser.selectedTab); $1'
)
);
}

View File

@ -712,12 +712,15 @@ AutoHideBrowser.prototype = {
},
showHideContentsAreaScreen : function AHB_showHideContentsAreaScreen()
{
// this.browser.contentWindow doesn't currently work in e10s
// mode, use this.browser.mCurrentBrowser.contentWindow as a
// workaround until bug 1042680 is fixed
if (
this.expanded &&
this.contentAreaScreenEnabled &&
Services.focus.activeWindow &&
Services.focus.activeWindow.top == this.window &&
this.findPluginArea(this.browser.contentWindow)
this.findPluginArea(this.browser.mCurrentBrowser.contentWindow)
) {
let box = this.getContentsAreaBox();
let style = this.screen.style;

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)