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

Unified Diff: Source/core/svg/SVGAnimateMotionElement.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/SVGAnimateElement.cpp ('k') | Source/core/svg/SVGAnimationElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGAnimateMotionElement.cpp
diff --git a/Source/core/svg/SVGAnimateMotionElement.cpp b/Source/core/svg/SVGAnimateMotionElement.cpp
index 715a7ab458d54954bdfb07233f9571cf208e97ec..1ade309a68fe5458d37b1c1824db46d88867839a 100644
--- a/Source/core/svg/SVGAnimateMotionElement.cpp
+++ b/Source/core/svg/SVGAnimateMotionElement.cpp
@@ -70,26 +70,24 @@ bool SVGAnimateMotionElement::hasValidAttributeType()
return false;
// Spec: SVG 1.1 section 19.2.15
// FIXME: svgTag is missing. Needs to be checked, if transforming <svg> could cause problems.
- if (targetElement->hasTagName(gTag)
- || targetElement->hasTagName(defsTag)
- || targetElement->hasTagName(useTag)
- || targetElement->hasTagName(SVGNames::imageTag)
- || targetElement->hasTagName(switchTag)
- || targetElement->hasTagName(pathTag)
- || targetElement->hasTagName(rectTag)
- || targetElement->hasTagName(circleTag)
- || targetElement->hasTagName(ellipseTag)
- || targetElement->hasTagName(lineTag)
- || targetElement->hasTagName(polylineTag)
- || targetElement->hasTagName(polygonTag)
- || targetElement->hasTagName(textTag)
- || targetElement->hasTagName(clipPathTag)
- || targetElement->hasTagName(maskTag)
- || targetElement->hasTagName(SVGNames::aTag)
- || targetElement->hasTagName(foreignObjectTag)
- )
- return true;
- return false;
+ return (isSVGGElement(*targetElement)
+ || isSVGDefsElement(*targetElement)
+ || isSVGUseElement(*targetElement)
+ || isSVGImageElement(*targetElement)
+ || isSVGSwitchElement(*targetElement)
+ || isSVGPathElement(*targetElement)
+ || isSVGRectElement(*targetElement)
+ || isSVGCircleElement(*targetElement)
+ || isSVGEllipseElement(*targetElement)
+ || isSVGLineElement(*targetElement)
+ || isSVGPolylineElement(*targetElement)
+ || isSVGPolygonElement(*targetElement)
+ || isSVGTextElement(*targetElement)
+ || isSVGClipPathElement(*targetElement)
+ || isSVGMaskElement(*targetElement)
+ || isSVGAElement(*targetElement)
+ || isSVGForeignObjectElement(*targetElement)
+ );
}
bool SVGAnimateMotionElement::hasValidAttributeName()
« no previous file with comments | « Source/core/svg/SVGAnimateElement.cpp ('k') | Source/core/svg/SVGAnimationElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698