| 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 25 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 {%- for tag in tags|sort if not tag.mapToTagName and not tag.noConstructor %} | 37 {%- for tag in tags|sort if not tag.mapToTagName and not tag.noConstructor %} |
| 38 static PassRefPtr<{{namespace}}Element> {{tag|symbol}}Constructor( | 38 static PassRefPtr<{{namespace}}Element> {{tag|symbol}}Constructor( |
| 39 const QualifiedName& tagName, | 39 const QualifiedName& tagName, |
| 40 Document& document, | 40 Document& document, |
| 41 {%- if namespace == 'HTML' %} | 41 {%- if namespace == 'HTML' %} |
| 42 HTMLFormElement* formElement, | 42 HTMLFormElement* formElement, |
| 43 {%- endif %} | 43 {%- endif %} |
| 44 bool createdByParser) | 44 bool createdByParser) |
| 45 { | 45 { |
| 46 {%- if tag.wrapperOnlyIfMediaIsAvailable %} | 46 {%- if tag.contextConditional %} |
| 47 Settings* settings = document.settings(); | 47 if (!ContextFeatures::{{tag.contextConditional}}Enabled(&document)) |
| 48 if (!RuntimeEnabledFeatures::mediaEnabled() || (settings && !settings->media
Enabled())) | |
| 49 return 0; | 48 return 0; |
| 50 {%- endif %} | 49 {%- endif %} |
| 51 {%- if tag.contextConditional %} | 50 {%- if tag.runtimeEnabled %} |
| 52 if (!ContextFeatures::{{tag.contextConditional}}Enabled(&document)) | 51 if (!RuntimeEnabledFeatures::{{tag.runtimeEnabled}}Enabled()) |
| 53 return 0; | 52 return 0; |
| 54 {%- endif %} | 53 {%- endif %} |
| 55 return {{tag.interface}}::create(tagName, document | 54 return {{tag.interface}}::create(tagName, document |
| 56 {%- if namespace == 'HTML' and tag.constructorNeedsFormElement %}, formElement{%
endif -%} | 55 {%- if namespace == 'HTML' and tag.constructorNeedsFormElement %}, formElement{%
endif -%} |
| 57 {%- if tag.constructorNeedsCreatedByParser %}, createdByParser{% endif -%} | 56 {%- if tag.constructorNeedsCreatedByParser %}, createdByParser{% endif -%} |
| 58 ); | 57 ); |
| 59 } | 58 } |
| 60 {%- endfor %} | 59 {%- endfor %} |
| 61 | 60 |
| 62 {%- for tag in tags|sort if tag.mapToTagName %} | 61 {%- for tag in tags|sort if tag.mapToTagName %} |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 *document, | 103 *document, |
| 105 {%- if namespace
== 'HTML' %}formElement,{% endif %} | 104 {%- if namespace
== 'HTML' %}formElement,{% endif %} |
| 106 createdByParser)
) | 105 createdByParser)
) |
| 107 return element; | 106 return element; |
| 108 } | 107 } |
| 109 | 108 |
| 110 return {{fallback_interface}}::create(qName, *document); | 109 return {{fallback_interface}}::create(qName, *document); |
| 111 } | 110 } |
| 112 | 111 |
| 113 } // namespace WebCore | 112 } // namespace WebCore |
| OLD | NEW |