From aa976f57bd5fb3cf409f033bb175a4c6e4dd8c26 Mon Sep 17 00:00:00 2001 From: piro Date: Sun, 8 Aug 2010 12:46:33 +0000 Subject: [PATCH] =?UTF-8?q?Minefield=204.0b4pre=E3=81=A7=E6=96=B0=E8=A6=8F?= =?UTF-8?q?=E3=82=BF=E3=83=96=E3=81=AE=E3=82=A4=E3=83=B3=E3=83=87=E3=83=B3?= =?UTF-8?q?=E3=83=88=E3=81=AE=E5=A2=97=E6=B8=9B=E3=81=8C=E3=82=A2=E3=83=8B?= =?UTF-8?q?=E3=83=A1=E3=83=BC=E3=82=B7=E3=83=A7=E3=83=B3=E3=81=95=E3=82=8C?= =?UTF-8?q?=E3=81=A6=E3=81=84=E3=81=AA=E3=81=8B=E3=81=A3=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@7066 599a83e7-65a4-db11-8015-0010dcdd6dc2 --- content/treestyletab/treestyletabbrowser.js | 23 ++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/content/treestyletab/treestyletabbrowser.js b/content/treestyletab/treestyletabbrowser.js index d0b37548..632cf6b2 100644 --- a/content/treestyletab/treestyletabbrowser.js +++ b/content/treestyletab/treestyletabbrowser.js @@ -4031,25 +4031,42 @@ TreeStyleTabBrowser.prototype = { var regexp = this.indentRulesRegExp; var property = this.indentProp+'-'+aTarget; - var CSSTransitionEnabled = ('Transition' in aTab.style || 'MozTransition' in aTab.style); if ( !this.animationEnabled || aJustNow || this.indentDuration < 1 || !aTarget || - CSSTransitionEnabled || this.isCollapsed(aTab) ) { aTab.setAttribute( 'style', aTab.getAttribute('style') .replace(regexp, '')+';'+ - (aTarget || CSSTransitionEnabled ? property+':'+aIndent+'px !important;' : '' ) + (aTarget ? property+':'+aIndent+'px !important;' : '' ) ); return; } var startIndent = this.getPropertyPixelValue(aTab, property); + + var CSSTransitionEnabled = ('Transition' in aTab.style || 'MozTransition' in aTab.style); + if (CSSTransitionEnabled) { + aTab.__treestyletab__updateTabIndentTask = function(aTime, aBeginning, aChange, aDuration) { + aTab.setAttribute( + 'style', + aTab.getAttribute('style') + .replace(regexp, '')+';'+ + property+':'+aIndent+'px !important;' + ); + return true; + }; + this.animationManager.addTask( + aTab.__treestyletab__updateTabIndentTask, + 0, 0, 1 + ); + return; + } + var delta = aIndent - startIndent; var radian = 90 * Math.PI / 180; var self = this;