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

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

Issue 190793011: Use isSVG*Element() helpers more in SVG code (Part 4) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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/SVGAElement.cpp ('k') | Source/core/svg/SVGAnimateMotionElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGAnimateElement.cpp
diff --git a/Source/core/svg/SVGAnimateElement.cpp b/Source/core/svg/SVGAnimateElement.cpp
index 4969bfa1d170ffd14237cc6bbf96fed9db5e5cd9..142e4bee71f61efb952bd0f99efef1ddba880674 100644
--- a/Source/core/svg/SVGAnimateElement.cpp
+++ b/Source/core/svg/SVGAnimateElement.cpp
@@ -38,7 +38,7 @@ SVGAnimateElement::SVGAnimateElement(const QualifiedName& tagName, Document& doc
: SVGAnimationElement(tagName, document)
, m_animatedPropertyType(AnimatedString)
{
- ASSERT(hasTagName(SVGNames::animateTag) || hasTagName(SVGNames::setTag) || hasTagName(SVGNames::animateTransformTag));
+ ASSERT(isSVGAnimateElement(*this));
ScriptWrappable::init(this);
}
@@ -72,7 +72,7 @@ void SVGAnimateElement::calculateAnimatedValue(float percentage, unsigned repeat
ASSERT(m_animatedPropertyType == determineAnimatedPropertyType());
ASSERT(percentage >= 0 && percentage <= 1);
- ASSERT(m_animatedPropertyType != AnimatedTransformList || hasTagName(SVGNames::animateTransformTag));
+ ASSERT(m_animatedPropertyType != AnimatedTransformList || isSVGAnimateTransformElement(*this));
ASSERT(m_animatedPropertyType != AnimatedUnknown);
ASSERT(m_animator);
ASSERT(m_animator->type() == m_animatedPropertyType);
@@ -84,7 +84,7 @@ void SVGAnimateElement::calculateAnimatedValue(float percentage, unsigned repeat
ASSERT(resultAnimationElement->m_animatedProperty);
ASSERT(resultAnimationElement->m_animatedPropertyType == m_animatedPropertyType);
- if (hasTagName(SVGNames::setTag))
+ if (isSVGSetElement(*this))
percentage = 1;
if (calcMode() == CalcModeDiscrete)
@@ -138,7 +138,7 @@ bool SVGAnimateElement::calculateFromAndByValues(const String& fromString, const
if (animationMode() == FromByAnimation && !animatedPropertyTypeSupportsAddition())
return false;
- ASSERT(!hasTagName(SVGNames::setTag));
+ ASSERT(!isSVGSetElement(*this));
determinePropertyValueTypes(fromString, byString);
ensureAnimator()->calculateFromAndByValues(m_fromProperty, m_toProperty, fromString, byString);
@@ -320,7 +320,7 @@ void SVGAnimateElement::clearAnimatedType(SVGElement* targetElement)
void SVGAnimateElement::applyResultsToTarget()
{
- ASSERT(m_animatedPropertyType != AnimatedTransformList || hasTagName(SVGNames::animateTransformTag));
+ ASSERT(m_animatedPropertyType != AnimatedTransformList || isSVGAnimateTransformElement(*this));
ASSERT(m_animatedPropertyType != AnimatedUnknown);
ASSERT(m_animator);
« no previous file with comments | « Source/core/svg/SVGAElement.cpp ('k') | Source/core/svg/SVGAnimateMotionElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698