| Index: Source/build/scripts/templates/MakeQualifiedNames.cpp.tmpl
|
| diff --git a/Source/build/scripts/templates/MakeQualifiedNames.cpp.tmpl b/Source/build/scripts/templates/MakeQualifiedNames.cpp.tmpl
|
| index 9a106fe5dbf4226718f6d359f1a4421d6738f979..7f7557da8dcb56cfc145440870131b20ad466505 100644
|
| --- a/Source/build/scripts/templates/MakeQualifiedNames.cpp.tmpl
|
| +++ b/Source/build/scripts/templates/MakeQualifiedNames.cpp.tmpl
|
| @@ -1,4 +1,4 @@
|
| -{% from "macros.tmpl" import license -%}
|
| +{% from "macros.tmpl" import license %}
|
| {{ license() }}
|
|
|
| #include "config.h"
|
| @@ -20,36 +20,34 @@ using namespace WebCore;
|
|
|
| DEFINE_GLOBAL(AtomicString, {{namespace_prefix}}NamespaceURI)
|
|
|
| -{%- if tags %}
|
| -
|
| +{% if tags %}
|
| // Tags
|
| -{%- for tag in tags|sort %}
|
| +{% for tag in tags|sort %}
|
| DEFINE_GLOBAL(QualifiedName, {{tag|symbol}}Tag)
|
| -{%- endfor %}
|
| +{% endfor %}
|
|
|
|
|
| PassOwnPtr<const QualifiedName*[]> get{{namespace}}Tags()
|
| {
|
| OwnPtr<const QualifiedName*[]> tags = adoptArrayPtr(new const QualifiedName*[{{namespace}}TagsCount]);
|
| -{%- for tag in tags|sort %}
|
| + {% for tag in tags|sort %}
|
| tags[{{loop.index0}}] = reinterpret_cast<const QualifiedName*>(&{{tag|symbol}}Tag);
|
| -{%- endfor %}
|
| + {% endfor %}
|
| return tags.release();
|
| }
|
|
|
| -{%- endif %}
|
| -
|
| +{% endif %}
|
| // Attributes
|
| -{%- for attr in attrs|sort %}
|
| +{% for attr in attrs|sort %}
|
| DEFINE_GLOBAL(QualifiedName, {{attr|symbol}}Attr)
|
| -{%- endfor %}
|
| +{% endfor %}
|
|
|
| PassOwnPtr<const QualifiedName*[]> get{{namespace}}Attrs()
|
| {
|
| OwnPtr<const QualifiedName*[]> attrs = adoptArrayPtr(new const QualifiedName*[{{namespace}}AttrsCount]);
|
| -{%- for attr in attrs|sort %}
|
| + {% for attr in attrs|sort %}
|
| attrs[{{loop.index0}}] = reinterpret_cast<const WebCore::QualifiedName*>(&{{attr|symbol}}Attr);
|
| -{%- endfor %}
|
| + {% endfor %}
|
| return attrs.release();
|
| }
|
|
|
| @@ -60,24 +58,23 @@ void init()
|
|
|
| // Namespace
|
| new ((void*)&{{namespace_prefix}}NamespaceURI) AtomicString({{namespace_prefix}}NS);
|
| -
|
| -{%- for name, tag_list in (tags + attrs)|groupby('name')|sort %}
|
| + {% for name, tag_list in (tags + attrs)|groupby('name')|sort %}
|
| StringImpl* {{tag_list[0]|symbol}}Impl = StringImpl::createStatic("{{name}}", {{name|length}}, {{name|hash}});
|
| -{%- endfor %}
|
| + {% endfor %}
|
|
|
| // Tags
|
| -{%- for tag in tags|sort %}
|
| + {% for tag in tags|sort %}
|
| createQualifiedName((void*)&{{tag|symbol}}Tag, {{tag|symbol}}Impl, {{namespace_prefix}}NS);
|
| -{%- endfor %}
|
| + {% endfor %}
|
|
|
| // Attrs
|
| -{%- for attr in attrs|sort %}
|
| -{%- if use_namespace_for_attrs %}
|
| + {% for attr in attrs|sort %}
|
| + {% if use_namespace_for_attrs %}
|
| createQualifiedName((void*)&{{attr|symbol}}Attr, {{attr|symbol}}Impl, {{namespace_prefix}}NS);
|
| -{%- else %}
|
| + {% else %}
|
| createQualifiedName((void*)&{{attr|symbol}}Attr, {{attr|symbol}}Impl);
|
| -{%- endif %}
|
| -{%- endfor %}
|
| + {% endif %}
|
| + {% endfor %}
|
| }
|
|
|
| } // {{namespace}}
|
|
|