Bug 847480 - Convert DeprecatedAbs uses in animation code. r=dbaron
authorJeff Walden <jwalden@mit.edu>
Sat, 09 Mar 2013 14:20:04 -0800
changeset 124954 7d6d8029f70f955a6c7e0d2a3745d6987525e4a5
parent 124953 963e62fb0ab4fb15b0738bda57641c625fd9213c
child 124955 ba0b144c146f277bb9d8782bbfddb95e1c36a1a8
push id24696
push userjwalden@mit.edu
push dateFri, 15 Mar 2013 17:45:29 +0000
treeherdermozilla-inbound@ba0b144c146f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs847480
milestone22.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 847480 - Convert DeprecatedAbs uses in animation code. r=dbaron
layout/style/nsStyleAnimation.cpp
--- a/layout/style/nsStyleAnimation.cpp
+++ b/layout/style/nsStyleAnimation.cpp
@@ -376,17 +376,17 @@ nsStyleAnimation::ComputeDistance(nsCSSP
       return false;
 
     case eUnit_Enumerated:
       switch (aProperty) {
         case eCSSProperty_font_stretch: {
           // just like eUnit_Integer.
           int32_t startInt = aStartValue.GetIntValue();
           int32_t endInt = aEndValue.GetIntValue();
-          aDistance = DeprecatedAbs(endInt - startInt);
+          aDistance = Abs(endInt - startInt);
           return true;
         }
         default:
           return false;
       }
    case eUnit_Visibility: {
       int32_t startEnum = aStartValue.GetIntValue();
       int32_t endEnum = aEndValue.GetIntValue();
@@ -399,17 +399,17 @@ nsStyleAnimation::ComputeDistance(nsCSSP
         return false;
       }
       aDistance = 1;
       return true;
     }
     case eUnit_Integer: {
       int32_t startInt = aStartValue.GetIntValue();
       int32_t endInt = aEndValue.GetIntValue();
-      aDistance = DeprecatedAbs(endInt - startInt);
+      aDistance = Abs(double(endInt) - double(startInt));
       return true;
     }
     case eUnit_Coord: {
       nscoord startCoord = aStartValue.GetCoordValue();
       nscoord endCoord = aEndValue.GetCoordValue();
       aDistance = Abs(double(endCoord) - double(startCoord));
       return true;
     }