| OLD | NEW |
| 1 {% filter format_blink_cpp_source_code %} | 1 {% filter format_blink_cpp_source_code %} |
| 2 | 2 |
| 3 {% include 'copyright_block.txt' %} | 3 {% include 'copyright_block.txt' %} |
| 4 #include "{{v8_class_or_partial}}.h" | 4 #include "{{v8_class_or_partial}}.h" |
| 5 | 5 |
| 6 {% for filename in cpp_includes if filename != '%s.h' % cpp_class_or_partial %} | 6 {% for filename in cpp_includes if filename != '%s.h' % cpp_class_or_partial %} |
| 7 #include "{{filename}}" | 7 #include "{{filename}}" |
| 8 {% endfor %} | 8 {% endfor %} |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 {% endif %} | 312 {% endif %} |
| 313 {% if methods | has_method_configuration(is_partial) %} | 313 {% if methods | has_method_configuration(is_partial) %} |
| 314 V8DOMConfiguration::installMethods(isolate, world, instanceTemplate, prototy
peTemplate, interfaceTemplate, signature, {{'%sMethods' % v8_class}}, {{'WTF_ARR
AY_LENGTH(%sMethods)' % v8_class}}); | 314 V8DOMConfiguration::installMethods(isolate, world, instanceTemplate, prototy
peTemplate, interfaceTemplate, signature, {{'%sMethods' % v8_class}}, {{'WTF_ARR
AY_LENGTH(%sMethods)' % v8_class}}); |
| 315 {% endif %} | 315 {% endif %} |
| 316 {% endfilter %} | 316 {% endfilter %} |
| 317 {%- if has_access_check_callbacks and not is_partial %}{{newline}} | 317 {%- if has_access_check_callbacks and not is_partial %}{{newline}} |
| 318 // Cross-origin access check | 318 // Cross-origin access check |
| 319 instanceTemplate->SetAccessCheckCallback({{cpp_class}}V8Internal::securityCh
eck, v8::External::New(isolate, const_cast<WrapperTypeInfo*>(&{{v8_class}}::wrap
perTypeInfo))); | 319 instanceTemplate->SetAccessCheckCallback({{cpp_class}}V8Internal::securityCh
eck, v8::External::New(isolate, const_cast<WrapperTypeInfo*>(&{{v8_class}}::wrap
perTypeInfo))); |
| 320 {% endif %} | 320 {% endif %} |
| 321 | 321 |
| 322 {%- if has_array_iterator and not is_partial and not is_global %}{{newline}} | |
| 323 // Array iterator | |
| 324 prototypeTemplate->SetIntrinsicDataProperty(v8::Symbol::GetIterator(isolate)
, v8::kArrayProto_values, v8::DontEnum); | |
| 325 {% endif %} | |
| 326 | |
| 327 {%- for group in attributes | purely_runtime_enabled_attributes | groupby('r
untime_feature_name') %}{{newline}} | 322 {%- for group in attributes | purely_runtime_enabled_attributes | groupby('r
untime_feature_name') %}{{newline}} |
| 328 if ({{group.list[0].runtime_enabled_function}}()) { | 323 if ({{group.list[0].runtime_enabled_function}}()) { |
| 329 {% for attribute in group.list | unique_by('name') | sort %} | 324 {% for attribute in group.list | unique_by('name') | sort %} |
| 330 {% if attribute.is_data_type_property %} | 325 {% if attribute.is_data_type_property %} |
| 331 const V8DOMConfiguration::AttributeConfiguration attribute{{attribute.na
me}}Configuration = \ | 326 const V8DOMConfiguration::AttributeConfiguration attribute{{attribute.na
me}}Configuration = \ |
| 332 {{attribute_configuration(attribute)}}; | 327 {{attribute_configuration(attribute)}}; |
| 333 V8DOMConfiguration::installAttribute(isolate, world, instanceTemplate, p
rototypeTemplate, attribute{{attribute.name}}Configuration); | 328 V8DOMConfiguration::installAttribute(isolate, world, instanceTemplate, p
rototypeTemplate, attribute{{attribute.name}}Configuration); |
| 334 {% else %} | 329 {% else %} |
| 335 const V8DOMConfiguration::AccessorConfiguration accessor{{attribute.name
}}Configuration = \ | 330 const V8DOMConfiguration::AccessorConfiguration accessor{{attribute.name
}}Configuration = \ |
| 336 {{attribute_configuration(attribute)}}; | 331 {{attribute_configuration(attribute)}}; |
| 337 V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, pr
ototypeTemplate, interfaceTemplate, signature, accessor{{attribute.name}}Configu
ration); | 332 V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, pr
ototypeTemplate, interfaceTemplate, signature, accessor{{attribute.name}}Configu
ration); |
| 338 {% endif %} | 333 {% endif %} |
| 339 {% endfor %} | 334 {% endfor %} |
| 340 } | 335 } |
| 341 {% endfor %} | 336 {% endfor %} |
| 342 | 337 |
| 343 {% if (indexed_property_getter or named_property_getter) and not is_partial
%} | 338 {% if (indexed_property_getter or named_property_getter) and not is_partial
%} |
| 344 // Indexed properties | 339 // Indexed properties |
| 345 {{install_indexed_property_handler('instanceTemplate') | indent}} | 340 {{install_indexed_property_handler('instanceTemplate') | indent}} |
| 346 {% endif %} | 341 {% endif %} |
| 347 {% if named_property_getter and not is_partial and not has_named_properties_
object %} | 342 {% if named_property_getter and not is_partial and not has_named_properties_
object %} |
| 348 // Named properties | 343 // Named properties |
| 349 {{install_named_property_handler('instanceTemplate') | indent}} | 344 {{install_named_property_handler('instanceTemplate') | indent}} |
| 350 {% endif %} | 345 {% endif %} |
| 351 | 346 |
| 352 {%- if iterator_method %}{{newline}} | 347 {% if has_array_iterator and not is_partial %} |
| 348 // Array iterator (@@iterator) |
| 349 {%+ if is_global %}instanceTemplate{% else %}prototypeTemplate{% endif %}->S
etIntrinsicDataProperty(v8::Symbol::GetIterator(isolate), v8::kArrayProto_values
, v8::DontEnum); |
| 350 {% endif %} |
| 351 |
| 352 {% if iterator_method %} |
| 353 {% filter exposed(iterator_method.exposed_test) %} | 353 {% filter exposed(iterator_method.exposed_test) %} |
| 354 {% filter runtime_enabled(iterator_method.runtime_enabled_function) %} | 354 {% filter runtime_enabled(iterator_method.runtime_enabled_function) %} |
| 355 // Iterator (@@iterator) | 355 // Iterator (@@iterator) |
| 356 const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIterator
Configuration = { v8::Symbol::GetIterator, {{cpp_class_or_partial}}V8Internal::i
teratorMethodCallback, 0, v8::DontDelete, V8DOMConfiguration::ExposedToAllScript
s, V8DOMConfiguration::OnPrototype }; | 356 const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIterator
Configuration = { v8::Symbol::GetIterator, {{cpp_class_or_partial}}V8Internal::i
teratorMethodCallback, 0, v8::DontEnum, V8DOMConfiguration::ExposedToAllScripts,
V8DOMConfiguration::OnPrototype }; |
| 357 V8DOMConfiguration::installMethod(isolate, world, prototypeTemplate, signatu
re, symbolKeyedIteratorConfiguration); | 357 V8DOMConfiguration::installMethod(isolate, world, prototypeTemplate, signatu
re, symbolKeyedIteratorConfiguration); |
| 358 {% endfilter %} | 358 {% endfilter %} |
| 359 {% endfilter %} | 359 {% endfilter %} |
| 360 {% endif %} | 360 {% endif %} |
| 361 | 361 |
| 362 {%- if has_custom_legacy_call_as_function and not is_partial %}{{newline}} | 362 {%- if has_custom_legacy_call_as_function and not is_partial %}{{newline}} |
| 363 instanceTemplate->SetCallAsFunctionHandler({{v8_class}}::legacyCallCustom); | 363 instanceTemplate->SetCallAsFunctionHandler({{v8_class}}::legacyCallCustom); |
| 364 {% endif %} | 364 {% endif %} |
| 365 | 365 |
| 366 {%- if interface_name == 'HTMLAllCollection' and not is_partial %}{{newline}
} | 366 {%- if interface_name == 'HTMLAllCollection' and not is_partial %}{{newline}
} |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 {% for attribute in attributes if attribute.is_implemented_in_private_script %} | 457 {% for attribute in attributes if attribute.is_implemented_in_private_script %} |
| 458 {{attribute_getter_implemented_in_private_script(attribute)}} | 458 {{attribute_getter_implemented_in_private_script(attribute)}} |
| 459 {% if attribute.has_setter %} | 459 {% if attribute.has_setter %} |
| 460 {{attribute_setter_implemented_in_private_script(attribute)}} | 460 {{attribute_setter_implemented_in_private_script(attribute)}} |
| 461 {% endif %} | 461 {% endif %} |
| 462 {% endfor %} | 462 {% endfor %} |
| 463 {% block partial_interface %}{% endblock %} | 463 {% block partial_interface %}{% endblock %} |
| 464 } // namespace blink | 464 } // namespace blink |
| 465 | 465 |
| 466 {% endfilter %}{# format_blink_cpp_source_code #} | 466 {% endfilter %}{# format_blink_cpp_source_code #} |
| OLD | NEW |