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

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

Issue 23566016: Introduce toSVGPolygonElement(), 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 | « Source/core/rendering/svg/SVGPathData.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGPolygonElement.h
diff --git a/Source/core/svg/SVGPolygonElement.h b/Source/core/svg/SVGPolygonElement.h
index 5a2bd1dc92e5e8ab3a1d4c1e84f042aaa4c6eb8d..dfa85d7576678797a9e1dab92f851086285a6ec8 100644
--- a/Source/core/svg/SVGPolygonElement.h
+++ b/Source/core/svg/SVGPolygonElement.h
@@ -21,6 +21,7 @@
#ifndef SVGPolygonElement_h
#define SVGPolygonElement_h
+#include "SVGNames.h"
#include "core/svg/SVGPolyElement.h"
namespace WebCore {
@@ -33,6 +34,12 @@ private:
SVGPolygonElement(const QualifiedName&, Document*);
};
+inline SVGPolygonElement* toSVGPolygonElement(Node* node)
+{
+ ASSERT_WITH_SECURITY_IMPLICATION(!node || node->hasTagName(SVGNames::polygonTag));
+ return static_cast<SVGPolygonElement*>(node);
+}
+
} // namespace WebCore
#endif
« no previous file with comments | « Source/core/rendering/svg/SVGPathData.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698