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

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

Issue 1417483015: SVG Web Animations: Add SVGIntegerOptionalIntegerInterpolationType (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More test work... Some failing 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 10d3bb3c3fc0f1c938a52093d048a2c34c59b64b..b9d4eef84fd417b2a9d5125968a0f9559d06c049 100644
--- a/third_party/WebKit/Source/core/animation/StringKeyframe.cpp
+++ b/third_party/WebKit/Source/core/animation/StringKeyframe.cpp
@@ -22,7 +22,6 @@
#include "core/animation/DoubleStyleInterpolation.h"
#include "core/animation/FilterStyleInterpolation.h"
#include "core/animation/ImageSliceStyleInterpolation.h"
-#include "core/animation/IntegerOptionalIntegerSVGInterpolation.h"
#include "core/animation/IntegerSVGInterpolation.h"
#include "core/animation/InterpolationType.h"
#include "core/animation/InvalidatableInterpolation.h"
@@ -39,6 +38,7 @@
#include "core/animation/PointSVGInterpolation.h"
#include "core/animation/RectSVGInterpolation.h"
#include "core/animation/SVGAngleInterpolationType.h"
+#include "core/animation/SVGIntegerOptionalIntegerInterpolationType.h"
#include "core/animation/SVGNumberInterpolationType.h"
#include "core/animation/SVGStrokeDasharrayStyleInterpolation.h"
#include "core/animation/SVGValueInterpolationType.h"
@@ -322,6 +322,8 @@ const Vector<const InterpolationType*>* applicableTypesForProperty(PropertyHandl
applicableTypes->append(new SVGValueInterpolationType(attribute));
} else if (attribute == SVGNames::orientAttr) {
applicableTypes->append(new SVGAngleInterpolationType(attribute));
+ } else if (attribute == SVGNames::orderAttr) {
+ applicableTypes->append(new SVGIntegerOptionalIntegerInterpolationType(attribute));
} else {
fallbackToLegacy = true;
}
@@ -560,10 +562,6 @@ PassRefPtr<Interpolation> createSVGInterpolation(SVGPropertyBase* fromValue, SVG
switch (fromValue->type()) {
case AnimatedInteger:
return IntegerSVGInterpolation::create(fromValue, toValue, attribute);
- 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:
@@ -589,6 +587,7 @@ PassRefPtr<Interpolation> createSVGInterpolation(SVGPropertyBase* fromValue, SVG
// Handled by SVGInterpolationTypes.
case AnimatedAngle:
case AnimatedNumber:
+ case AnimatedIntegerOptionalInteger:
ASSERT_NOT_REACHED();
// Fallthrough.

Powered by Google App Engine
This is Rietveld 408576698