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

Unified Diff: Source/core/svg/SVGAnimationElement.cpp

Issue 303093002: SVG: remove |SVGAnimateElement::m_animatedPropertyType| (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix wrong if Created 6 years, 7 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
« no previous file with comments | « Source/core/svg/SVGAnimationElement.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGAnimationElement.cpp
diff --git a/Source/core/svg/SVGAnimationElement.cpp b/Source/core/svg/SVGAnimationElement.cpp
index e920868f82869963ad5f904f1140e6b728d4c0fd..80848ff3ecd254b8c0776784ccb18642e3d3bddc 100644
--- a/Source/core/svg/SVGAnimationElement.cpp
+++ b/Source/core/svg/SVGAnimationElement.cpp
@@ -336,7 +336,7 @@ String SVGAnimationElement::fromValue() const
return fastGetAttribute(SVGNames::fromAttr);
}
-bool SVGAnimationElement::isAdditive() const
+bool SVGAnimationElement::isAdditive()
{
DEFINE_STATIC_LOCAL(const AtomicString, sum, ("sum", AtomicString::ConstructFromLiteral));
const AtomicString& value = fastGetAttribute(SVGNames::additiveAttr);
@@ -486,26 +486,6 @@ void SVGAnimationElement::currentValuesFromKeyPoints(float percent, float& effec
to = m_values[index + 1];
}
-AnimatedPropertyType SVGAnimationElement::determineAnimatedPropertyType() const
-{
- if (!targetElement())
- return AnimatedString;
-
- RefPtr<SVGAnimatedPropertyBase> property = targetElement()->propertyFromAttribute(attributeName());
- if (property) {
- AnimatedPropertyType propertyType = property->type();
-
- // Only <animatedTransform> is allowed to animate AnimatedTransformList.
- // http://www.w3.org/TR/SVG/animate.html#AnimationAttributesAndProperties
- if (propertyType == AnimatedTransformList && !isSVGAnimateTransformElement(*this))
- return AnimatedUnknown;
-
- return propertyType;
- }
-
- return SVGElement::animatedPropertyTypeForCSSAttribute(attributeName());
-}
-
void SVGAnimationElement::currentValuesForValuesAnimation(float percent, float& effectivePercent, String& from, String& to)
{
unsigned valuesCount = m_values.size();
@@ -520,15 +500,8 @@ void SVGAnimationElement::currentValuesForValuesAnimation(float percent, float&
}
CalcMode calcMode = this->calcMode();
- if (hasTagName(SVGNames::animateTag)) {
- AnimatedPropertyType attributeType = determineAnimatedPropertyType();
- // Fall back to discrete animations for Strings.
- if (attributeType == AnimatedBoolean
- || attributeType == AnimatedEnumeration
- || attributeType == AnimatedPreserveAspectRatio
- || attributeType == AnimatedString)
- calcMode = CalcModeDiscrete;
- }
+ if (isSVGAnimateElement(*this) && !toSVGAnimateElement(*this).animatedPropertyTypeSupportsAddition())
+ calcMode = CalcModeDiscrete;
pdr. 2014/05/29 21:38:00 This looks like it could lead to a change in behav
kouhei (in TOK) 2014/05/30 01:15:23 Done.
if (!m_keyPoints.isEmpty() && calcMode != CalcModePaced)
return currentValuesFromKeyPoints(percent, effectivePercent, from, to);
« no previous file with comments | « Source/core/svg/SVGAnimationElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698