OLD | NEW |
1 {% from "macros.tmpl" import license %} | 1 {% from "macros.tmpl" import license %} |
2 {{ license() }} | 2 {{ license() }} |
3 | 3 |
4 #include "{{namespace}}ElementFactory.h" | 4 #include "{{namespace}}ElementFactory.h" |
5 | 5 |
6 #include "{{namespace}}Names.h" | 6 #include "{{namespace}}Names.h" |
7 {% for tag in tags|groupby('interface') %} | 7 {% for tag in tags|groupby('interface') %} |
8 #include "core/{{namespace|lower}}/{{tag[0]}}.h" | 8 #include "core/{{namespace|lower}}/{{tag[0]}}.h" |
9 {% endfor %} | 9 {% endfor %} |
10 {% if fallback_interface %} | 10 {% if fallback_interface %} |
11 #include "core/{{namespace|lower}}/{{fallback_interface}}.h" | 11 #include "core/{{namespace|lower}}/{{fallback_interface}}.h" |
12 {% endif %} | 12 {% endif %} |
13 {% if namespace == 'HTML' %} | 13 {% if namespace == 'HTML' %} |
14 #include "core/dom/custom/CustomElement.h" | 14 #include "core/dom/custom/CustomElement.h" |
15 {% endif %} | 15 {% endif %} |
16 #include "core/dom/custom/V0CustomElement.h" | 16 #include "core/dom/custom/V0CustomElement.h" |
17 #include "core/dom/custom/V0CustomElementRegistrationContext.h" | 17 #include "core/dom/custom/V0CustomElementRegistrationContext.h" |
18 #include "core/dom/Document.h" | 18 #include "core/dom/Document.h" |
19 #include "core/frame/Settings.h" | 19 #include "core/frame/Settings.h" |
20 #include "platform/RuntimeEnabledFeatures.h" | 20 #include "platform/RuntimeEnabledFeatures.h" |
21 #include "wtf/HashMap.h" | 21 #include "platform/wtf/HashMap.h" |
22 | 22 |
23 namespace blink { | 23 namespace blink { |
24 | 24 |
25 using namespace {{namespace}}Names; | 25 using namespace {{namespace}}Names; |
26 | 26 |
27 typedef {{namespace}}Element* (*ConstructorFunction)( | 27 typedef {{namespace}}Element* (*ConstructorFunction)( |
28 Document&, | 28 Document&, |
29 CreateElementFlags); | 29 CreateElementFlags); |
30 | 30 |
31 typedef HashMap<AtomicString, ConstructorFunction> FunctionMap; | 31 typedef HashMap<AtomicString, ConstructorFunction> FunctionMap; |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 Element* element = document.RegistrationContext()->CreateCustomTagElement( | 95 Element* element = document.RegistrationContext()->CreateCustomTagElement( |
96 document, QualifiedName(g_null_atom, localName, {{namespace_prefix}}Name
spaceURI)); | 96 document, QualifiedName(g_null_atom, localName, {{namespace_prefix}}Name
spaceURI)); |
97 SECURITY_DCHECK(element->Is{{namespace}}Element()); | 97 SECURITY_DCHECK(element->Is{{namespace}}Element()); |
98 return To{{namespace}}Element(element); | 98 return To{{namespace}}Element(element); |
99 } | 99 } |
100 | 100 |
101 return {{fallback_interface}}::Create(QualifiedName(g_null_atom, localName, {{
namespace_prefix}}NamespaceURI), document); | 101 return {{fallback_interface}}::Create(QualifiedName(g_null_atom, localName, {{
namespace_prefix}}NamespaceURI), document); |
102 } | 102 } |
103 | 103 |
104 } // namespace blink | 104 } // namespace blink |
OLD | NEW |