| 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 "{{namespace}}Names.h" | 7 #include "{{namespace}}Names.h" |
| 8 {% for tag in tags|sort %} | 8 {% for tag in tags|sort %} |
| 9 #include "core/{{namespace|lower}}/{{tag.interface}}.h" | 9 #include "core/{{namespace|lower}}/{{tag.interface}}.h" |
| 10 {% endfor %} | 10 {% endfor %} |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 PassRefPtr<{{namespace}}Element> {{namespace}}ElementFactory::create{{namespace}
}Element( | 74 PassRefPtr<{{namespace}}Element> {{namespace}}ElementFactory::create{{namespace}
}Element( |
| 75 const AtomicString& localName, | 75 const AtomicString& localName, |
| 76 Document& document, | 76 Document& document, |
| 77 bool createdByParser) | 77 bool createdByParser) |
| 78 { | 78 { |
| 79 if (!g_constructors) | 79 if (!g_constructors) |
| 80 create{{namespace}}FunctionMap(); | 80 create{{namespace}}FunctionMap(); |
| 81 if (ConstructorFunction function = g_constructors->get(localName)) | 81 if (ConstructorFunction function = g_constructors->get(localName)) |
| 82 return function(document, createdByParser); | 82 return function(document, createdByParser); |
| 83 | 83 |
| 84 if (document.registrationContext() && CustomElement::isValidName(localName))
{ | 84 if (CustomElement::isValidName(localName)) { |
| 85 RefPtr<Element> element = document.registrationContext()->createCustomTa
gElement(document, QualifiedName(localName)); | 85 RefPtr<Element> element = document.registrationContext().createCustomTag
Element(document, QualifiedName(localName)); |
| 86 ASSERT_WITH_SECURITY_IMPLICATION(element->is{{namespace}}Element()); | 86 ASSERT_WITH_SECURITY_IMPLICATION(element->is{{namespace}}Element()); |
| 87 return static_pointer_cast<{{namespace}}Element>(element.release()); | 87 return static_pointer_cast<{{namespace}}Element>(element.release()); |
| 88 } | 88 } |
| 89 | 89 |
| 90 return {{fallback_interface}}::create(QualifiedName(localName), document); | 90 return {{fallback_interface}}::create(QualifiedName(localName), document); |
| 91 } | 91 } |
| 92 | 92 |
| 93 } // namespace blink | 93 } // namespace blink |
| OLD | NEW |