Chromium Code Reviews| Index: third_party/WebKit/Source/core/animation/StringKeyframe.cpp |
| diff --git a/third_party/WebKit/Source/core/animation/StringKeyframe.cpp b/third_party/WebKit/Source/core/animation/StringKeyframe.cpp |
| index 64c81d59d2ae2c9f7452e1453d0439b531b66575..a0f6c7d1eb932284174766446ffec28691851a95 100644 |
| --- a/third_party/WebKit/Source/core/animation/StringKeyframe.cpp |
| +++ b/third_party/WebKit/Source/core/animation/StringKeyframe.cpp |
| @@ -26,15 +26,14 @@ |
| #include "core/animation/LegacyStyleInterpolation.h" |
| #include "core/animation/LengthBoxStyleInterpolation.h" |
| #include "core/animation/LengthPairStyleInterpolation.h" |
| -#include "core/animation/LengthSVGInterpolation.h" |
| #include "core/animation/LengthStyleInterpolation.h" |
| -#include "core/animation/ListSVGInterpolation.h" |
| #include "core/animation/ListStyleInterpolation.h" |
| #include "core/animation/PathSVGInterpolation.h" |
| #include "core/animation/SVGAngleInterpolationType.h" |
| #include "core/animation/SVGIntegerInterpolationType.h" |
| #include "core/animation/SVGIntegerOptionalIntegerInterpolationType.h" |
| #include "core/animation/SVGLengthInterpolationType.h" |
| +#include "core/animation/SVGLengthListInterpolationType.h" |
| #include "core/animation/SVGNumberInterpolationType.h" |
| #include "core/animation/SVGNumberListInterpolationType.h" |
| #include "core/animation/SVGNumberOptionalNumberInterpolationType.h" |
| @@ -289,12 +288,19 @@ const InterpolationTypes* applicableTypesForProperty(PropertyHandle property) |
| || attribute == SVGNames::startOffsetAttr |
| || attribute == SVGNames::textLengthAttr |
| || attribute == SVGNames::widthAttr |
| - || attribute == SVGNames::xAttr |
| || attribute == SVGNames::x1Attr |
| || attribute == SVGNames::x2Attr |
| || attribute == SVGNames::y1Attr |
| || attribute == SVGNames::y2Attr) { |
| applicableTypes->append(adoptPtr(new SVGLengthInterpolationType(attribute))); |
| + } else if (attribute == SVGNames::dxAttr |
| + || attribute == SVGNames::dyAttr) { |
| + applicableTypes->append(adoptPtr(new SVGLengthListInterpolationType(attribute))); |
|
fs
2015/12/16 22:43:29
'dx' and 'dy' can also be numbers (on <feOffset> a
|
| + } else if (attribute == SVGNames::xAttr |
| + || attribute == SVGNames::yAttr) { |
| + // 'x' and 'y' may be either a length or a length list |
| + applicableTypes->append(adoptPtr(new SVGLengthInterpolationType(attribute))); |
| + applicableTypes->append(adoptPtr(new SVGLengthListInterpolationType(attribute))); |
| } else if (attribute == SVGNames::amplitudeAttr |
| || attribute == SVGNames::azimuthAttr |
| || attribute == SVGNames::biasAttr |
| @@ -598,9 +604,6 @@ PassRefPtr<Interpolation> createSVGInterpolation(SVGPropertyBase* fromValue, SVG |
| RefPtr<Interpolation> interpolation = nullptr; |
| ASSERT(fromValue->type() == toValue->type()); |
| switch (fromValue->type()) { |
| - case AnimatedLengthList: |
| - interpolation = ListSVGInterpolation<LengthSVGInterpolation>::maybeCreate(fromValue, toValue, attribute); |
| - break; |
| case AnimatedPath: |
| interpolation = PathSVGInterpolation::maybeCreate(fromValue, toValue, attribute); |
| break; |
| @@ -610,6 +613,7 @@ PassRefPtr<Interpolation> createSVGInterpolation(SVGPropertyBase* fromValue, SVG |
| case AnimatedInteger: |
| case AnimatedIntegerOptionalInteger: |
| case AnimatedLength: |
| + case AnimatedLengthList: |
| case AnimatedNumber: |
| case AnimatedNumberList: |
| case AnimatedNumberOptionalNumber: |