From b64986b292d4c882cff0aa716a1a4b2e2478fa34 Mon Sep 17 00:00:00 2001 From: John Schoenick Date: Wed, 27 Aug 2014 15:54:15 -0700 Subject: [PATCH 1/3] Workaround for bug 1042680 issue #3 in e10s mode --- modules/autoHide.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/autoHide.js b/modules/autoHide.js index effbdec0..3889c1bc 100644 --- a/modules/autoHide.js +++ b/modules/autoHide.js @@ -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; From 8fa1d76281b3acf7db121ab67a58f1d667a0b177 Mon Sep 17 00:00:00 2001 From: John Schoenick Date: Wed, 27 Aug 2014 15:58:06 -0700 Subject: [PATCH 2/3] Fix click->open link handler for bug 1050447/Fx 34 --- content/treestyletab/windowHelper.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/content/treestyletab/windowHelper.js b/content/treestyletab/windowHelper.js index ce60ca3e..46940cae 100644 --- a/content/treestyletab/windowHelper.js +++ b/content/treestyletab/windowHelper.js @@ -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.onBeforeOpenLinkWithParams(params); $1' ) ); } From 0cc0714723209749f94656e2d7fb0e1eba64e039 Mon Sep 17 00:00:00 2001 From: John Schoenick Date: Wed, 27 Aug 2014 16:12:39 -0700 Subject: [PATCH 3/3] Fix click hook for nesting new tabs in e10s mode --- content/treestyletab/windowHelper.js | 2 +- modules/window.js | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/content/treestyletab/windowHelper.js b/content/treestyletab/windowHelper.js index 46940cae..9a841008 100644 --- a/content/treestyletab/windowHelper.js +++ b/content/treestyletab/windowHelper.js @@ -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' ) ); } diff --git a/modules/window.js b/modules/window.js index 49caee9f..f9a09136 100644 --- a/modules/window.js +++ b/modules/window.js @@ -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)