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

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

Issue 1418193007: Web Animations: Add SVGNumberOptionalNumberInterpolationType (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_svgIntegerInterpolationType
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 200d690ae808a2e8fa7a4a5d55ff8d8100fb4c52..863f895ffbed46138ee5b423c4b69ecedae0c24c 100644
--- a/third_party/WebKit/Source/core/animation/StringKeyframe.cpp
+++ b/third_party/WebKit/Source/core/animation/StringKeyframe.cpp
@@ -31,13 +31,13 @@
#include "core/animation/LengthStyleInterpolation.h"
#include "core/animation/ListSVGInterpolation.h"
#include "core/animation/ListStyleInterpolation.h"
-#include "core/animation/NumberOptionalNumberSVGInterpolation.h"
#include "core/animation/NumberSVGInterpolation.h"
#include "core/animation/PathSVGInterpolation.h"
#include "core/animation/RectSVGInterpolation.h"
#include "core/animation/SVGAngleInterpolationType.h"
#include "core/animation/SVGIntegerInterpolationType.h"
#include "core/animation/SVGNumberInterpolationType.h"
+#include "core/animation/SVGNumberOptionalNumberInterpolationType.h"
#include "core/animation/SVGPointListInterpolationType.h"
#include "core/animation/SVGStrokeDasharrayStyleInterpolation.h"
#include "core/animation/SVGValueInterpolationType.h"
@@ -298,6 +298,11 @@ const InterpolationTypes* applicableTypesForProperty(PropertyHandle property)
|| attribute == SVGNames::surfaceScaleAttr
|| attribute == SVGNames::zAttr) {
applicableTypes->append(adoptPtr(new SVGNumberInterpolationType(attribute)));
+ } else if (attribute == SVGNames::baseFrequencyAttr
+ || attribute == SVGNames::kernelUnitLengthAttr
+ || attribute == SVGNames::radiusAttr
+ || attribute == SVGNames::stdDeviationAttr) {
+ applicableTypes->append(adoptPtr(new SVGNumberOptionalNumberInterpolationType(attribute)));
} else if (attribute == SVGNames::pointsAttr) {
applicableTypes->append(adoptPtr(new SVGPointListInterpolationType(attribute)));
} else if (attribute == HTMLNames::classAttr
@@ -568,8 +573,6 @@ PassRefPtr<Interpolation> createSVGInterpolation(SVGPropertyBase* fromValue, SVG
case AnimatedLengthList:
interpolation = ListSVGInterpolation<LengthSVGInterpolation>::maybeCreate(fromValue, toValue, attribute);
break;
- case AnimatedNumberOptionalNumber:
- return NumberOptionalNumberSVGInterpolation::create(fromValue, toValue, attribute);
case AnimatedNumberList:
interpolation = ListSVGInterpolation<NumberSVGInterpolation>::maybeCreate(fromValue, toValue, attribute);
break;
@@ -586,6 +589,7 @@ PassRefPtr<Interpolation> createSVGInterpolation(SVGPropertyBase* fromValue, SVG
case AnimatedAngle:
case AnimatedInteger:
case AnimatedNumber:
+ case AnimatedNumberOptionalNumber:
case AnimatedPoints:
ASSERT_NOT_REACHED();
// Fallthrough.

Powered by Google App Engine
This is Rietveld 408576698