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 | 5 |
6 #include "{{namespace}}Names.h" | 6 #include "{{namespace}}Names.h" |
7 | 7 |
8 #include "wtf/StaticConstructors.h" | 8 #include "wtf/StaticConstructors.h" |
9 | 9 |
10 namespace blink { | 10 namespace blink { |
11 namespace {{namespace}}Names { | 11 namespace {{namespace}}Names { |
12 | 12 |
13 using namespace blink; | 13 using namespace blink; |
14 | 14 |
15 DEFINE_GLOBAL(AtomicString, {{namespace_prefix}}NamespaceURI) | 15 DEFINE_GLOBAL(AtomicString, {{namespace_prefix}}NamespaceURI) |
16 | 16 |
17 {% if tags %} | 17 {% if tags %} |
18 // Tags | 18 // Tags |
19 {% for tag in tags|sort %} | 19 {% for tag in tags|sort %} |
20 DEFINE_GLOBAL({{namespace}}QualifiedName, {{tag|symbol}}Tag) | 20 DEFINE_GLOBAL({{namespace}}QualifiedName, {{tag|symbol}}Tag) |
21 {% endfor %} | 21 {% endfor %} |
22 | 22 |
23 | 23 |
24 {% if namespace != 'HTML' %} | 24 {% if namespace == 'SVG' %} |
25 PassOwnPtr<const {{namespace}}QualifiedName*[]> get{{namespace}}Tags() | 25 PassOwnPtr<const {{namespace}}QualifiedName*[]> get{{namespace}}Tags() |
26 { | 26 { |
27 OwnPtr<const {{namespace}}QualifiedName*[]> tags = adoptArrayPtr(new const {
{namespace}}QualifiedName*[{{namespace}}TagsCount]); | 27 OwnPtr<const {{namespace}}QualifiedName*[]> tags = adoptArrayPtr(new const {
{namespace}}QualifiedName*[{{namespace}}TagsCount]); |
28 {% for tag in tags|sort %} | 28 {% for tag in tags|sort %} |
29 tags[{{loop.index0}}] = reinterpret_cast<const {{namespace}}QualifiedName*>(
&{{tag|symbol}}Tag); | 29 tags[{{loop.index0}}] = reinterpret_cast<const {{namespace}}QualifiedName*>(
&{{tag|symbol}}Tag); |
30 {% endfor %} | 30 {% endfor %} |
31 return tags.release(); | 31 return tags.release(); |
32 } | 32 } |
33 {% endif %} | 33 {% endif %} |
34 | 34 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 {% if use_namespace_for_attrs %} | 71 {% if use_namespace_for_attrs %} |
72 QualifiedName::createStatic((void*)&{{attr|symbol}}Attr, {{attr|symbol}}Impl
, {{namespace_prefix}}NS); | 72 QualifiedName::createStatic((void*)&{{attr|symbol}}Attr, {{attr|symbol}}Impl
, {{namespace_prefix}}NS); |
73 {% else %} | 73 {% else %} |
74 QualifiedName::createStatic((void*)&{{attr|symbol}}Attr, {{attr|symbol}}Impl
); | 74 QualifiedName::createStatic((void*)&{{attr|symbol}}Attr, {{attr|symbol}}Impl
); |
75 {% endif %} | 75 {% endif %} |
76 {% endfor %} | 76 {% endfor %} |
77 } | 77 } |
78 | 78 |
79 } // {{namespace}} | 79 } // {{namespace}} |
80 } // namespace blink | 80 } // namespace blink |
OLD | NEW |