Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: third_party/WebKit/Source/build/scripts/templates/ElementFactory.cpp.tmpl

Issue 2258023003: Remove first argument for shoudCreateCustomElement() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 {% from "macros.tmpl" import license %} 1 {% from "macros.tmpl" import license %}
2 {{ license() }} 2 {{ license() }}
3 3
4 #include "{{namespace}}ElementFactory.h" 4 #include "{{namespace}}ElementFactory.h"
5 5
6 #include "{{namespace}}Names.h" 6 #include "{{namespace}}Names.h"
7 {% for tag in tags|groupby('interface') %} 7 {% for tag in tags|groupby('interface') %}
8 #include "core/{{namespace|lower}}/{{tag[0]}}.h" 8 #include "core/{{namespace|lower}}/{{tag[0]}}.h"
9 {% endfor %} 9 {% endfor %}
10 {% if fallback_interface %} 10 {% if fallback_interface %}
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 HTMLFormElement* formElement, 83 HTMLFormElement* formElement,
84 {% endif %} 84 {% endif %}
85 CreateElementFlags flags) 85 CreateElementFlags flags)
86 { 86 {
87 if (!g_constructors) 87 if (!g_constructors)
88 create{{namespace}}FunctionMap(); 88 create{{namespace}}FunctionMap();
89 if (ConstructorFunction function = g_constructors->get(localName)) 89 if (ConstructorFunction function = g_constructors->get(localName))
90 return function(document, {% if namespace == 'HTML' %}formElement, {% en dif %}flags); 90 return function(document, {% if namespace == 'HTML' %}formElement, {% en dif %}flags);
91 91
92 {% if namespace == 'HTML' %} 92 {% if namespace == 'HTML' %}
93 if (CustomElement::shouldCreateCustomElement(document, localName)) { 93 if (CustomElement::shouldCreateCustomElement(localName)) {
94 QualifiedName tagName(nullAtom, localName, HTMLNames::xhtmlNamespaceURI) ; 94 QualifiedName tagName(nullAtom, localName, HTMLNames::xhtmlNamespaceURI) ;
95 if (flags & AsynchronousCustomElements) 95 if (flags & AsynchronousCustomElements)
96 return CustomElement::createCustomElementAsync(document, tagName); 96 return CustomElement::createCustomElementAsync(document, tagName);
97 return CustomElement::createCustomElementSync(document, tagName); 97 return CustomElement::createCustomElementSync(document, tagName);
98 } 98 }
99 {% endif %} 99 {% endif %}
100 100
101 if (document.registrationContext() && V0CustomElement::isValidName(localName )) { 101 if (document.registrationContext() && V0CustomElement::isValidName(localName )) {
102 Element* element = document.registrationContext()->createCustomTagElemen t(document, QualifiedName(nullAtom, localName, {{namespace_prefix}}NamespaceURI) ); 102 Element* element = document.registrationContext()->createCustomTagElemen t(document, QualifiedName(nullAtom, localName, {{namespace_prefix}}NamespaceURI) );
103 ASSERT_WITH_SECURITY_IMPLICATION(element->is{{namespace}}Element()); 103 ASSERT_WITH_SECURITY_IMPLICATION(element->is{{namespace}}Element());
104 return to{{namespace}}Element(element); 104 return to{{namespace}}Element(element);
105 } 105 }
106 106
107 return {{fallback_interface}}::create(QualifiedName(nullAtom, localName, {{n amespace_prefix}}NamespaceURI), document); 107 return {{fallback_interface}}::create(QualifiedName(nullAtom, localName, {{n amespace_prefix}}NamespaceURI), document);
108 } 108 }
109 109
110 } // namespace blink 110 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698