| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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( | 54 return {{tag.interface}}::create( |
| 55 {%- if namespace != 'HTML' or tag.multipleTagNames -%} tagName, {% endif -%} | 55 {%- if tag.multipleTagNames -%} tagName, {% endif -%} |
| 56 document | 56 document |
| 57 {%- if namespace == 'HTML' and tag.constructorNeedsFormElement %}, formElement{%
endif -%} | 57 {%- if namespace == 'HTML' and tag.constructorNeedsFormElement %}, formElement{%
endif -%} |
| 58 {%- if tag.constructorNeedsCreatedByParser %}, createdByParser{% endif -%} | 58 {%- if tag.constructorNeedsCreatedByParser %}, createdByParser{% endif -%} |
| 59 ); | 59 ); |
| 60 } | 60 } |
| 61 {%- endfor %} | 61 {%- endfor %} |
| 62 | 62 |
| 63 static void addTag(const QualifiedName& tag, ConstructorFunction func) | 63 static void addTag(const QualifiedName& tag, ConstructorFunction func) |
| 64 { | 64 { |
| 65 g_constructors->set(tag.localName().impl(), func); | 65 g_constructors->set(tag.localName().impl(), func); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 90 | 90 |
| 91 if (!g_constructors) | 91 if (!g_constructors) |
| 92 createFunctionMap(); | 92 createFunctionMap(); |
| 93 if (ConstructorFunction function = g_constructors->get(qName.localName().imp
l())) | 93 if (ConstructorFunction function = g_constructors->get(qName.localName().imp
l())) |
| 94 return function(qName, document, {%- if namespace == 'HTML' %}formElemen
t,{% endif %} createdByParser); | 94 return function(qName, document, {%- if namespace == 'HTML' %}formElemen
t,{% endif %} createdByParser); |
| 95 | 95 |
| 96 return {{fallback_interface}}::create(qName, document); | 96 return {{fallback_interface}}::create(qName, document); |
| 97 } | 97 } |
| 98 | 98 |
| 99 } // namespace WebCore | 99 } // namespace WebCore |
| OLD | NEW |