Fix sidebar in fullscreen mode for Firefox 40+.
This is a change from bug 947854 where FullScreen.mouseoverToggle is replaced with FullScreen.{show,hide}NavToolbox. This fix detects this and do patching accordingly.
This commit is contained in:
parent
27efc4311d
commit
075487b836
@ -259,12 +259,28 @@ var TreeStyleTabWindowHelper = {
|
||||
));
|
||||
}, 'TreeStyleTab');
|
||||
|
||||
TreeStyleTabUtils.doPatching(FullScreen.mouseoverToggle, 'FullScreen.mouseoverToggle', function(aName, aSource) {
|
||||
return eval(aName+' = '+aSource.replace(
|
||||
'this._isChromeCollapsed = !aShow;',
|
||||
'gBrowser.treeStyleTab.updateFloatingTabbar(gBrowser.treeStyleTab.kTABBAR_UPDATE_BY_FULLSCREEN); $&'
|
||||
));
|
||||
}, 'treeStyleTab');
|
||||
if ('showNavToolbox' in FullScreen) { // for Firefox 40 or later
|
||||
TreeStyleTabUtils.doPatching(FullScreen.showNavToolbox, 'FullScreen.showNavToolbox', function(aName, aSource) {
|
||||
return eval(aName+' = '+aSource.replace(
|
||||
'this._isChromeCollapsed = false;',
|
||||
'gBrowser.treeStyleTab.updateFloatingTabbar(gBrowser.treeStyleTab.kTABBAR_UPDATE_BY_FULLSCREEN); $&'
|
||||
));
|
||||
}, 'treeStyleTab');
|
||||
TreeStyleTabUtils.doPatching(FullScreen.hideNavToolbox, 'FullScreen.hideNavToolbox', function(aName, aSource) {
|
||||
return eval(aName+' = '+aSource.replace(
|
||||
'this._isChromeCollapsed = true;',
|
||||
'gBrowser.treeStyleTab.updateFloatingTabbar(gBrowser.treeStyleTab.kTABBAR_UPDATE_BY_FULLSCREEN); $&'
|
||||
));
|
||||
}, 'treeStyleTab');
|
||||
}
|
||||
else if ('mouseoverToggle' in FullScreen) { // for Firefox 39 or older
|
||||
TreeStyleTabUtils.doPatching(FullScreen.mouseoverToggle, 'FullScreen.mouseoverToggle', function(aName, aSource) {
|
||||
return eval(aName+' = '+aSource.replace(
|
||||
'this._isChromeCollapsed = !aShow;',
|
||||
'gBrowser.treeStyleTab.updateFloatingTabbar(gBrowser.treeStyleTab.kTABBAR_UPDATE_BY_FULLSCREEN); $&'
|
||||
));
|
||||
}, 'treeStyleTab');
|
||||
}
|
||||
|
||||
TreeStyleTabUtils.doPatching(FullScreen.toggle, 'FullScreen.toggle', function(aName, aSource) {
|
||||
return eval(aName+' = '+aSource.replace(
|
||||
|
Loading…
Reference in New Issue
Block a user