From 1be5fe77e6bea4d192b2e00206b7e3cc88abadac Mon Sep 17 00:00:00 2001 From: piro Date: Thu, 9 Sep 2010 09:37:12 +0000 Subject: [PATCH] =?UTF-8?q?pinned=E5=B1=9E=E6=80=A7=E3=81=8C=E3=81=82?= =?UTF-8?q?=E3=82=8C=E3=81=B0=E3=80=81=E5=80=A4=E3=81=AB=E9=96=A2=E4=BF=82?= =?UTF-8?q?=E7=84=A1=E3=81=97=E3=81=ABpinned=3D=3Dtrue=E3=81=A8=E8=A6=8B?= =?UTF-8?q?=E3=81=AA=E3=81=99?= 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@7163 599a83e7-65a4-db11-8015-0010dcdd6dc2 --- content/treestyletab/treestyletabbrowser.js | 12 +++++++----- modules/utils.js | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/content/treestyletab/treestyletabbrowser.js b/content/treestyletab/treestyletabbrowser.js index 6565787c..6f1bb594 100644 --- a/content/treestyletab/treestyletabbrowser.js +++ b/content/treestyletab/treestyletabbrowser.js @@ -128,7 +128,7 @@ TreeStyleTabBrowser.prototype = { isTabInViewport : function TSTBrowser_isTabInViewport(aTab) { if (!aTab) return false; - if (aTab.getAttribute('pinned') == 'true') + if (aTab.hasAttribute('pinned')) return true; var tabBox = aTab.boxObject; var barBox = this.scrollBox.boxObject; @@ -164,6 +164,8 @@ TreeStyleTabBrowser.prototype = { style.MozMarginStart = ''; style.setProperty('margin-left', (width * col)+'px', 'important'); style.setProperty('margin-top', (- height * (maxRow - row))+'px', 'important'); + style.top = ''; + style.left = ''; col++; if (col >= maxCol) { col = 0; @@ -3312,8 +3314,8 @@ TreeStyleTabBrowser.prototype = { info.target = tab; } - var positionProp = this.isVertical && tab.getAttribute('pinned') == 'true' ? this.invertedPositionProp : this.positionProp ; - var sizeProp = this.isVertical && tab.getAttribute('pinned') == 'true' ? this.invertedSizeProp : this.sizeProp ; + var positionProp = this.isVertical && tab.hasAttribute('pinned') ? this.invertedPositionProp : this.positionProp ; + var sizeProp = this.isVertical && tab.hasAttribute('pinned') ? this.invertedSizeProp : this.sizeProp ; var boxPos = tab.boxObject[positionProp]; var boxUnit = Math.round(tab.boxObject[sizeProp] / 3); if (aEvent[positionProp] < boxPos + boxUnit) { @@ -3743,8 +3745,8 @@ TreeStyleTabBrowser.prototype = { !aParent || aChild == aParent || (currentParent = this.getParentTab(aChild)) == aParent || - aChild.getAttribute('pinned') == 'true' || - aParent.getAttribute('pinned') == 'true' + aChild.hasAttribute('pinned') || + aParent.hasAttribute('pinned') ) { this.fireAttachedEvent(aChild, aParent); return; diff --git a/modules/utils.js b/modules/utils.js index 30a412e0..e1061632 100644 --- a/modules/utils.js +++ b/modules/utils.js @@ -1142,7 +1142,7 @@ var TreeStyleTabUtils = { var ownerBrowser = this.getTabBrowserFromFrame(frame); var parentTab = this.getTabFromFrame(frame, ownerBrowser); - if (parentTab.getAttribute('pinned') == 'true') + if (parentTab.hasAttribute('pinned')) return; ownerBrowser.treeStyleTab.ensureTabInitialized(parentTab);