上置き・サイズ固定のタブバーに対しては、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') if (toolbox.localName != 'toolbox')
return; return;
// hack to reset the height of the toolbox if (!positioned) {
var height = 0; toolbox.removeAttribute('height', height);
Array.slice(toolbox.childNodes).forEach(function(aNode) { }
if (aNode.nodeType == Node.ELEMENT_NODE && (aNode != strip || !positioned)) else {
height += aNode.boxObject.height; // hack to reset the height of the toolbox
}); var height = 0;
height += parseInt(window.getComputedStyle(toolbox, '').getPropertyValue('margin-top').replace('px', '')); Array.slice(toolbox.childNodes).forEach(function(aNode) {
if (height != toolbox.boxObject.height) { if (aNode.nodeType == Node.ELEMENT_NODE && aNode != strip)
// this.stopRendering(); height += aNode.boxObject.height;
// "height" attribute of the toolbar prevents rendering of the toolbox with its correct height. });
strip.removeAttribute('height'); height += parseInt(window.getComputedStyle(toolbox, '').getPropertyValue('margin-top').replace('px', ''));
toolbox.setAttribute('height', height); if (height != toolbox.boxObject.height) {
// window.setTimeout(function(aSelf) { // this.stopRendering();
// toolbox.removeAttribute('height'); // "height" attribute of the toolbar prevents rendering of the toolbox with its correct height.
// aSelf.startRendering(); strip.removeAttribute('height');
// }, 0, this); toolbox.setAttribute('height', height);
// window.setTimeout(function(aSelf) {
// toolbox.removeAttribute('height');
// aSelf.startRendering();
// }, 0, this);
}
} }
}, },