From 286a5837521670136e99ea051347ea41b2c9e329 Mon Sep 17 00:00:00 2001 From: piro Date: Wed, 8 Jul 2009 01:41:37 +0000 Subject: [PATCH] =?UTF-8?q?=E3=82=BF=E3=82=A4=E3=83=9E=E3=83=BC=E3=82=92?= =?UTF-8?q?=E4=B8=80=E7=AE=87=E6=89=80=E3=81=AB=E3=81=BE=E3=81=A8=E3=82=81?= =?UTF-8?q?=E3=81=9F?= 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@4672 599a83e7-65a4-db11-8015-0010dcdd6dc2 --- content/treestyletab/treestyletabbrowser.js | 26 ++++++++++++--------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/content/treestyletab/treestyletabbrowser.js b/content/treestyletab/treestyletabbrowser.js index b84cb298..ce82a8a5 100644 --- a/content/treestyletab/treestyletabbrowser.js +++ b/content/treestyletab/treestyletabbrowser.js @@ -800,6 +800,8 @@ TreeStyleTabBrowser.prototype = { b.mStrip.removeAttribute('width'); b.mPanelContainer.removeAttribute('width'); + var delayedPostProcess; + if (pos & this.kTABBAR_VERTICAL) { this.collapseProp = 'margin-top'; @@ -852,31 +854,31 @@ TreeStyleTabBrowser.prototype = { b.removeAttribute(this.kTAB_INVERTED); this.indentProp = this.getTreePref('indent.property.left'); } - window.setTimeout(function(aWidth, aTabBrowser, aSplitter, aToggler) { + delayedPostProcess = function(aSelf, aTabBrowser, aSplitter, aToggler) { /* in Firefox 3, the width of the rightside tab bar unexpectedly becomes 0 on the startup. so, we have to set the width again. */ - aTabBrowser.mStrip.setAttribute('width', aWidth); + aTabBrowser.mStrip.setAttribute('width', aSelf.getTreePref('tabbar.width')); aTabBrowser.mTabDropIndicatorBar.setAttribute('ordinal', 1); aTabBrowser.mStrip.setAttribute('ordinal', 30); aSplitter.setAttribute('ordinal', 20); aToggler.setAttribute('ordinal', 40); aTabBrowser.mPanelContainer.setAttribute('ordinal', 10); aSplitter.setAttribute('collapse', 'after'); - }, 0, this.getTreePref('tabbar.width'), b, splitter, toggler); + }; } else { b.setAttribute(this.kTABBAR_POSITION, 'left'); b.removeAttribute(this.kTAB_INVERTED); this.indentProp = this.getTreePref('indent.property.left'); - window.setTimeout(function(aTabBrowser, aSplitter, aToggler) { + delayedPostProcess = function(aSelf, aTabBrowser, aSplitter, aToggler) { aTabBrowser.mTabDropIndicatorBar.setAttribute('ordinal', 1); aTabBrowser.mStrip.setAttribute('ordinal', 10); aSplitter.setAttribute('ordinal', 20); aToggler.setAttribute('ordinal', 5); aTabBrowser.mPanelContainer.setAttribute('ordinal', 30); aSplitter.setAttribute('collapse', 'before'); - }, 0, b, splitter, toggler); + }; } } else { @@ -918,24 +920,24 @@ TreeStyleTabBrowser.prototype = { if (pos == this.kTABBAR_BOTTOM) { b.setAttribute(this.kTABBAR_POSITION, 'bottom'); this.indentProp = this.getTreePref('indent.property.bottom'); - window.setTimeout(function(aTabBrowser, aSplitter, aToggler) { + delayedPostProcess = function(aSelf, aTabBrowser, aSplitter, aToggler) { aTabBrowser.mTabDropIndicatorBar.setAttribute('ordinal', 1); aTabBrowser.mStrip.setAttribute('ordinal', 30); aToggler.setAttribute('ordinal', 20); toggler.setAttribute('ordinal', 40); aTabBrowser.mPanelContainer.setAttribute('ordinal', 10); - }, 0, b, splitter, toggler); + }; } else { b.setAttribute(this.kTABBAR_POSITION, 'top'); this.indentProp = this.getTreePref('indent.property.top'); - window.setTimeout(function(aTabBrowser, aSplitter, aToggler) { + delayedPostProcess = function(aSelf, aTabBrowser, aSplitter, aToggler) { aTabBrowser.mTabDropIndicatorBar.setAttribute('ordinal', 1); aTabBrowser.mStrip.setAttribute('ordinal', 10); aSplitter.setAttribute('ordinal', 20); aToggler.setAttribute('ordinal', 5); aTabBrowser.mPanelContainer.setAttribute('ordinal', 30); - }, 0, b, splitter, toggler); + }; } } @@ -943,9 +945,11 @@ TreeStyleTabBrowser.prototype = { this.updateTabCollapsed(aTab, aTab.getAttribute(this.kCOLLAPSED) == 'true', true); }, this); - window.setTimeout(function(aSelf) { + window.setTimeout(function(aSelf, aTabBrowser, aSplitter, aToggler) { + delayedPostProcess(aSelf, aTabBrowser, aSplitter, aToggler); aSelf.updateTabbarState(); - }, 0, this); + delayedPostProcess = null; + }, 0, this, b, splitter, toggler); b = null; pos = null;