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

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

Issue 1587533002: Add composition support for SVG Web Animation of x, y, dx, dy attributes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review changes Created 4 years, 11 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: 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 3ea0b7078f539de509f1d4880dfd23995c07ea8d..f6778f2461bb2a3fe32e11b2080d63786e18b86c 100644
--- a/third_party/WebKit/Source/core/animation/StringKeyframe.cpp
+++ b/third_party/WebKit/Source/core/animation/StringKeyframe.cpp
@@ -28,14 +28,13 @@
#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/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"
@@ -299,12 +298,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 SVGNumberInterpolationType(attribute)));
+ applicableTypes->append(adoptPtr(new SVGLengthListInterpolationType(attribute)));
+ } else if (attribute == SVGNames::xAttr
+ || attribute == SVGNames::yAttr) {
+ applicableTypes->append(adoptPtr(new SVGLengthInterpolationType(attribute)));
+ applicableTypes->append(adoptPtr(new SVGLengthListInterpolationType(attribute)));
} else if (attribute == SVGNames::amplitudeAttr
|| attribute == SVGNames::azimuthAttr
|| attribute == SVGNames::biasAttr
@@ -602,15 +608,12 @@ 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;
-
// Handled by SVGInterpolationTypes.
case AnimatedAngle:
case AnimatedInteger:
case AnimatedIntegerOptionalInteger:
case AnimatedLength:
+ case AnimatedLengthList:
case AnimatedNumber:
case AnimatedNumberList:
case AnimatedNumberOptionalNumber:
« no previous file with comments | « third_party/WebKit/Source/core/animation/SVGLengthListInterpolationType.cpp ('k') | third_party/WebKit/Source/core/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698