| Index: Source/core/svg/SVGElement.h
|
| diff --git a/Source/core/svg/SVGElement.h b/Source/core/svg/SVGElement.h
|
| index fd95c19b67d17ea85eb5caae5ad6d3e06b47519e..47fc74e159feb5ef5930ac98ac89b6d3960503c8 100644
|
| --- a/Source/core/svg/SVGElement.h
|
| +++ b/Source/core/svg/SVGElement.h
|
| @@ -271,6 +271,18 @@ inline bool Node::hasTagName(const SVGQualifiedName& name) const
|
| return isSVGElement() && toSVGElement(*this).hasTagName(name);
|
| }
|
|
|
| +// This requires isSVG*Element(const SVGElement&).
|
| +#define DEFINE_SVGELEMENT_TYPE_CASTS_WITH_FUNCTION(thisType) \
|
| + inline bool is##thisType(const thisType* element); \
|
| + inline bool is##thisType(const thisType& element); \
|
| + inline bool is##thisType(const SVGElement* element) { return element && is##thisType(*element); } \
|
| + inline bool is##thisType(const Node& node) { return node.isSVGElement() ? is##thisType(toSVGElement(node)) : false; } \
|
| + inline bool is##thisType(const Node* node) { return node && is##thisType(*node); } \
|
| + template<typename T> inline bool is##thisType(const PassRefPtr<T>& node) { return is##thisType(node.get()); } \
|
| + template<typename T> inline bool is##thisType(const RefPtr<T>& node) { return is##thisType(node.get()); } \
|
| + template <> inline bool isElementOfType<const thisType>(const SVGElement& element) { return is##thisType(element); } \
|
| + DEFINE_ELEMENT_TYPE_CASTS_WITH_FUNCTION(thisType)
|
| +
|
| }
|
|
|
| #include "core/SVGElementTypeHelpers.h"
|
|
|