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

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

Issue 1406393006: Web Animations: Migrate SVG integer 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..89d3575080a56085a75162938bc4899c5958cb40 100644
--- a/third_party/WebKit/Source/core/animation/StringKeyframe.cpp
+++ b/third_party/WebKit/Source/core/animation/StringKeyframe.cpp
@@ -23,7 +23,6 @@
#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"
#include "core/animation/LegacyStyleInterpolation.h"
@@ -38,6 +37,7 @@
#include "core/animation/PathSVGInterpolation.h"
#include "core/animation/PointSVGInterpolation.h"
#include "core/animation/RectSVGInterpolation.h"
+#include "core/animation/SVGIntegerInterpolationType.h"
#include "core/animation/SVGNumberInterpolationType.h"
#include "core/animation/SVGStrokeDasharrayStyleInterpolation.h"
#include "core/animation/SVGValueInterpolationType.h"
@@ -289,6 +289,10 @@ const Vector<const InterpolationType*>* applicableTypesForProperty(PropertyHandl
|| attribute == SVGNames::surfaceScaleAttr
|| attribute == SVGNames::zAttr) {
applicableTypes->append(new SVGNumberInterpolationType(attribute));
+ } else if (attribute == SVGNames::numOctavesAttr
+ || attribute == SVGNames::targetXAttr
+ || attribute == SVGNames::targetYAttr) {
+ applicableTypes->append(new SVGIntegerInterpolationType(attribute));
} else if (attribute == HTMLNames::classAttr
|| attribute == SVGNames::clipPathUnitsAttr
|| attribute == SVGNames::edgeModeAttr
@@ -558,8 +562,6 @@ PassRefPtr<Interpolation> createSVGInterpolation(SVGPropertyBase* fromValue, SVG
if (AngleSVGInterpolation::canCreateFrom(fromValue) && AngleSVGInterpolation::canCreateFrom(toValue))
return AngleSVGInterpolation::create(fromValue, toValue, attribute);
break;
- 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);
@@ -587,6 +589,7 @@ PassRefPtr<Interpolation> createSVGInterpolation(SVGPropertyBase* fromValue, SVG
break;
// Handled by SVGInterpolationTypes.
+ case AnimatedInteger:
case AnimatedNumber:
ASSERT_NOT_REACHED();
// Fallthrough.
« no previous file with comments | « third_party/WebKit/Source/core/animation/SVGIntegerInterpolationType.cpp ('k') | third_party/WebKit/Source/core/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698