| Index: Source/core/css/resolver/AnimatedStyleBuilder.cpp
|
| diff --git a/Source/core/css/resolver/AnimatedStyleBuilder.cpp b/Source/core/css/resolver/AnimatedStyleBuilder.cpp
|
| index 6414b3d6c4c4086262a30cd152328f4dc6152aed..5bbe59d34f5bfbe338fd40154b5895cd0de01620 100644
|
| --- a/Source/core/css/resolver/AnimatedStyleBuilder.cpp
|
| +++ b/Source/core/css/resolver/AnimatedStyleBuilder.cpp
|
| @@ -32,10 +32,11 @@
|
| #include "core/css/resolver/AnimatedStyleBuilder.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/AnimatableValue.h"
|
| @@ -55,8 +56,8 @@ namespace {
|
| Length animatableValueToLength(const AnimatableValue* value, const StyleResolverState& state, NumberRange range = AllValues)
|
| {
|
| const RenderStyle* style = state.style();
|
| - if (value->isNumber())
|
| - return toAnimatableNumber(value)->toLength(style, state.rootElementStyle(), style->effectiveZoom(), range);
|
| + if (value->isLength())
|
| + return toAnimatableLength(value)->toLength(style, state.rootElementStyle(), style->effectiveZoom(), range);
|
| RefPtr<CSSValue> cssValue = toAnimatableUnknown(value)->toCSSValue();
|
| CSSPrimitiveValue* cssPrimitiveValue = toCSSPrimitiveValue(cssValue.get());
|
| return cssPrimitiveValue->convertToLength<AnyConversion>(style, state.rootElementStyle(), style->effectiveZoom());
|
| @@ -65,7 +66,7 @@ Length animatableValueToLength(const AnimatableValue* value, const StyleResolver
|
| template<typename T> T animatableValueRoundClampTo(const AnimatableValue* value)
|
| {
|
| COMPILE_ASSERT(WTF::IsInteger<T>::value, ShouldUseIntegralTypeTWhenRoundingValues);
|
| - return clampTo<T>(round(toAnimatableNumber(value)->toDouble()));
|
| + return clampTo<T>(round(toAnimatableDouble(value)->toDouble()));
|
| }
|
|
|
| LengthBox animatableValueToLengthBox(const AnimatableValue* value, const StyleResolverState& state)
|
| @@ -197,7 +198,7 @@ void AnimatedStyleBuilder::applyProperty(CSSPropertyID property, StyleResolverSt
|
| style->setMinWidth(animatableValueToLength(value, state));
|
| return;
|
| case CSSPropertyOpacity:
|
| - style->setOpacity(toAnimatableNumber(value)->toDouble());
|
| + style->setOpacity(toAnimatableDouble(value)->toDouble());
|
| return;
|
| case CSSPropertyOutlineColor:
|
| style->setOutlineColor(toAnimatableColor(value)->color());
|
| @@ -281,13 +282,13 @@ void AnimatedStyleBuilder::applyProperty(CSSPropertyID property, StyleResolverSt
|
| style->setTransformOriginY(animatableValueToLength(value, state));
|
| return;
|
| case CSSPropertyWebkitTransformOriginZ:
|
| - style->setTransformOriginZ(toAnimatableNumber(value)->toDouble());
|
| + style->setTransformOriginZ(toAnimatableDouble(value)->toDouble());
|
| return;
|
| case CSSPropertyWidth:
|
| style->setWidth(animatableValueToLength(value, state));
|
| return;
|
| case CSSPropertyWordSpacing:
|
| - style->setWordSpacing(clampTo<float>(toAnimatableNumber(value)->toDouble()));
|
| + style->setWordSpacing(clampTo<float>(toAnimatableDouble(value)->toDouble()));
|
| return;
|
| case CSSPropertyVisibility:
|
| style->setVisibility(toAnimatableVisibility(value)->visibility());
|
|
|