update compatibility codes for Tab Mix Plus
This commit is contained in:
parent
91ee4592dc
commit
d67ecd7d80
@ -75,8 +75,12 @@ var TreeStyleTabWindowHelper = {
|
||||
var strip = this.service.getTabStrip(aObserver) ||
|
||||
gBrowser.mStrip // fallback to the default strip, for Tab Mix Plus;
|
||||
|
||||
if (aObserver.tabContainer &&
|
||||
aObserver.tabContainer.tabbrowser == aObserver) { // Firefox 4.0 or later
|
||||
// Firefox 4.0 or later
|
||||
if (
|
||||
aObserver.tabContainer &&
|
||||
aObserver.tabContainer.tabbrowser == aObserver &&
|
||||
this.service.isGecko2 // tabbar.tabbrowser can be defined by addons like Tab Mix Plus.
|
||||
) {
|
||||
aObserver = aObserver.tabContainer;
|
||||
}
|
||||
|
||||
|
@ -974,6 +974,9 @@ TreeStyleTabBrowser.prototype = {
|
||||
scrollFrame = d.getAnonymousElementByAttribute(b.mTabContainer, 'class', 'tabs-frame') ||
|
||||
d.getAnonymousElementByAttribute(b.mTabContainer, 'anonid', 'scroll-tabs-frame');
|
||||
newTabBox = d.getAnonymousElementByAttribute(b.mTabContainer, 'id', 'tabs-newbutton-box');
|
||||
let newTabButton = document.getElementById('new-tab-button');
|
||||
if (newTabButton && newTabButton.parentNode == b.tabContainer._container)
|
||||
newTabBox = newTabButton;
|
||||
tabBarMode = this.getPref('extensions.tabmix.tabBarMode');
|
||||
}
|
||||
|
||||
@ -1017,6 +1020,7 @@ TreeStyleTabBrowser.prototype = {
|
||||
d.getAnonymousNodes(scrollFrame)[0].removeAttribute('flex');
|
||||
scrollFrame.parentNode.orient =
|
||||
scrollFrame.orient = 'vertical';
|
||||
if (newTabBox)
|
||||
newTabBox.orient = 'horizontal';
|
||||
if (tabBarMode == 2)
|
||||
this.setPref('extensions.tabmix.tabBarMode', 1);
|
||||
@ -1105,6 +1109,7 @@ TreeStyleTabBrowser.prototype = {
|
||||
d.getAnonymousNodes(scrollFrame)[0].setAttribute('flex', 1);
|
||||
scrollFrame.parentNode.orient =
|
||||
scrollFrame.orient = 'horizontal';
|
||||
if (newTabBox)
|
||||
newTabBox.orient = 'vertical';
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user