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

Unified Diff: third_party/WebKit/Source/core/animation/StringKeyframe.cpp

Issue 1410343009: [WIP] Web Animations: Migrate SVG number list interpolation to interpolation types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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: 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 2a57e08f88f821805632e576b629a01cfe44cb3a..4ca75fff81025b34cc32ae3134dde5ce80e1fc00 100644
--- a/third_party/WebKit/Source/core/animation/StringKeyframe.cpp
+++ b/third_party/WebKit/Source/core/animation/StringKeyframe.cpp
@@ -39,6 +39,7 @@
#include "core/animation/PointSVGInterpolation.h"
#include "core/animation/RectSVGInterpolation.h"
#include "core/animation/SVGNumberInterpolationType.h"
+#include "core/animation/SVGNumberListInterpolationType.h"
#include "core/animation/SVGStrokeDasharrayStyleInterpolation.h"
#include "core/animation/SVGValueInterpolationType.h"
#include "core/animation/TransformSVGInterpolation.h"
@@ -318,6 +319,12 @@ const Vector<const InterpolationType*>* applicableTypesForProperty(PropertyHandl
|| attribute == SVGNames::yChannelSelectorAttr
|| attribute == XLinkNames::hrefAttr) {
// Use default SVGValueInterpolationType.
+ applicableTypes->append(new SVGValueInterpolationType(attribute));
+ } else if (attribute == SVGNames::kernelMatrixAttr
+ || attribute == SVGNames::rotateAttr
+ || attribute == SVGNames::tableValuesAttr
+ || attribute == SVGNames::valuesAttr) {
+ applicableTypes->append(new SVGNumberListInterpolationType(attribute));
} else {
fallbackToLegacy = true;
}
@@ -572,8 +579,8 @@ PassRefPtr<Interpolation> createSVGInterpolation(SVGPropertyBase* fromValue, SVG
case AnimatedNumberOptionalNumber:
return NumberOptionalNumberSVGInterpolation::create(fromValue, toValue, attribute);
case AnimatedNumberList:
- interpolation = ListSVGInterpolation<NumberSVGInterpolation>::maybeCreate(fromValue, toValue, attribute);
- break;
+ ASSERT_NOT_REACHED();
+ return nullptr;
case AnimatedPath:
interpolation = PathSVGInterpolation::maybeCreate(fromValue, toValue, attribute);
break;
« no previous file with comments | « third_party/WebKit/Source/core/animation/SVGNumberListInterpolationType.cpp ('k') | third_party/WebKit/Source/core/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698