上置き・サイズ固定のタブバーに対しては、toolboxに高さを設定しないように

git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@6576 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
piro 2010-04-07 01:29:16 +00:00
parent 64ac5176e5
commit 9f65adf634

View File

@ -1206,22 +1206,27 @@ TreeStyleTabBrowser.prototype = {
if (toolbox.localName != 'toolbox')
return;
// hack to reset the height of the toolbox
var height = 0;
Array.slice(toolbox.childNodes).forEach(function(aNode) {
if (aNode.nodeType == Node.ELEMENT_NODE && (aNode != strip || !positioned))
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 (!positioned) {
toolbox.removeAttribute('height', height);
}
else {
// hack to reset the height of the toolbox
var 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);
}
}
},