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

Side by Side Diff: Source/build/scripts/templates/MakeQualifiedNames.h.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
« no previous file with comments | « Source/build/scripts/templates/MakeQualifiedNames.cpp.tmpl ('k') | Source/core/dom/Element.h » ('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 #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 #include "wtf/PassOwnPtr.h" 8 #include "wtf/PassOwnPtr.h"
9 9
10 namespace WebCore { 10 namespace WebCore {
11
12 class {{namespace}}QualifiedName : public QualifiedName { };
13
11 namespace {{namespace}}Names { 14 namespace {{namespace}}Names {
12 15
13 #ifndef {{namespace|to_macro_style}}_NAMES_HIDE_GLOBALS 16 #ifndef {{namespace|to_macro_style}}_NAMES_HIDE_GLOBALS
14 // Namespace 17 // Namespace
15 extern const WTF::AtomicString {{namespace_prefix}}NamespaceURI; 18 extern const WTF::AtomicString {{namespace_prefix}}NamespaceURI;
16 19
17 // Tags 20 // Tags
18 {% for tag in tags|sort %} 21 {% for tag in tags|sort %}
19 extern const WebCore::QualifiedName {{tag|symbol}}Tag; 22 extern const WebCore::{{namespace}}QualifiedName {{tag|symbol}}Tag;
20 {% endfor %} 23 {% endfor %}
21 24
22 // Attributes 25 // Attributes
23 {% for attr in attrs|sort %} 26 {% for attr in attrs|sort %}
24 extern const WebCore::QualifiedName {{attr|symbol}}Attr; 27 extern const WebCore::QualifiedName {{attr|symbol}}Attr;
25 {% endfor %} 28 {% endfor %}
26 29
27 #endif // {{namespace|to_macro_style}}_NAMES_HIDE_GLOBALS 30 #endif // {{namespace|to_macro_style}}_NAMES_HIDE_GLOBALS
28 {% if tags %} 31 {% if tags %}
29 const unsigned {{namespace}}TagsCount = {{tags|count}}; 32 const unsigned {{namespace}}TagsCount = {{tags|count}};
30 PassOwnPtr<const QualifiedName*[]> get{{namespace}}Tags(); 33 PassOwnPtr<const {{namespace}}QualifiedName*[]> get{{namespace}}Tags();
31 {% endif %} 34 {% endif %}
32 const unsigned {{namespace}}AttrsCount = {{attrs|count}}; 35 const unsigned {{namespace}}AttrsCount = {{attrs|count}};
33 PassOwnPtr<const QualifiedName*[]> get{{namespace}}Attrs(); 36 PassOwnPtr<const QualifiedName*[]> get{{namespace}}Attrs();
34 37
35 void init(); 38 void init();
36 39
37 } // {{namespace}}Names 40 } // {{namespace}}Names
38 } // WebCore 41 } // WebCore
39 42
40 #endif 43 #endif
OLDNEW
« no previous file with comments | « Source/build/scripts/templates/MakeQualifiedNames.cpp.tmpl ('k') | Source/core/dom/Element.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698