From 9f65adf634b5adb0313568bd1b4bbb9562deeeb4 Mon Sep 17 00:00:00 2001 From: piro Date: Wed, 7 Apr 2010 01:29:16 +0000 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E7=BD=AE=E3=81=8D=E3=83=BB=E3=82=B5?= =?UTF-8?q?=E3=82=A4=E3=82=BA=E5=9B=BA=E5=AE=9A=E3=81=AE=E3=82=BF=E3=83=96?= =?UTF-8?q?=E3=83=90=E3=83=BC=E3=81=AB=E5=AF=BE=E3=81=97=E3=81=A6=E3=81=AF?= =?UTF-8?q?=E3=80=81toolbox=E3=81=AB=E9=AB=98=E3=81=95=E3=82=92=E8=A8=AD?= =?UTF-8?q?=E5=AE=9A=E3=81=97=E3=81=AA=E3=81=84=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@6576 599a83e7-65a4-db11-8015-0010dcdd6dc2 --- content/treestyletab/treestyletabbrowser.js | 37 ++++++++++++--------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/content/treestyletab/treestyletabbrowser.js b/content/treestyletab/treestyletabbrowser.js index 784e01a2..c52650f2 100644 --- a/content/treestyletab/treestyletabbrowser.js +++ b/content/treestyletab/treestyletabbrowser.js @@ -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); + } } },