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 #include "core/events/{{namespace}}Factory.h" | 5 #include "core/events/{{namespace}}Factory.h" |
6 | 6 |
7 #include "{{namespace}}Headers.h" | 7 #include "{{namespace}}{{suffix}}Headers.h" |
8 #include "RuntimeEnabledFeatures.h" | 8 #include "RuntimeEnabledFeatures.h" |
9 | 9 |
10 namespace WebCore { | 10 namespace WebCore { |
11 | 11 |
12 PassRefPtrWillBeRawPtr<{{namespace}}> {{namespace}}Factory::create(const String&
type) | 12 PassRefPtrWillBeRawPtr<{{namespace}}> {{namespace}}{{suffix}}Factory::create(con
st String& type) |
13 { | 13 { |
14 {% for event in events %} | 14 {% for event in events %} |
15 {% filter enable_conditional(event.Conditional) %} | 15 {% filter enable_conditional(event.Conditional) %} |
16 {% if event|script_name|case_insensitive_matching %} | 16 {% if event|script_name|case_insensitive_matching %} |
17 if (equalIgnoringCase(type, "{{event|script_name}}"){% if event.RuntimeEnabl
ed %} && RuntimeEnabledFeatures::{{event.RuntimeEnabled|lower_first}}(){% endif
%}) | 17 if (equalIgnoringCase(type, "{{event|script_name}}"){% if event.RuntimeEnabl
ed %} && RuntimeEnabledFeatures::{{event.RuntimeEnabled|lower_first}}(){% endif
%}) |
18 {% else %} | 18 {% else %} |
19 if (type == "{{event|script_name}}"{% if event.RuntimeEnabled %} && RuntimeE
nabledFeatures::{{event.RuntimeEnabled|lower_first}}(){% endif %}) | 19 if (type == "{{event|script_name}}"{% if event.RuntimeEnabled %} && RuntimeE
nabledFeatures::{{event.RuntimeEnabled|lower_first}}(){% endif %}) |
20 {% endif %} | 20 {% endif %} |
21 return {{event|cpp_name}}::create(); | 21 return {{event|cpp_name}}::create(); |
22 {% endfilter %} | 22 {% endfilter %} |
23 {% endfor %} | 23 {% endfor %} |
24 return nullptr; | 24 return nullptr; |
25 } | 25 } |
26 | 26 |
27 } // namespace WebCore | 27 } // namespace WebCore |
OLD | NEW |