Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(469)

Unified Diff: Source/core/animation/css/CSSAnimatableValueFactory.cpp

Issue 644953003: Store [-webkit-]transform-origin as a TransformOrigin. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Almost forgot: drop unused ctor. (+ rebase). Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/css/CSSProperties.in » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/css/CSSAnimatableValueFactory.cpp
diff --git a/Source/core/animation/css/CSSAnimatableValueFactory.cpp b/Source/core/animation/css/CSSAnimatableValueFactory.cpp
index 988c46d761cc408445b2947007632fc058dea08a..d3d2cf1423527d3b36eeefdadf05865218f19c96 100644
--- a/Source/core/animation/css/CSSAnimatableValueFactory.cpp
+++ b/Source/core/animation/css/CSSAnimatableValueFactory.cpp
@@ -145,6 +145,14 @@ inline static PassRefPtrWillBeRawPtr<AnimatableValue> createFromLengthPoint(cons
createFromLength(lengthPoint.y(), style));
}
+inline static PassRefPtrWillBeRawPtr<AnimatableValue> createFromTransformOrigin(const TransformOrigin& transformOrigin, const RenderStyle& style)
+{
+ return AnimatableLengthPoint3D::create(
+ createFromLength(transformOrigin.x(), style),
+ createFromLength(transformOrigin.y(), style),
+ createFromDouble(transformOrigin.z()));
+}
+
inline static PassRefPtrWillBeRawPtr<AnimatableValue> createFromLengthSize(const LengthSize& lengthSize, const RenderStyle& style)
{
return AnimatableLengthSize::create(
@@ -483,10 +491,7 @@ PassRefPtrWillBeRawPtr<AnimatableValue> CSSAnimatableValueFactory::create(CSSPro
case CSSPropertyTransform:
return AnimatableTransform::create(style.transform());
case CSSPropertyTransformOrigin:
- return AnimatableLengthPoint3D::create(
- createFromLength(style.transformOriginX(), style),
- createFromLength(style.transformOriginY(), style),
- createFromDouble(style.transformOriginZ()));
+ return createFromTransformOrigin(style.transformOrigin(), style);
case CSSPropertyWidows:
return createFromDouble(style.widows());
case CSSPropertyWidth:
« no previous file with comments | « no previous file | Source/core/css/CSSProperties.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698