OLD | NEW |
1 {% from "macros.tmpl" import license %} | 1 {% from "macros.tmpl" import license %} |
2 {{ license() }} | 2 {{ license() }} |
3 | 3 |
4 #ifndef {{namespace}}ElementTypeHelpers_h | 4 #ifndef {{namespace}}ElementTypeHelpers_h |
5 #define {{namespace}}ElementTypeHelpers_h | 5 #define {{namespace}}ElementTypeHelpers_h |
6 | 6 |
7 #include "core/dom/ContextFeatures.h" | 7 #include "core/dom/ContextFeatures.h" |
8 #include "core/dom/Element.h" | 8 #include "core/dom/Element.h" |
9 #include "{{namespace}}Names.h" | 9 #include "{{namespace}}Names.h" |
10 #include "RuntimeEnabledFeatures.h" | 10 #include "platform/RuntimeEnabledFeatures.h" |
11 | 11 |
12 namespace WebCore { | 12 namespace WebCore { |
13 // Type checking. | 13 // Type checking. |
14 {% for tag in tags|sort if not tag.multipleTagNames and not tag.noTypeHelpers %} | 14 {% for tag in tags|sort if not tag.multipleTagNames and not tag.noTypeHelpers %} |
15 {% filter enable_conditional(tag.Conditional) %} | 15 {% filter enable_conditional(tag.Conditional) %} |
16 class {{tag.interface}}; | 16 class {{tag.interface}}; |
17 void is{{tag.interface}}(const {{tag.interface}}&); // Catch unnecessary runtime
check of type known at compile time. | 17 void is{{tag.interface}}(const {{tag.interface}}&); // Catch unnecessary runtime
check of type known at compile time. |
18 void is{{tag.interface}}(const {{tag.interface}}*); // Catch unnecessary runtime
check of type known at compile time. | 18 void is{{tag.interface}}(const {{tag.interface}}*); // Catch unnecessary runtime
check of type known at compile time. |
19 | 19 |
20 {# For HTML Elements, call hasLocalName() instead of hasTagName() to avoid check
ing the namespace unnecessarily #} | 20 {# For HTML Elements, call hasLocalName() instead of hasTagName() to avoid check
ing the namespace unnecessarily #} |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 // casting functions above. reinterpret_cast would be unsafe due to multiple inh
eritence. | 58 // casting functions above. reinterpret_cast would be unsafe due to multiple inh
eritence. |
59 | 59 |
60 {% for tag in tags|sort if not tag.multipleTagNames and not tag.noTypeHelpers %} | 60 {% for tag in tags|sort if not tag.multipleTagNames and not tag.noTypeHelpers %} |
61 {% filter enable_conditional(tag.Conditional) %} | 61 {% filter enable_conditional(tag.Conditional) %} |
62 #define to{{tag.interface}}(x) WebCore::toElement<WebCore::{{tag.interface}}>(x) | 62 #define to{{tag.interface}}(x) WebCore::toElement<WebCore::{{tag.interface}}>(x) |
63 {% endfilter %} | 63 {% endfilter %} |
64 {% endfor %} | 64 {% endfor %} |
65 } // WebCore | 65 } // WebCore |
66 | 66 |
67 #endif | 67 #endif |
OLD | NEW |