Firefox can remove "overflow" property wrongly, by horizontal overflow/underflow on a vertical tab bar.
This commit is contained in:
parent
17c7280d05
commit
c604a72eec
@ -1264,6 +1264,13 @@ TreeStyleTabBrowser.prototype = {
|
||||
this.updateTabCollapsed(aTab, aTab.getAttribute(this.kCOLLAPSED) == 'true', true);
|
||||
}, this);
|
||||
|
||||
// for updateTabbarOverflow(), we should reset the "overflow" now.
|
||||
b.mTabContainer.removeAttribute('overflow');
|
||||
let (container = this.document.getAnonymousElementByAttribute(b.mTabContainer, 'class', 'tabs-container')) {
|
||||
if (container)
|
||||
container.removeAttribute('overflow');
|
||||
}
|
||||
|
||||
this.updateTabbarState(false);
|
||||
|
||||
var self = this;
|
||||
@ -1717,19 +1724,12 @@ TreeStyleTabBrowser.prototype = {
|
||||
var d = this.document;
|
||||
var b = this.mTabBrowser;
|
||||
b.mTabContainer.removeAttribute('overflow');
|
||||
var container = d.getAnonymousElementByAttribute(b.mTabContainer, 'class', 'tabs-container');
|
||||
|
||||
if (!container) {
|
||||
if (this.ownerToolbar)
|
||||
container = b.mTabContainer;
|
||||
else
|
||||
return;
|
||||
}
|
||||
var container = d.getAnonymousElementByAttribute(b.mTabContainer, 'class', 'tabs-container') || b.mTabContainer;
|
||||
|
||||
if (container != b.mTabContainer)
|
||||
container.removeAttribute('overflow');
|
||||
|
||||
var scrollBox = this.scrollBox;
|
||||
this.window.setTimeout(function() {
|
||||
scrollBox = d.getAnonymousElementByAttribute(scrollBox, 'anonid', 'scrollbox');
|
||||
if (scrollBox) scrollBox = d.getAnonymousNodes(scrollBox)[0];
|
||||
if (
|
||||
@ -1740,13 +1740,14 @@ TreeStyleTabBrowser.prototype = {
|
||||
)
|
||||
) {
|
||||
b.mTabContainer.setAttribute('overflow', true);
|
||||
if (container != b.mTabContainer)
|
||||
container.setAttribute('overflow', true);
|
||||
}
|
||||
else {
|
||||
b.mTabContainer.removeAttribute('overflow');
|
||||
if (container != b.mTabContainer)
|
||||
container.removeAttribute('overflow');
|
||||
}
|
||||
}, 100);
|
||||
},
|
||||
|
||||
reinitAllTabs : function TSTBrowser_reinitAllTabs(aSouldUpdateCount)
|
||||
@ -4068,7 +4069,15 @@ TreeStyleTabBrowser.prototype = {
|
||||
if (horizontal) return;
|
||||
aEvent.stopPropagation();
|
||||
this.positionPinnedTabsWithDelay();
|
||||
if (aEvent.detail == 1) return;
|
||||
if (aEvent.detail == 1) {
|
||||
/**
|
||||
* By horizontal overflow/underflow, Firefox can wrongly
|
||||
* removes "overflow" attribute for vertical tab bar.
|
||||
* We have to override the result.
|
||||
*/
|
||||
this.updateTabbarOverflow();
|
||||
}
|
||||
else {
|
||||
if (aEvent.type == 'overflow') {
|
||||
tabs.setAttribute('overflow', 'true');
|
||||
this.scrollBoxObject.ensureElementIsVisible(tabs.selectedItem);
|
||||
@ -4076,6 +4085,7 @@ TreeStyleTabBrowser.prototype = {
|
||||
else {
|
||||
tabs.removeAttribute('overflow');
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
onResize : function TSTBrowser_onResize(aEvent)
|
||||
|
Loading…
Reference in New Issue
Block a user