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

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

Issue 23279010: Introduce toSVGAnimateElement(), and use it (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 4 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
Index: Source/core/svg/SVGAnimateElement.cpp
diff --git a/Source/core/svg/SVGAnimateElement.cpp b/Source/core/svg/SVGAnimateElement.cpp
index 0f404eb7d9fddea2d807dba16e38deafc9e00e4c..b129b62f31bb947551edcd063ab93c17bd7a94de 100644
--- a/Source/core/svg/SVGAnimateElement.cpp
+++ b/Source/core/svg/SVGAnimateElement.cpp
@@ -111,12 +111,11 @@ void SVGAnimateElement::calculateAnimatedValue(float percentage, unsigned repeat
ASSERT(m_fromType->type() == m_animatedPropertyType);
ASSERT(m_toType);
- ASSERT(resultElement->hasTagName(SVGNames::animateTag)
- || resultElement->hasTagName(SVGNames::animateColorTag)
+ ASSERT(resultElement->hasTagName(SVGNames::animateColorTag)
|| resultElement->hasTagName(SVGNames::animateTransformTag)
|| resultElement->hasTagName(SVGNames::setTag));
- SVGAnimateElement* resultAnimationElement = static_cast<SVGAnimateElement*>(resultElement);
+ SVGAnimateElement* resultAnimationElement = toSVGAnimateElement(resultElement);
ASSERT(resultAnimationElement->m_animatedType);
ASSERT(resultAnimationElement->m_animatedPropertyType == m_animatedPropertyType);

Powered by Google App Engine
This is Rietveld 408576698