Index: Source/build/scripts/templates/ElementTypeHelpers.h.tmpl |
diff --git a/Source/build/scripts/templates/ElementTypeHelpers.h.tmpl b/Source/build/scripts/templates/ElementTypeHelpers.h.tmpl |
index f4c6b20cf3ec1d23c360cb4e3d8f95bb4f927e2f..e4b9fab6d67522b34089e48893b9e76fef01c17c 100644 |
--- a/Source/build/scripts/templates/ElementTypeHelpers.h.tmpl |
+++ b/Source/build/scripts/templates/ElementTypeHelpers.h.tmpl |
@@ -27,6 +27,8 @@ inline bool is{{tag.interface}}(const Element& element) { |
return element.hasTagName({{namespace}}Names::{{tag|symbol}}Tag); |
} |
inline bool is{{tag.interface}}(const Element* element) { return element && is{{tag.interface}}(*element); } |
+template<typename T> inline bool is{{tag.interface}}(const PassRefPtr<T>& node) { return is{{tag.interface}}(node.get()); } |
Inactive
2014/03/10 21:42:16
Overloading seems to work here so I did that inste
adamk
2014/03/11 21:40:26
Okay, if this works properly it lgtm.
|
+template<typename T> inline bool is{{tag.interface}}(const RefPtr<T>& node) { return is{{tag.interface}}(node.get()); } |
inline bool is{{tag.interface}}(const Node& node) { return node.isElementNode() ? is{{tag.interface}}(toElement(node)) : false; } |
inline bool is{{tag.interface}}(const Node* node) { return node && node->isElementNode() ? is{{tag.interface}}(*toElement(node)) : false; } |
template <> inline bool isElementOfType<const {{tag.interface}}>(const Element& element) { return is{{tag.interface}}(element); } |