From 108ee961cd1d9edff3e4661cc31f25f869657b13 Mon Sep 17 00:00:00 2001 From: piro Date: Wed, 7 Nov 2007 03:47:24 +0000 Subject: [PATCH] =?UTF-8?q?=E3=83=BB=E3=82=BF=E3=83=96=E3=81=AE=E3=82=A2?= =?UTF-8?q?=E3=82=A4=E3=82=B3=E3=83=B3=E3=81=AE=E8=A1=A8=E7=A4=BA=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE=E3=81=8C=E3=81=8A=E3=81=8B=E3=81=97=E3=81=8F=E3=81=AA?= =?UTF-8?q?=E3=82=8B=E5=95=8F=E9=A1=8C=E3=82=92=E4=BF=AE=E6=AD=A3=20?= =?UTF-8?q?=E3=83=BB=E3=82=BF=E3=83=96=E3=83=90=E3=83=BC=E3=81=AE=E8=A1=A8?= =?UTF-8?q?=E7=A4=BA=E4=BD=8D=E7=BD=AE=E3=81=AE=E5=8B=95=E7=9A=84=E3=81=AA?= =?UTF-8?q?=E5=A4=89=E6=9B=B4=E3=81=8C=E3=81=A7=E3=81=8D=E3=81=AA=E3=81=8F?= =?UTF-8?q?=E3=81=AA=E3=81=A3=E3=81=A6=E3=81=84=E3=81=9F=E3=81=AE=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= 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@1519 599a83e7-65a4-db11-8015-0010dcdd6dc2 --- content/treestyletab/treestyletab.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/content/treestyletab/treestyletab.js b/content/treestyletab/treestyletab.js index f600f799..30050408 100644 --- a/content/treestyletab/treestyletab.js +++ b/content/treestyletab/treestyletab.js @@ -827,7 +827,7 @@ catch(e) { } var nodes = document.getAnonymousNodes(aTab); - for (var i = 0, maxi = nodes.length; i < maxi; i++) + for (var i = nodes.length-1; i > -1; i--) { nodes[i].setAttribute('ordinal', (i + 1) * 10); } @@ -835,7 +835,7 @@ catch(e) { nodes = label.parentNode.childNodes; if (this.getTreePref('tabbar.position') == 'right' && this.getTreePref('tabbar.invertUI')) { - for (var i = 0, maxi = nodes.length; i < maxi; i++) + for (var i = nodes.length-1; i > -1; i--) { if (nodes[i].getAttribute('class') == 'informationaltab-thumbnail-container') continue; @@ -845,7 +845,7 @@ catch(e) { close.setAttribute('ordinal', parseInt(label.parentNode.getAttribute('ordinal')) - 5); } else { - for (var i = 0, maxi = nodes.length; i < maxi; i++) + for (var i = nodes.length-1; i > -1; i--) { if (nodes[i].getAttribute('class') == 'informationaltab-thumbnail-container') continue; @@ -2837,7 +2837,8 @@ TreeStyleTabBrowserObserver.prototype = { case 'nsPref:changed': var value = TreeStyleTabService.getPref(aData); - var tabs = Array.prototype.slice.call(this.mTabBrowser.mTabContainer.childNodes); + var tabContainer = this.mTabBrowser.mTabContainer; + var tabs = Array.prototype.slice.call(tabContainer.childNodes); switch (aData) { case 'extensions.treestyletab.tabbar.position': @@ -2845,10 +2846,10 @@ TreeStyleTabBrowserObserver.prototype = { tabs.forEach(function(aTab) { aTab.removeAttribute('align'); aTab.setAttribute('maxwidth', 250); - aTab.setAttribute('minwidth', container.mTabMinWidth); + aTab.setAttribute('minwidth', tabContainer.mTabMinWidth); aTab.setAttribute('width', '0'); aTab.maxWidth = 250; - aTab.minWidth = container.mTabMinWidth; + aTab.minWidth = tabContainer.mTabMinWidth; }); } case 'extensions.treestyletab.tabbar.invertUI':