| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 | 74 |
| 75 PassRefPtr<{{namespace}}Element> {{namespace}}ElementFactory::create{{namespace}
}Element( | 75 PassRefPtr<{{namespace}}Element> {{namespace}}ElementFactory::create{{namespace}
}Element( |
| 76 const AtomicString& localName, | 76 const AtomicString& localName, |
| 77 Document& document, | 77 Document& document, |
| 78 {%- if namespace == 'HTML' %} | 78 {%- if namespace == 'HTML' %} |
| 79 HTMLFormElement* formElement, | 79 HTMLFormElement* formElement, |
| 80 {%- endif %} | 80 {%- endif %} |
| 81 bool createdByParser) | 81 bool createdByParser) |
| 82 { | 82 { |
| 83 if (CustomElement::isValidName(localName) && document.registrationContext())
{ | 83 if (CustomElement::isValidName(localName) && document.registrationContext())
{ |
| 84 RefPtr<Element> element = document.registrationContext()->createCustomTa
gElement(document, QualifiedName(nullAtom, localName, {{namespace_prefix}}Namesp
aceURI), createdByParser ? CustomElementRegistrationContext::CreatedByParser : C
ustomElementRegistrationContext::NotCreatedByParser); | 84 RefPtr<Element> element = document.registrationContext()->createCustomTa
gElement(document, QualifiedName(nullAtom, localName, {{namespace_prefix}}Namesp
aceURI)); |
| 85 ASSERT_WITH_SECURITY_IMPLICATION(element->is{{namespace}}Element()); | 85 ASSERT_WITH_SECURITY_IMPLICATION(element->is{{namespace}}Element()); |
| 86 return static_pointer_cast<{{namespace}}Element>(element.release()); | 86 return static_pointer_cast<{{namespace}}Element>(element.release()); |
| 87 } | 87 } |
| 88 | 88 |
| 89 if (!g_constructors) | 89 if (!g_constructors) |
| 90 createFunctionMap(); | 90 createFunctionMap(); |
| 91 if (ConstructorFunction function = g_constructors->get(localName)) | 91 if (ConstructorFunction function = g_constructors->get(localName)) |
| 92 return function(document, {%- if namespace == 'HTML' %}formElement,{% en
dif %} createdByParser); | 92 return function(document, {%- if namespace == 'HTML' %}formElement,{% en
dif %} createdByParser); |
| 93 | 93 |
| 94 return {{fallback_interface}}::create(QualifiedName(nullAtom, localName, {{n
amespace_prefix}}NamespaceURI), document); | 94 return {{fallback_interface}}::create(QualifiedName(nullAtom, localName, {{n
amespace_prefix}}NamespaceURI), document); |
| 95 } | 95 } |
| 96 | 96 |
| 97 } // namespace WebCore | 97 } // namespace WebCore |
| OLD | NEW |