remove hack for old Minefield

This commit is contained in:
Piro / SHIMODA Hiroshi 2010-11-02 02:15:29 +09:00
parent 877e57352a
commit 5c07b12c08

View File

@ -1303,11 +1303,9 @@ TreeStyleTabBrowser.prototype = {
var strip = this.tabStrip; var strip = this.tabStrip;
var tabContainerBox = this.getTabContainerBox(this.mTabBrowser); var tabContainerBox = this.getTabContainerBox(this.mTabBrowser);
var positioned = false;
var pos = this.currentTabbarPosition; var pos = this.currentTabbarPosition;
if (pos != 'top' || if (pos != 'top' ||
this.mTabBrowser.getAttribute(this.kFIXED) != 'true') { this.mTabBrowser.getAttribute(this.kFIXED) != 'true') {
positioned = true;
let box = this._tabStripPlaceHolder.boxObject; let box = this._tabStripPlaceHolder.boxObject;
let root = document.documentElement.boxObject; let root = document.documentElement.boxObject;
@ -1352,36 +1350,6 @@ TreeStyleTabBrowser.prototype = {
this.mTabBrowser.tabContainer.removeAttribute('context'); this.mTabBrowser.tabContainer.removeAttribute('context');
} }
if (this.mTabBrowser != gBrowser)
return;
var toolbox = strip.parentNode;
if (toolbox.localName != 'toolbox')
return;
if (!positioned) {
toolbox.removeAttribute('height');
}
else {
// hack to reset the height of the toolbox
let height = 0;
Array.slice(toolbox.childNodes).forEach(function(aNode) {
if (aNode.nodeType == Node.ELEMENT_NODE && aNode != strip)
height += aNode.boxObject.height;
});
height += parseInt(window.getComputedStyle(toolbox, '').getPropertyValue('margin-top').replace('px', ''));
if (height != toolbox.boxObject.height) {
// this.stopRendering();
// "height" attribute of the toolbar prevents rendering of the toolbox with its correct height.
strip.removeAttribute('height');
toolbox.setAttribute('height', height);
// window.setTimeout(function(aSelf) {
// toolbox.removeAttribute('height');
// aSelf.startRendering();
// }, 0, this);
}
}
if ('_positionPinnedTabs' in this.mTabBrowser.mTabContainer) if ('_positionPinnedTabs' in this.mTabBrowser.mTabContainer)
this.mTabBrowser.mTabContainer._positionPinnedTabs(); this.mTabBrowser.mTabContainer._positionPinnedTabs();
}, },