| OLD | NEW |
| 1 {##############################################################################} | 1 {##############################################################################} |
| 2 {% macro constant_getter_callback(constant) %} | 2 {% macro constant_getter_callback(constant) %} |
| 3 void {{constant.name}}ConstantGetterCallback(v8::Local<v8::Name>, const v8::Prop
ertyCallbackInfo<v8::Value>& info) { | 3 void {{constant.name}}ConstantGetterCallback(v8::Local<v8::Name>, const v8::Prop
ertyCallbackInfo<v8::Value>& info) { |
| 4 {% if constant.deprecate_as %} | 4 {% if constant.deprecate_as %} |
| 5 Deprecation::countDeprecation(currentExecutionContext(info.GetIsolate()), UseC
ounter::{{constant.deprecate_as}}); | 5 Deprecation::countDeprecation(currentExecutionContext(info.GetIsolate()), UseC
ounter::{{constant.deprecate_as}}); |
| 6 {% endif %} | 6 {% endif %} |
| 7 {% if constant.measure_as %} | 7 {% if constant.measure_as %} |
| 8 UseCounter::count(currentExecutionContext(info.GetIsolate()), UseCounter::{{co
nstant.measure_as('ConstantGetter')}}); | 8 UseCounter::count(currentExecutionContext(info.GetIsolate()), UseCounter::{{co
nstant.measure_as('ConstantGetter')}}); |
| 9 {% endif %} | 9 {% endif %} |
| 10 {% if constant.idl_type in ('Double', 'Float') %} | 10 {% if constant.idl_type in ('Double', 'Float') %} |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 {% if constants | has_constant_configuration %} | 23 {% if constants | has_constant_configuration %} |
| 24 {# Normal constants #} | 24 {# Normal constants #} |
| 25 const V8DOMConfiguration::ConstantConfiguration {{v8_class}}Constants[] = { | 25 const V8DOMConfiguration::ConstantConfiguration {{v8_class}}Constants[] = { |
| 26 {% for constant in constants | has_constant_configuration %} | 26 {% for constant in constants | has_constant_configuration %} |
| 27 {{constant_configuration(constant)}}, | 27 {{constant_configuration(constant)}}, |
| 28 {% endfor %} | 28 {% endfor %} |
| 29 }; | 29 }; |
| 30 V8DOMConfiguration::installConstants(isolate, interfaceTemplate, prototypeTempla
te, {{v8_class}}Constants, WTF_ARRAY_LENGTH({{v8_class}}Constants)); | 30 V8DOMConfiguration::installConstants(isolate, interfaceTemplate, prototypeTempla
te, {{v8_class}}Constants, WTF_ARRAY_LENGTH({{v8_class}}Constants)); |
| 31 {% endif %} | 31 {% endif %} |
| 32 {# Runtime-enabled constants #} | 32 {# Runtime-enabled constants #} |
| 33 {% for group in constants | runtime_enabled_constants | groupby('runtime_feature
_name') %} | 33 {% for group in constants | runtime_enabled_constants | groupby('runtime_enabled
') %} |
| 34 {% filter runtime_enabled(group.list[0].runtime_enabled_function) %} | 34 {% filter runtime_enabled(group.list[0].runtime_enabled) %} |
| 35 {% for constant in group.list %} | 35 {% for constant in group.list %} |
| 36 {% set constant_name = constant.name.title().replace('_', '') %} | 36 {% set constant_name = constant.name.title().replace('_', '') %} |
| 37 const V8DOMConfiguration::ConstantConfiguration constant{{constant_name}}Configu
ration = {{constant_configuration(constant)}}; | 37 const V8DOMConfiguration::ConstantConfiguration constant{{constant_name}}Configu
ration = {{constant_configuration(constant)}}; |
| 38 V8DOMConfiguration::installConstant(isolate, interfaceTemplate, prototypeTemplat
e, constant{{constant_name}}Configuration); | 38 V8DOMConfiguration::installConstant(isolate, interfaceTemplate, prototypeTemplat
e, constant{{constant_name}}Configuration); |
| 39 {% endfor %} | 39 {% endfor %} |
| 40 {% endfilter %} | 40 {% endfilter %} |
| 41 {% endfor %} | 41 {% endfor %} |
| 42 {# Constants with [DeprecateAs] or [MeasureAs] #} | 42 {# Constants with [DeprecateAs] or [MeasureAs] #} |
| 43 {% for constant in constants | has_special_getter %} | 43 {% for constant in constants | has_special_getter %} |
| 44 V8DOMConfiguration::installConstantWithGetter(isolate, interfaceTemplate, protot
ypeTemplate, "{{constant.name}}", {{cpp_class}}V8Internal::{{constant.name}}Cons
tantGetterCallback); | 44 V8DOMConfiguration::installConstantWithGetter(isolate, interfaceTemplate, protot
ypeTemplate, "{{constant.name}}", {{cpp_class}}V8Internal::{{constant.name}}Cons
tantGetterCallback); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 58 {######################################} | 58 {######################################} |
| 59 {%- macro constant_configuration(constant) %} | 59 {%- macro constant_configuration(constant) %} |
| 60 {% if constant.idl_type in ('Double', 'Float') %} | 60 {% if constant.idl_type in ('Double', 'Float') %} |
| 61 {% set value = '0, %s' % constant.value %} | 61 {% set value = '0, %s' % constant.value %} |
| 62 {% else %} | 62 {% else %} |
| 63 {# 'Short', 'Long' etc. #} | 63 {# 'Short', 'Long' etc. #} |
| 64 {% set value = '%s, 0' % constant.value %} | 64 {% set value = '%s, 0' % constant.value %} |
| 65 {% endif %} | 65 {% endif %} |
| 66 {"{{constant.name}}", {{value}}, V8DOMConfiguration::ConstantType{{constant.idl_
type}}} | 66 {"{{constant.name}}", {{value}}, V8DOMConfiguration::ConstantType{{constant.idl_
type}}} |
| 67 {%- endmacro %} | 67 {%- endmacro %} |
| OLD | NEW |