Chromium Code Reviews| Index: Source/core/animation/StringKeyframe.cpp |
| diff --git a/Source/core/animation/StringKeyframe.cpp b/Source/core/animation/StringKeyframe.cpp |
| index 90b68cb8b2e85261872802d33c35f5fb5f89f01a..4da308c3893ad3c32fcc90b3ca97358a2cb83518 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" |
| @@ -213,23 +214,38 @@ PassRefPtrWillBeRawPtr<Interpolation> StringKeyframe::PropertySpecificKeyframe:: |
| case CSSPropertyObjectPosition: |
| if (LengthPairStyleInterpolation::canCreateFrom(*fromCSSValue) && LengthPairStyleInterpolation::canCreateFrom(*toCSSValue)) |
| return LengthPairStyleInterpolation::create(*fromCSSValue, *toCSSValue, property, range); |
| - |
| - // FIXME: Handle CSSValueLists. |
| - fallBackToLegacy = true; |
| break; |
| + |
| case CSSPropertyPerspectiveOrigin: |
| - case CSSPropertyTransformOrigin: |
| - if (LengthPoint3DStyleInterpolation::canCreateFrom(*fromCSSValue) && LengthPoint3DStyleInterpolation::canCreateFrom(*toCSSValue)) |
| - return LengthPoint3DStyleInterpolation::create(*fromCSSValue, *toCSSValue, property); |
| + case CSSPropertyTransformOrigin: { |
| + RefPtrWillBeRawPtr<Interpolation> interpolation = ListStyleInterpolation<LengthStyleInterpolation>::maybeCreateFromList(*fromCSSValue, *toCSSValue, property, range); |
| + if (interpolation) |
| + return interpolation.release(); |
| + break; |
| + } |
| + |
| + case CSSPropertyBoxShadow: |
| + case CSSPropertyTextShadow: |
| + case CSSPropertyWebkitBoxShadow: { |
| + RefPtrWillBeRawPtr<Interpolation> interpolation = ListStyleInterpolation<ShadowStyleInterpolation>::maybeCreateFromList(*fromCSSValue, *toCSSValue, property); |
| + if (interpolation) |
| + return interpolation.release(); |
| - // FIXME: Handle percentages and 2D origins. |
| + // Interpolation between inset and non-inset ShadowValues should fall back to DefaultStyleInterpolation |
| + if (ShadowStyleInterpolation::usesDefaultStyleInterpolation(*fromCSSValue, *toCSSValue)) |
|
dstockwell
2015/02/02 06:10:12
This seems like the inverse of the legacy check? C
dstockwell
2015/02/02 06:10:12
This seems like the inverse of the legacy check? C
|
| + return DefaultStyleInterpolation::create(fromCSSValue, toCSSValue, property); |
|
dstockwell
2015/02/02 06:10:12
Doesn't `break;` fall through to default style int
shans
2015/02/02 23:49:11
AnimatableShadow incorrectly animates between inse
evemj (not active)
2015/02/03 00:25:56
Done.
dstockwell
2015/02/03 02:22:18
Hmm, interesting, I see the spec has changed here,
|
| + |
| + // FIXME: Handle interpolation from/to none |
| 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; |