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

Side by Side Diff: Source/build/scripts/templates/MakeQualifiedNames.h.tmpl

Issue 137783012: MakeQualifiedNames should generate lazily created arrays for attributes and tags. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 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
OLDNEW
1 {% from "macros.tmpl" import license -%} 1 {% from "macros.tmpl" import license -%}
2 {{ license() }} 2 {{ license() }}
3 3
4 #ifndef {{namespace}}Names_h 4 #ifndef {{namespace}}Names_h
5 #define {{namespace}}Names_h 5 #define {{namespace}}Names_h
6 6
7 #include "core/dom/QualifiedName.h" 7 #include "core/dom/QualifiedName.h"
8 8
9 namespace WebCore { 9 namespace WebCore {
10 namespace {{namespace}}Names { 10 namespace {{namespace}}Names {
11 11
12 #ifndef {{namespace|to_macro_style}}_NAMES_HIDE_GLOBALS 12 #ifndef {{namespace|to_macro_style}}_NAMES_HIDE_GLOBALS
13 // Namespace 13 // Namespace
14 extern const WTF::AtomicString {{namespace_prefix}}NamespaceURI; 14 extern const WTF::AtomicString {{namespace_prefix}}NamespaceURI;
15 15
16 // Tags 16 // Tags
17 {%- for tag in tags|sort %} 17 {%- for tag in tags|sort %}
18 extern const WebCore::QualifiedName {{tag|symbol}}Tag; 18 extern const WebCore::QualifiedName {{tag|symbol}}Tag;
19 {%- endfor %} 19 {%- endfor %}
20 20
21 // Attributes 21 // Attributes
22 {%- for attr in attrs|sort %} 22 {%- for attr in attrs|sort %}
23 extern const WebCore::QualifiedName {{attr|symbol}}Attr; 23 extern const WebCore::QualifiedName {{attr|symbol}}Attr;
24 {%- endfor %} 24 {%- endfor %}
25 25
26 #endif // {{namespace|to_macro_style}}_NAMES_HIDE_GLOBALS 26 #endif // {{namespace|to_macro_style}}_NAMES_HIDE_GLOBALS
27 27
28 {%- if tags %} 28 {%- if tags %}
29 const unsigned {{namespace}}TagsCount = {{tags|count}}; 29 const unsigned {{namespace}}TagsCount = {{tags|count}};
30 const WebCore::QualifiedName* const* get{{namespace}}Tags(); 30 void get{{namespace}}Tags(WebCore::QualifiedName* tags[], unsigned length);
Inactive 2014/01/15 19:27:02 Passing the length here is a bit odd. Maybe, we ca
31 {%- endif %} 31 {%- endif %}
32 const unsigned {{namespace}}AttrsCount = {{attrs|count}}; 32 const unsigned {{namespace}}AttrsCount = {{attrs|count}};
33 const WebCore::QualifiedName* const* get{{namespace}}Attrs(); 33 void get{{namespace}}Attrs(WebCore::QualifiedName* attributes[], unsigned length );
34 34
35 void init(); 35 void init();
36 36
37 } // {{namespace}}Names 37 } // {{namespace}}Names
38 } // WebCore 38 } // WebCore
39 39
40 #endif 40 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698