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

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

Issue 1416703004: Web Animations: Add SVGIntegerOptionalIntegerInterpolationType (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_svgNONInterpolationType
Patch Set: neutralKeyframe 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 863f895ffbed46138ee5b423c4b69ecedae0c24c..583a82d4cc5a42c478cdd1163205c05a31f5475e 100644
--- a/third_party/WebKit/Source/core/animation/StringKeyframe.cpp
+++ b/third_party/WebKit/Source/core/animation/StringKeyframe.cpp
@@ -21,7 +21,6 @@
#include "core/animation/DoubleStyleInterpolation.h"
#include "core/animation/FilterStyleInterpolation.h"
#include "core/animation/ImageSliceStyleInterpolation.h"
-#include "core/animation/IntegerOptionalIntegerSVGInterpolation.h"
#include "core/animation/InterpolationType.h"
#include "core/animation/InvalidatableInterpolation.h"
#include "core/animation/LegacyStyleInterpolation.h"
@@ -36,6 +35,7 @@
#include "core/animation/RectSVGInterpolation.h"
#include "core/animation/SVGAngleInterpolationType.h"
#include "core/animation/SVGIntegerInterpolationType.h"
+#include "core/animation/SVGIntegerOptionalIntegerInterpolationType.h"
#include "core/animation/SVGNumberInterpolationType.h"
#include "core/animation/SVGNumberOptionalNumberInterpolationType.h"
#include "core/animation/SVGPointListInterpolationType.h"
@@ -272,6 +272,8 @@ const InterpolationTypes* applicableTypesForProperty(PropertyHandle property)
|| attribute == SVGNames::targetXAttr
|| attribute == SVGNames::targetYAttr) {
applicableTypes->append(adoptPtr(new SVGIntegerInterpolationType(attribute)));
+ } else if (attribute == SVGNames::orderAttr) {
+ applicableTypes->append(adoptPtr(new SVGIntegerOptionalIntegerInterpolationType(attribute)));
} else if (attribute == SVGNames::amplitudeAttr
|| attribute == SVGNames::azimuthAttr
|| attribute == SVGNames::biasAttr
@@ -564,10 +566,6 @@ PassRefPtr<Interpolation> createSVGInterpolation(SVGPropertyBase* fromValue, SVG
RefPtr<Interpolation> interpolation = nullptr;
ASSERT(fromValue->type() == toValue->type());
switch (fromValue->type()) {
- case AnimatedIntegerOptionalInteger: {
- int min = &attribute->attributeName() == &SVGNames::orderAttr ? 1 : 0;
- return IntegerOptionalIntegerSVGInterpolation::create(fromValue, toValue, attribute, min);
- }
case AnimatedLength:
return LengthSVGInterpolation::create(fromValue, toValue, attribute);
case AnimatedLengthList:
@@ -588,6 +586,7 @@ PassRefPtr<Interpolation> createSVGInterpolation(SVGPropertyBase* fromValue, SVG
// Handled by SVGInterpolationTypes.
case AnimatedAngle:
case AnimatedInteger:
+ case AnimatedIntegerOptionalInteger:
case AnimatedNumber:
case AnimatedNumberOptionalNumber:
case AnimatedPoints:

Powered by Google App Engine
This is Rietveld 408576698