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

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

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
« no previous file with comments | « no previous file | Source/core/svg/SVGAnimateElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGAnimateElement.h
diff --git a/Source/core/svg/SVGAnimateElement.h b/Source/core/svg/SVGAnimateElement.h
index d9873744a7c09e540994213809c696a7780b2616..f53a5bbe10e1740c3af5e82daef1f0c75ef463b3 100644
--- a/Source/core/svg/SVGAnimateElement.h
+++ b/Source/core/svg/SVGAnimateElement.h
@@ -23,6 +23,7 @@
#ifndef SVGAnimateElement_h
#define SVGAnimateElement_h
+#include "SVGNames.h"
#include "core/svg/SVGAnimationElement.h"
#include "wtf/OwnPtr.h"
@@ -73,6 +74,16 @@ private:
OwnPtr<SVGAnimatedTypeAnimator> m_animator;
};
+inline SVGAnimateElement* toSVGAnimateElement(Element* element)
+{
+ ASSERT_WITH_SECURITY_IMPLICATION(!element
+ || element->hasTagName(SVGNames::animateTag)
+ || element->hasTagName(SVGNames::animateColorTag)
+ || element->hasTagName(SVGNames::animateTransformTag)
+ || element->hasTagName(SVGNames::setTag));
+ return static_cast<SVGAnimateElement*>(element);
+}
+
} // namespace WebCore
#endif // SVGAnimateElement_h
« no previous file with comments | « no previous file | Source/core/svg/SVGAnimateElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698