Index: Source/core/css/resolver/AnimatedStyleBuilder.cpp |
diff --git a/Source/core/css/resolver/AnimatedStyleBuilder.cpp b/Source/core/css/resolver/AnimatedStyleBuilder.cpp |
index aa6f88295b5eafbb4665ebe02a2ca30e13ea04e8..c87dac309e9df75198dc35fe09a4114b54311af6 100644 |
--- a/Source/core/css/resolver/AnimatedStyleBuilder.cpp |
+++ b/Source/core/css/resolver/AnimatedStyleBuilder.cpp |
@@ -118,6 +118,16 @@ LengthPoint animatableValueToLengthPoint(const AnimatableValue* value, const Sty |
animatableValueToLength(animatableLengthPoint->y(), state, range)); |
} |
+TransformOrigin animatableValueToTransformOrigin(const AnimatableValue* value, const StyleResolverState& state, ValueRange range = ValueRangeAll) |
+{ |
+ const AnimatableLengthPoint3D* animatableLengthPoint3D = toAnimatableLengthPoint3D(value); |
+ return TransformOrigin( |
+ animatableValueToLength(animatableLengthPoint3D->x(), state), |
+ animatableValueToLength(animatableLengthPoint3D->y(), state), |
+ clampTo<float>(toAnimatableDouble(animatableLengthPoint3D->z())->toDouble()) |
+ ); |
+} |
+ |
LengthSize animatableValueToLengthSize(const AnimatableValue* value, const StyleResolverState& state, ValueRange range) |
{ |
const AnimatableLengthSize* animatableLengthSize = toAnimatableLengthSize(value); |
@@ -582,13 +592,9 @@ void AnimatedStyleBuilder::applyProperty(CSSPropertyID property, StyleResolverSt |
style->setTransform(operations.size() ? operations : TransformOperations(true)); |
return; |
} |
- case CSSPropertyTransformOrigin: { |
- const AnimatableLengthPoint3D* animatableLengthPoint3D = toAnimatableLengthPoint3D(value); |
- style->setTransformOriginX(animatableValueToLength(animatableLengthPoint3D->x(), state)); |
- style->setTransformOriginY(animatableValueToLength(animatableLengthPoint3D->y(), state)); |
- style->setTransformOriginZ(clampTo<float>(toAnimatableDouble(animatableLengthPoint3D->z())->toDouble())); |
+ case CSSPropertyTransformOrigin: |
+ style->setTransformOrigin(animatableValueToTransformOrigin(value, state)); |
return; |
- } |
case CSSPropertyWidows: |
style->setWidows(animatableValueRoundClampTo<unsigned short>(value, 1)); |
return; |