Index: Source/core/animation/StringKeyframe.cpp |
diff --git a/Source/core/animation/StringKeyframe.cpp b/Source/core/animation/StringKeyframe.cpp |
index 90b68cb8b2e85261872802d33c35f5fb5f89f01a..6079eba2219da559f4cb5f720e0c09275cdcdc2e 100644 |
--- a/Source/core/animation/StringKeyframe.cpp |
+++ b/Source/core/animation/StringKeyframe.cpp |
@@ -14,8 +14,9 @@ |
#include "core/animation/LegacyStyleInterpolation.h" |
#include "core/animation/LengthBoxStyleInterpolation.h" |
#include "core/animation/LengthPairStyleInterpolation.h" |
-#include "core/animation/LengthPoint3DStyleInterpolation.h" |
#include "core/animation/LengthStyleInterpolation.h" |
+#include "core/animation/ListStyleInterpolation.h" |
+#include "core/animation/ShadowStyleInterpolation.h" |
#include "core/animation/VisibilityStyleInterpolation.h" |
#include "core/animation/css/CSSAnimations.h" |
#include "core/css/CSSPropertyMetadata.h" |
@@ -219,17 +220,36 @@ PassRefPtrWillBeRawPtr<Interpolation> StringKeyframe::PropertySpecificKeyframe:: |
break; |
case CSSPropertyPerspectiveOrigin: |
case CSSPropertyTransformOrigin: |
- if (LengthPoint3DStyleInterpolation::canCreateFrom(*fromCSSValue) && LengthPoint3DStyleInterpolation::canCreateFrom(*toCSSValue)) |
- return LengthPoint3DStyleInterpolation::create(*fromCSSValue, *toCSSValue, property); |
+ { |
+ RefPtrWillBeRawPtr<Interpolation> interpolation = ListStyleInterpolation<LengthStyleInterpolation>::maybeCreateFromList(*fromCSSValue, *toCSSValue, property, range); |
+ if (interpolation) |
+ return interpolation.release(); |
samli
2015/01/23 03:23:36
Fix indentation please.
evemj (not active)
2015/01/28 00:41:14
Done.
|
+ break; |
+ } |
+ |
+ case CSSPropertyBoxShadow: |
+ case CSSPropertyTextShadow: |
+ case CSSPropertyWebkitBoxShadow: |
+ { |
+ RefPtrWillBeRawPtr<Interpolation> interpolation = ListStyleInterpolation<ShadowStyleInterpolation>::maybeCreateFromList(*fromCSSValue, *toCSSValue, property); |
+ if (interpolation) |
+ return interpolation.release(); |
+ |
+ // Interpolation between inset and non-inset ShadowValues should fall back to DefaultStyleInterpolation |
+ if (ShadowStyleInterpolation::usesDefaultStyleInterpolation(*fromCSSValue, *toCSSValue)) |
+ return DefaultStyleInterpolation::create(fromCSSValue, toCSSValue, property); |
+ |
+ // FIXME: Handle interpolation from/to none |
+ fallBackToLegacy = true; |
+ |
+ break; |
+ } |
- // FIXME: Handle percentages and 2D origins. |
- fallBackToLegacy = true; |
- break; |
case CSSPropertyWebkitMaskBoxImageSlice: |
if (LengthBoxStyleInterpolation::matchingFill(*toCSSValue, *fromCSSValue) && LengthBoxStyleInterpolation::canCreateFrom(*fromCSSValue) && LengthStyleInterpolation::canCreateFrom(*toCSSValue)) |
return LengthBoxStyleInterpolation::createFromBorderImageSlice(*fromCSSValue, *toCSSValue, property); |
- |
break; |
+ |
default: |
// Fall back to LegacyStyleInterpolation. |
fallBackToLegacy = true; |