| Index: Source/core/animation/css/CSSAnimatableValueFactory.cpp
|
| diff --git a/Source/core/animation/css/CSSAnimatableValueFactory.cpp b/Source/core/animation/css/CSSAnimatableValueFactory.cpp
|
| index 6b65d75596fd583ee1625d928e8c36fafdce9eae..d41812046354c8a5fa76b3d085749ed4e620d3d0 100644
|
| --- a/Source/core/animation/css/CSSAnimatableValueFactory.cpp
|
| +++ b/Source/core/animation/css/CSSAnimatableValueFactory.cpp
|
| @@ -34,10 +34,11 @@
|
| #include "CSSValueKeywords.h"
|
| #include "core/animation/AnimatableClipPathOperation.h"
|
| #include "core/animation/AnimatableColor.h"
|
| +#include "core/animation/AnimatableDouble.h"
|
| #include "core/animation/AnimatableImage.h"
|
| +#include "core/animation/AnimatableLength.h"
|
| #include "core/animation/AnimatableLengthBox.h"
|
| #include "core/animation/AnimatableLengthSize.h"
|
| -#include "core/animation/AnimatableNumber.h"
|
| #include "core/animation/AnimatableShapeValue.h"
|
| #include "core/animation/AnimatableTransform.h"
|
| #include "core/animation/AnimatableUnknown.h"
|
| @@ -54,20 +55,18 @@ namespace WebCore {
|
| static PassRefPtr<AnimatableValue> createFromLength(const Length& length, const RenderStyle* style)
|
| {
|
| switch (length.type()) {
|
| - case Relative:
|
| - return AnimatableNumber::create(length.value(), AnimatableNumber::UnitTypeNumber);
|
| case Fixed:
|
| - return AnimatableNumber::create(adjustFloatForAbsoluteZoom(length.value(), style), AnimatableNumber::UnitTypeLength);
|
| + return AnimatableLength::create(adjustFloatForAbsoluteZoom(length.value(), style), AnimatableLength::UnitTypePixels);
|
| case Percent:
|
| - return AnimatableNumber::create(length.value(), AnimatableNumber::UnitTypePercentage);
|
| + return AnimatableLength::create(length.value(), AnimatableLength::UnitTypePercentage);
|
| case ViewportPercentageWidth:
|
| - return AnimatableNumber::create(length.value(), AnimatableNumber::UnitTypeViewportWidth);
|
| + return AnimatableLength::create(length.value(), AnimatableLength::UnitTypeViewportWidth);
|
| case ViewportPercentageHeight:
|
| - return AnimatableNumber::create(length.value(), AnimatableNumber::UnitTypeViewportHeight);
|
| + return AnimatableLength::create(length.value(), AnimatableLength::UnitTypeViewportHeight);
|
| case ViewportPercentageMin:
|
| - return AnimatableNumber::create(length.value(), AnimatableNumber::UnitTypeViewportMin);
|
| + return AnimatableLength::create(length.value(), AnimatableLength::UnitTypeViewportMin);
|
| case ViewportPercentageMax:
|
| - return AnimatableNumber::create(length.value(), AnimatableNumber::UnitTypeViewportMax);
|
| + return AnimatableLength::create(length.value(), AnimatableLength::UnitTypeViewportMax);
|
| case Calculated:
|
| // FIXME: Convert platform calcs to CSS calcs.
|
| ASSERT_WITH_MESSAGE(false, "Web Animations not yet implemented: Convert platform CalculationValue to AnimatableValue");
|
| @@ -83,6 +82,7 @@ static PassRefPtr<AnimatableValue> createFromLength(const Length& length, const
|
| case Undefined:
|
| return AnimatableUnknown::create(CSSPrimitiveValue::create(CSSValueNone));
|
| case ExtendToZoom: // Does not apply to elements.
|
| + case Relative: // Does not get used by interpolable properties.
|
| ASSERT_NOT_REACHED();
|
| return 0;
|
| }
|
| @@ -92,7 +92,7 @@ static PassRefPtr<AnimatableValue> createFromLength(const Length& length, const
|
|
|
| inline static PassRefPtr<AnimatableValue> createFromDouble(double value)
|
| {
|
| - return AnimatableNumber::create(value, AnimatableNumber::UnitTypeNumber);
|
| + return AnimatableDouble::create(value);
|
| }
|
|
|
| inline static PassRefPtr<AnimatableValue> createFromLengthBox(const LengthBox lengthBox, const RenderStyle* style)
|
|
|