Index: Source/core/svg/SVGSVGElement.h |
diff --git a/Source/core/svg/SVGSVGElement.h b/Source/core/svg/SVGSVGElement.h |
index aa9d45ac133f64fda3404dbcb7d01b4967a70e88..65f8c69c30ee74e4db43591f4d6ffa60021a5c97 100644 |
--- a/Source/core/svg/SVGSVGElement.h |
+++ b/Source/core/svg/SVGSVGElement.h |
@@ -180,17 +180,12 @@ private: |
WeakPtrFactory<SVGSVGElement> m_weakFactory; |
}; |
-inline SVGSVGElement* toSVGSVGElement(Node* node) |
+inline bool isSVGSVGElement(const Node& node) |
{ |
- ASSERT_WITH_SECURITY_IMPLICATION(!node || toSVGElement(node)->isSVGSVGElement()); |
- return static_cast<SVGSVGElement*>(node); |
+ return node.isSVGElement() && toSVGElement(node).isSVGSVGElement(); |
} |
-inline const SVGSVGElement* toSVGSVGElement(const Node* node) |
-{ |
- ASSERT_WITH_SECURITY_IMPLICATION(!node || toSVGElement(node)->isSVGSVGElement()); |
- return static_cast<const SVGSVGElement*>(node); |
-} |
+DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(SVGSVGElement); |
} // namespace WebCore |