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

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

Issue 638663002: Write out unique includes in element factories (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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 | no next file » | 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 "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|groupby('interface') %}
9 #include "core/{{namespace|lower}}/{{tag.interface}}.h" 9 #include "core/{{namespace|lower}}/{{tag[0]}}.h"
10 {% endfor %} 10 {% endfor %}
11 {% if fallback_interface %} 11 {% if fallback_interface %}
12 #include "core/{{namespace|lower}}/{{fallback_interface}}.h" 12 #include "core/{{namespace|lower}}/{{fallback_interface}}.h"
13 {% endif %} 13 {% endif %}
14 #include "core/dom/custom/CustomElement.h" 14 #include "core/dom/custom/CustomElement.h"
15 #include "core/dom/custom/CustomElementRegistrationContext.h" 15 #include "core/dom/custom/CustomElementRegistrationContext.h"
16 #include "core/dom/Document.h" 16 #include "core/dom/Document.h"
17 #include "core/frame/Settings.h" 17 #include "core/frame/Settings.h"
18 #include "platform/RuntimeEnabledFeatures.h" 18 #include "platform/RuntimeEnabledFeatures.h"
19 #include "wtf/HashMap.h" 19 #include "wtf/HashMap.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 if (document.registrationContext() && CustomElement::isValidName(localName)) { 94 if (document.registrationContext() && CustomElement::isValidName(localName)) {
95 RefPtrWillBeRawPtr<Element> element = document.registrationContext()->cr eateCustomTagElement(document, QualifiedName(nullAtom, localName, {{namespace_pr efix}}NamespaceURI)); 95 RefPtrWillBeRawPtr<Element> element = document.registrationContext()->cr eateCustomTagElement(document, QualifiedName(nullAtom, localName, {{namespace_pr efix}}NamespaceURI));
96 ASSERT_WITH_SECURITY_IMPLICATION(element->is{{namespace}}Element()); 96 ASSERT_WITH_SECURITY_IMPLICATION(element->is{{namespace}}Element());
97 return static_pointer_cast<{{namespace}}Element>(element.release()); 97 return static_pointer_cast<{{namespace}}Element>(element.release());
98 } 98 }
99 99
100 return {{fallback_interface}}::create(QualifiedName(nullAtom, localName, {{n amespace_prefix}}NamespaceURI), document); 100 return {{fallback_interface}}::create(QualifiedName(nullAtom, localName, {{n amespace_prefix}}NamespaceURI), document);
101 } 101 }
102 102
103 } // namespace blink 103 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698