Chromium Code Reviews| Index: Source/build/scripts/templates/ElementFactory.cpp.tmpl |
| diff --git a/Source/build/scripts/templates/ElementFactory.cpp.tmpl b/Source/build/scripts/templates/ElementFactory.cpp.tmpl |
| index cc439824fd1d0850f123cabc54ab63f86afc47f8..4588e3fccbbbb4af3afd82b36cf059fe8e2d9823 100644 |
| --- a/Source/build/scripts/templates/ElementFactory.cpp.tmpl |
| +++ b/Source/build/scripts/templates/ElementFactory.cpp.tmpl |
| @@ -35,6 +35,7 @@ typedef HashMap<AtomicString, ConstructorFunction> FunctionMap; |
| static FunctionMap* g_constructors = 0; |
| {% for tag in tags|sort if not tag.noConstructor %} |
| +{% filter enable_conditional(tag.Conditional) %} |
| static PassRefPtrWillBeRawPtr<{{namespace}}Element> {{tag|symbol}}Constructor( |
| Document& document, |
| {% if namespace == 'HTML' %} |
| @@ -57,6 +58,7 @@ static PassRefPtrWillBeRawPtr<{{namespace}}Element> {{tag|symbol}}Constructor( |
| {%- if tag.constructorNeedsCreatedByParser %}, createdByParser{% endif -%} |
| ); |
| } |
| +{% endfilter %} |
| {% endfor %} |
| struct Create{{namespace}}FunctionMapData { |
| @@ -70,7 +72,9 @@ static void create{{namespace}}FunctionMap() |
| g_constructors = new FunctionMap; |
| static const Create{{namespace}}FunctionMapData data[] = { |
|
Nils Barth (inactive)
2014/06/13 02:14:24
One subtlety: this definition *fails to compile* o
maheshkk
2014/06/13 20:03:16
That's a good point. I have added comment for now
|
| {% for tag in tags|sort if not tag.noConstructor %} |
| + {% filter enable_conditional(tag.Conditional) %} |
| { {{tag|symbol}}Tag, {{tag|symbol}}Constructor }, |
| + {% endfilter %} |
| {% endfor %} |
| }; |
| for (size_t i = 0; i < WTF_ARRAY_LENGTH(data); i++) |