don't let preferences dialog get progressively shorter when rapidly switching between panes on Mac OS X with animation. patch by Asaf Romano. b=283713 r=joshmoz sr=mconnor

This commit is contained in:
joshmoz%gmail.com 2005-03-28 20:50:23 +00:00
parent bbd584b694
commit 34a19db7c3

View File

@ -649,12 +649,14 @@
<parameter name="aNewPane"/>
<body>
<![CDATA[
this._multiplier = aNewPane.contentHeight > aOldPane.contentHeight ? 1 : -1;
var sizeDelta = Math.abs(aOldPane.contentHeight - aNewPane.contentHeight);
// if we are already resizing, use currentHeight
var oldHeight = this._currentHeight ? this._currentHeight : aOldPane.contentHeight;
this._multiplier = aNewPane.contentHeight > oldHeight ? 1 : -1;
var sizeDelta = Math.abs(oldHeight - aNewPane.contentHeight);
this._animateRemainder = sizeDelta % this._animateIncrement;
this._setUpAnimationTimer(aOldPane.contentHeight);
this._setUpAnimationTimer(oldHeight);
]]>
</body>
</method>