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

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

Issue 1158603003: CSS Independent Transform Properties (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Correct equality operators and remove dependencies on size() in parser Created 5 years, 6 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
Index: Source/core/animation/css/CSSAnimatableValueFactory.cpp
diff --git a/Source/core/animation/css/CSSAnimatableValueFactory.cpp b/Source/core/animation/css/CSSAnimatableValueFactory.cpp
index abd9d8c51ef5f975efe67f65915e64d31ba6b226..9856edac7050d26924e2925427293eeaec5f90ec 100644
--- a/Source/core/animation/css/CSSAnimatableValueFactory.cpp
+++ b/Source/core/animation/css/CSSAnimatableValueFactory.cpp
@@ -258,6 +258,13 @@ static PassRefPtrWillBeRawPtr<AnimatableValue> createFromFontStretch(FontStretch
return createFromDouble(fontStretchToDouble(fontStretch));
}
+static PassRefPtrWillBeRawPtr<AnimatableValue> createFromTransformProperties(PassRefPtr<TransformOperation> transform)
+{
+ TransformOperations operation;
+ operation.operations().append(transform);
+ return AnimatableTransform::create(operation);
+}
+
static double fontWeightToDouble(FontWeight fontWeight)
{
switch (fontWeight) {
@@ -519,6 +526,12 @@ PassRefPtrWillBeRawPtr<AnimatableValue> CSSAnimatableValueFactory::create(CSSPro
return createFromColor(property, style);
case CSSPropertyTransform:
return AnimatableTransform::create(style.transform());
+ case CSSPropertyTranslate:
+ return createFromTransformProperties(style.translate());
+ case CSSPropertyRotate:
+ return createFromTransformProperties(style.rotate());
+ case CSSPropertyScale:
+ return createFromTransformProperties(style.scale());
case CSSPropertyTransformOrigin:
return createFromTransformOrigin(style.transformOrigin(), style);
case CSSPropertyMotionOffset:

Powered by Google App Engine
This is Rietveld 408576698