| OLD | NEW |
| 1 {% from "macros.tmpl" import license -%} | 1 {% from "macros.tmpl" import license -%} |
| 2 {{ license() }} | 2 {{ license() }} |
| 3 | 3 |
| 4 #include "config.h" | 4 #include "config.h" |
| 5 #include "{{namespace}}ElementFactory.h" | 5 #include "{{namespace}}ElementFactory.h" |
| 6 | 6 |
| 7 #include "RuntimeEnabledFeatures.h" | 7 #include "RuntimeEnabledFeatures.h" |
| 8 #include "{{namespace}}Names.h" | 8 #include "{{namespace}}Names.h" |
| 9 {%- for tag in tags|sort %} | 9 {%- for tag in tags|sort %} |
| 10 #include "core/{{namespace|lower}}/{{tag.interface}}.h" | 10 #include "core/{{namespace|lower}}/{{tag.interface}}.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 bool createdByParser) | 44 bool createdByParser) |
| 45 { | 45 { |
| 46 {%- if tag.contextConditional %} | 46 {%- if tag.contextConditional %} |
| 47 if (!ContextFeatures::{{tag.contextConditional}}Enabled(&document)) | 47 if (!ContextFeatures::{{tag.contextConditional}}Enabled(&document)) |
| 48 return {{fallback_interface}}::create(tagName, document); | 48 return {{fallback_interface}}::create(tagName, document); |
| 49 {%- endif %} | 49 {%- endif %} |
| 50 {%- if tag.runtimeEnabled %} | 50 {%- if tag.runtimeEnabled %} |
| 51 if (!RuntimeEnabledFeatures::{{tag.runtimeEnabled}}Enabled()) | 51 if (!RuntimeEnabledFeatures::{{tag.runtimeEnabled}}Enabled()) |
| 52 return {{fallback_interface}}::create(tagName, document); | 52 return {{fallback_interface}}::create(tagName, document); |
| 53 {%- endif %} | 53 {%- endif %} |
| 54 return {{tag.interface}}::create(tagName, document | 54 return {{tag.interface}}::create( |
| 55 {%- if namespace != 'HTML' or tag.multipleTagNames -%} tagName, {% endif -%} |
| 56 document |
| 55 {%- if namespace == 'HTML' and tag.constructorNeedsFormElement %}, formElement{%
endif -%} | 57 {%- if namespace == 'HTML' and tag.constructorNeedsFormElement %}, formElement{%
endif -%} |
| 56 {%- if tag.constructorNeedsCreatedByParser %}, createdByParser{% endif -%} | 58 {%- if tag.constructorNeedsCreatedByParser %}, createdByParser{% endif -%} |
| 57 ); | 59 ); |
| 58 } | 60 } |
| 59 {%- endfor %} | 61 {%- endfor %} |
| 60 | 62 |
| 61 {%- for tag in tags|sort if tag.mapToTagName %} | 63 {%- for tag in tags|sort if tag.mapToTagName %} |
| 62 static PassRefPtr<HTMLElement> {{tag|symbol}}Constructor(const QualifiedName& ta
gName, Document& document, HTMLFormElement* formElement, bool createdByParser) | 64 static PassRefPtr<HTMLElement> {{tag|symbol}}Constructor(const QualifiedName& ta
gName, Document& document, HTMLFormElement* formElement, bool createdByParser) |
| 63 { | 65 { |
| 64 return {{tag.mapToTagName}}Constructor(QualifiedName(tagName.prefix(), {{tag
.mapToTagName}}Tag.localName(), tagName.namespaceURI()), document, formElement,
createdByParser); | 66 return {{tag.mapToTagName}}Constructor(QualifiedName(tagName.prefix(), {{tag
.mapToTagName}}Tag.localName(), tagName.namespaceURI()), document, formElement,
createdByParser); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 95 | 97 |
| 96 if (!g_constructors) | 98 if (!g_constructors) |
| 97 createFunctionMap(); | 99 createFunctionMap(); |
| 98 if (ConstructorFunction function = g_constructors->get(qName.localName().imp
l())) | 100 if (ConstructorFunction function = g_constructors->get(qName.localName().imp
l())) |
| 99 return function(qName, document, {%- if namespace == 'HTML' %}formElemen
t,{% endif %} createdByParser); | 101 return function(qName, document, {%- if namespace == 'HTML' %}formElemen
t,{% endif %} createdByParser); |
| 100 | 102 |
| 101 return {{fallback_interface}}::create(qName, document); | 103 return {{fallback_interface}}::create(qName, document); |
| 102 } | 104 } |
| 103 | 105 |
| 104 } // namespace WebCore | 106 } // namespace WebCore |
| OLD | NEW |