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

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

Issue 406843002: Optimize hasTagName when called on an HTMLElement / SVGElement (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
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 5
6 #ifdef SKIP_STATIC_CONSTRUCTORS_ON_GCC 6 #ifdef SKIP_STATIC_CONSTRUCTORS_ON_GCC
7 #define {{namespace|to_macro_style}}_NAMES_HIDE_GLOBALS 1 7 #define {{namespace|to_macro_style}}_NAMES_HIDE_GLOBALS 1
8 #else 8 #else
9 #define QNAME_DEFAULT_CONSTRUCTOR 1 9 #define QNAME_DEFAULT_CONSTRUCTOR 1
10 #endif 10 #endif
11 11
12 #include "{{namespace}}Names.h" 12 #include "{{namespace}}Names.h"
13 13
14 #include "wtf/StaticConstructors.h" 14 #include "wtf/StaticConstructors.h"
15 15
16 namespace WebCore { 16 namespace WebCore {
17 namespace {{namespace}}Names { 17 namespace {{namespace}}Names {
18 18
19 using namespace WebCore; 19 using namespace WebCore;
20 20
21 DEFINE_GLOBAL(AtomicString, {{namespace_prefix}}NamespaceURI) 21 DEFINE_GLOBAL(AtomicString, {{namespace_prefix}}NamespaceURI)
22 22
23 {% if tags %} 23 {% if tags %}
24 // Tags 24 // Tags
25 {% for tag in tags|sort %} 25 {% for tag in tags|sort %}
26 DEFINE_GLOBAL(QualifiedName, {{tag|symbol}}Tag) 26 DEFINE_GLOBAL({{namespace}}QualifiedName, {{tag|symbol}}Tag)
27 {% endfor %} 27 {% endfor %}
28 28
29 29
30 PassOwnPtr<const QualifiedName*[]> get{{namespace}}Tags() 30 PassOwnPtr<const {{namespace}}QualifiedName*[]> get{{namespace}}Tags()
31 { 31 {
32 OwnPtr<const QualifiedName*[]> tags = adoptArrayPtr(new const QualifiedName* [{{namespace}}TagsCount]); 32 OwnPtr<const {{namespace}}QualifiedName*[]> tags = adoptArrayPtr(new const { {namespace}}QualifiedName*[{{namespace}}TagsCount]);
33 {% for tag in tags|sort %} 33 {% for tag in tags|sort %}
34 tags[{{loop.index0}}] = reinterpret_cast<const QualifiedName*>(&{{tag|symbol }}Tag); 34 tags[{{loop.index0}}] = reinterpret_cast<const {{namespace}}QualifiedName*>( &{{tag|symbol}}Tag);
35 {% endfor %} 35 {% endfor %}
36 return tags.release(); 36 return tags.release();
37 } 37 }
38 38
39 {% endif %} 39 {% endif %}
40 // Attributes 40 // Attributes
41 {% for attr in attrs|sort %} 41 {% for attr in attrs|sort %}
42 DEFINE_GLOBAL(QualifiedName, {{attr|symbol}}Attr) 42 DEFINE_GLOBAL(QualifiedName, {{attr|symbol}}Attr)
43 {% endfor %} 43 {% endfor %}
44 44
(...skipping 27 matching lines...) Expand all
72 {% if use_namespace_for_attrs %} 72 {% if use_namespace_for_attrs %}
73 QualifiedName::createStatic((void*)&{{attr|symbol}}Attr, {{attr|symbol}}Impl , {{namespace_prefix}}NS); 73 QualifiedName::createStatic((void*)&{{attr|symbol}}Attr, {{attr|symbol}}Impl , {{namespace_prefix}}NS);
74 {% else %} 74 {% else %}
75 QualifiedName::createStatic((void*)&{{attr|symbol}}Attr, {{attr|symbol}}Impl ); 75 QualifiedName::createStatic((void*)&{{attr|symbol}}Attr, {{attr|symbol}}Impl );
76 {% endif %} 76 {% endif %}
77 {% endfor %} 77 {% endfor %}
78 } 78 }
79 79
80 } // {{namespace}} 80 } // {{namespace}}
81 } // WebCore 81 } // WebCore
OLDNEW
« no previous file with comments | « Source/build/scripts/templates/ElementTypeHelpers.h.tmpl ('k') | Source/build/scripts/templates/MakeQualifiedNames.h.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698