| Index: Source/core/animation/css/CSSAnimatableValueFactory.cpp
|
| diff --git a/Source/core/animation/css/CSSAnimatableValueFactory.cpp b/Source/core/animation/css/CSSAnimatableValueFactory.cpp
|
| index 61306fa81bb36e144f1f3ee08f890762f7ec6557..d4c5138c352022a27f1145facedb2c8885eb3604 100644
|
| --- a/Source/core/animation/css/CSSAnimatableValueFactory.cpp
|
| +++ b/Source/core/animation/css/CSSAnimatableValueFactory.cpp
|
| @@ -33,10 +33,11 @@
|
|
|
| #include "CSSValueKeywords.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/AnimatableTransform.h"
|
| #include "core/animation/AnimatableUnknown.h"
|
| #include "core/animation/AnimatableVisibility.h"
|
| @@ -52,20 +53,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::UnitTypeLength);
|
| 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");
|
| @@ -81,6 +80,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;
|
| }
|
| @@ -90,7 +90,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)
|
|
|