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 91758aa6e889d33a584bb2efb6a3ad4de8dc5967..44fabd26fff88cabf286da7977e60365941a8549 100644 |
--- a/Source/build/scripts/templates/ElementTypeHelpers.h.tmpl |
+++ b/Source/build/scripts/templates/ElementTypeHelpers.h.tmpl |
@@ -11,7 +11,7 @@ |
namespace WebCore { |
// Type checking. |
-{% for tag in tags|sort if not tag.multipleTagNames %} |
+{% for tag in tags|sort if not tag.multipleTagNames and not tag.noTypeHelpers %} |
class {{tag.interface}}; |
void is{{tag.interface}}(const {{tag.interface}}&); // Catch unnecessary runtime check of type known at compile time. |
void is{{tag.interface}}(const {{tag.interface}}*); // Catch unnecessary runtime check of type known at compile time. |
@@ -24,7 +24,7 @@ inline bool is{{tag.interface}}(const Element& element) { |
if (!RuntimeEnabledFeatures::{{tag.runtimeEnabled}}Enabled()) |
return false; |
{%- endif %} |
- return element.hasTagName({{namespace}}Names::{{tag.name}}Tag); |
+ return element.hasTagName({{namespace}}Names::{{tag|symbol}}Tag); |
} |
inline bool is{{tag.interface}}(const Element* element) { ASSERT(element); return is{{tag.interface}}(*element); } |
inline bool is{{tag.interface}}(const Node& node) { return node.isElementNode() ? is{{tag.interface}}(toElement(node)) : false; } |
@@ -34,7 +34,7 @@ template <> inline bool isElementOfType<const {{tag.interface}}>(const Element& |
// Using macros because the types are forward-declared and we don't want to use reinterpret_cast in the |
// casting functions above. reinterpret_cast would be unsafe due to multiple inheritence. |
-{% for tag in tags|sort if not tag.multipleTagNames %} |
+{% for tag in tags|sort if not tag.multipleTagNames and not tag.noTypeHelpers %} |
#define to{{tag.interface}}(x) WebCore::toElement<WebCore::{{tag.interface}}>(x) |
{% endfor %} |
} // WebCore |