| 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 %} |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 Document& document, | 37 Document& document, |
| 38 CreateElementFlags flags) { | 38 CreateElementFlags flags) { |
| 39 {% if tag.runtimeEnabled %} | 39 {% if tag.runtimeEnabled %} |
| 40 if (!RuntimeEnabledFeatures::{{tag.runtimeEnabled}}Enabled()) | 40 if (!RuntimeEnabledFeatures::{{tag.runtimeEnabled}}Enabled()) |
| 41 return {{fallback_interface}}::create({{tag|symbol}}Tag, document); | 41 return {{fallback_interface}}::create({{tag|symbol}}Tag, document); |
| 42 {% endif %} | 42 {% endif %} |
| 43 return {{tag.interface}}::create( | 43 return {{tag.interface}}::create( |
| 44 {%- if tag.multipleTagNames %}{{tag|symbol}}Tag, {% endif -%} | 44 {%- if tag.multipleTagNames %}{{tag|symbol}}Tag, {% endif -%} |
| 45 document | 45 document |
| 46 {%- if tag.constructorNeedsCreatedByParser %}, flags & CreatedByParser{% e
ndif -%} | 46 {%- if tag.constructorNeedsCreatedByParser %}, flags & CreatedByParser{% e
ndif -%} |
| 47 {%- if tag.constructorNeedsCreatedByFragmentParser %}, (flags & CreatedByF
ragmentParser) == CreatedByFragmentParser{% endif -%} |
| 47 ); | 48 ); |
| 48 } | 49 } |
| 49 {% endfor %} | 50 {% endfor %} |
| 50 | 51 |
| 51 struct Create{{namespace}}FunctionMapData { | 52 struct Create{{namespace}}FunctionMapData { |
| 52 const QualifiedName& tag; | 53 const QualifiedName& tag; |
| 53 ConstructorFunction func; | 54 ConstructorFunction func; |
| 54 }; | 55 }; |
| 55 | 56 |
| 56 static void create{{namespace}}FunctionMap() { | 57 static void create{{namespace}}FunctionMap() { |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 Element* element = document.registrationContext()->createCustomTagElement( | 96 Element* element = document.registrationContext()->createCustomTagElement( |
| 96 document, QualifiedName(nullAtom, localName, {{namespace_prefix}}Namespa
ceURI)); | 97 document, QualifiedName(nullAtom, localName, {{namespace_prefix}}Namespa
ceURI)); |
| 97 SECURITY_DCHECK(element->is{{namespace}}Element()); | 98 SECURITY_DCHECK(element->is{{namespace}}Element()); |
| 98 return to{{namespace}}Element(element); | 99 return to{{namespace}}Element(element); |
| 99 } | 100 } |
| 100 | 101 |
| 101 return {{fallback_interface}}::create(QualifiedName(nullAtom, localName, {{nam
espace_prefix}}NamespaceURI), document); | 102 return {{fallback_interface}}::create(QualifiedName(nullAtom, localName, {{nam
espace_prefix}}NamespaceURI), document); |
| 102 } | 103 } |
| 103 | 104 |
| 104 } // namespace blink | 105 } // namespace blink |
| OLD | NEW |