Chromium Code Reviews| Index: third_party/WebKit/Source/build/scripts/templates/ElementFactory.cpp.tmpl |
| diff --git a/third_party/WebKit/Source/build/scripts/templates/ElementFactory.cpp.tmpl b/third_party/WebKit/Source/build/scripts/templates/ElementFactory.cpp.tmpl |
| index d9715a1e575fde344ff0aeb56a84700117251489..d9c20acffca56d601bc05c2f70515765ef97d040 100644 |
| --- a/third_party/WebKit/Source/build/scripts/templates/ElementFactory.cpp.tmpl |
| +++ b/third_party/WebKit/Source/build/scripts/templates/ElementFactory.cpp.tmpl |
| @@ -10,6 +10,9 @@ |
| {% if fallback_interface %} |
| #include "core/{{namespace|lower}}/{{fallback_interface}}.h" |
| {% endif %} |
| +{% if namespace == 'HTML' %} |
| +#include "core/dom/custom/CustomElement.h" |
| +{% endif %} |
| #include "core/dom/custom/V0CustomElement.h" |
| #include "core/dom/custom/V0CustomElementRegistrationContext.h" |
| #include "core/dom/Document.h" |
| @@ -86,6 +89,11 @@ static void create{{namespace}}FunctionMap() |
| if (ConstructorFunction function = g_constructors->get(localName)) |
| return function(document, {% if namespace == 'HTML' %}formElement, {% endif %}createdByParser); |
| + {% if namespace == 'HTML' %} |
| + if (CustomElement::shouldCreateCustomElement(document, localName)) |
|
dominicc (has gone to gerrit)
2016/05/25 05:25:52
:/ this might do things with v0 where they did not
kojii
2016/05/25 05:58:24
Not sure if I understand correctly, but if you're
|
| + return CustomElement::createCustomElement(document, localName); |
| + {% endif %} |
| + |
| if (document.registrationContext() && V0CustomElement::isValidName(localName)) { |
| Element* element = document.registrationContext()->createCustomTagElement(document, QualifiedName(nullAtom, localName, {{namespace_prefix}}NamespaceURI)); |
| ASSERT_WITH_SECURITY_IMPLICATION(element->is{{namespace}}Element()); |