OLD | NEW |
1 {% include 'copyright_block.txt' %} | 1 {% include 'copyright_block.txt' %} |
2 #include "config.h" | 2 #include "config.h" |
3 {% filter conditional(conditional_string) %} | 3 {% filter conditional(conditional_string) %} |
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 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 {% endif %} | 345 {% endif %} |
346 {% if has_array_iterator %} | 346 {% if has_array_iterator %} |
347 {% filter runtime_enabled('RuntimeEnabledFeatures::iterableCollectionsEnable
d') %} | 347 {% filter runtime_enabled('RuntimeEnabledFeatures::iterableCollectionsEnable
d') %} |
348 {% if is_global %} | 348 {% if is_global %} |
349 instanceTemplate->SetIntrinsicDataProperty(v8::Symbol::GetIterator(isolate),
v8::kArrayProto_values, v8::DontEnum); | 349 instanceTemplate->SetIntrinsicDataProperty(v8::Symbol::GetIterator(isolate),
v8::kArrayProto_values, v8::DontEnum); |
350 {% else %} | 350 {% else %} |
351 prototypeTemplate->SetIntrinsicDataProperty(v8::Symbol::GetIterator(isolate)
, v8::kArrayProto_values, v8::DontEnum); | 351 prototypeTemplate->SetIntrinsicDataProperty(v8::Symbol::GetIterator(isolate)
, v8::kArrayProto_values, v8::DontEnum); |
352 {% endif %} | 352 {% endif %} |
353 {% endfilter %}{# runtime_enabled() #} | 353 {% endfilter %}{# runtime_enabled() #} |
354 {% endif %} | 354 {% endif %} |
| 355 {% set runtime_enabled_features = dict() %} |
355 {% for attribute in attributes | 356 {% for attribute in attributes |
356 if attribute.runtime_enabled_function and | 357 if attribute.runtime_enabled_function and |
357 not attribute.exposed_test %} | 358 not attribute.exposed_test %} |
358 {% filter conditional(attribute.conditional_string) %} | 359 {% if attribute.runtime_enabled_function not in runtime_enabled_features
%} |
359 if ({{attribute.runtime_enabled_function}}()) { | 360 {% set unused = runtime_enabled_features.update({attribute.runtime_e
nabled_function: []}) %} |
| 361 {% endif %} |
| 362 {% set unused = runtime_enabled_features.get(attribute.runtime_enabled_f
unction).append(attribute) %} |
| 363 {% endfor %} |
| 364 {% for runtime_enabled_feature in runtime_enabled_features | sort %} |
| 365 if ({{runtime_enabled_feature}}()) { |
| 366 {% set distinct_attributes = [] %} |
| 367 {% for attribute in runtime_enabled_features.get(runtime_enabled_feature
) | sort |
| 368 if attribute.name not in distinct_attributes %} |
| 369 {% set unused = distinct_attributes.append(attribute.name) %} |
| 370 {% filter conditional(attribute.conditional_string) %} |
360 {% if attribute.is_data_type_property %} | 371 {% if attribute.is_data_type_property %} |
361 const V8DOMConfiguration::AttributeConfiguration attributeConfiguration
= \ | 372 const V8DOMConfiguration::AttributeConfiguration attribute{{attribute.na
me}}Configuration = \ |
362 {{attribute_configuration(attribute)}}; | 373 {{attribute_configuration(attribute)}}; |
363 V8DOMConfiguration::installAttribute(isolate, instanceTemplate, prototyp
eTemplate, attributeConfiguration); | 374 V8DOMConfiguration::installAttribute(isolate, instanceTemplate, prototyp
eTemplate, attribute{{attribute.name}}Configuration); |
364 {% else %} | 375 {% else %} |
365 const V8DOMConfiguration::AccessorConfiguration accessorConfiguration =
\ | 376 const V8DOMConfiguration::AccessorConfiguration accessor{{attribute.name
}}Configuration = \ |
366 {{attribute_configuration(attribute)}}; | 377 {{attribute_configuration(attribute)}}; |
367 V8DOMConfiguration::installAccessor(isolate, instanceTemplate, prototype
Template, functionTemplate, defaultSignature, accessorConfiguration); | 378 V8DOMConfiguration::installAccessor(isolate, instanceTemplate, prototype
Template, functionTemplate, defaultSignature, accessor{{attribute.name}}Configur
ation); |
368 {% endif %} | 379 {% endif %} |
| 380 {% endfilter %} |
| 381 {% endfor %} |
369 } | 382 } |
370 {% endfilter %} | |
371 {% endfor %} | 383 {% endfor %} |
372 {% if constants %} | 384 {% if constants %} |
373 {{install_constants() | indent}} | 385 {{install_constants() | indent}} |
374 {% endif %} | 386 {% endif %} |
375 {# Special operations #} | 387 {# Special operations #} |
376 {% if indexed_property_getter %} | 388 {% if indexed_property_getter %} |
377 {{install_indexed_property_handler('instanceTemplate') | indent}} | 389 {{install_indexed_property_handler('instanceTemplate') | indent}} |
378 {% endif %} | 390 {% endif %} |
379 {% if named_property_getter and not has_named_properties_object %} | 391 {% if named_property_getter and not has_named_properties_object %} |
380 {{install_named_property_handler('instanceTemplate') | indent}} | 392 {{install_named_property_handler('instanceTemplate') | indent}} |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
449 {% endfor %} | 461 {% endfor %} |
450 {% for attribute in attributes if attribute.is_implemented_in_private_script %} | 462 {% for attribute in attributes if attribute.is_implemented_in_private_script %} |
451 {{attribute_getter_implemented_in_private_script(attribute)}} | 463 {{attribute_getter_implemented_in_private_script(attribute)}} |
452 {% if attribute.has_setter %} | 464 {% if attribute.has_setter %} |
453 {{attribute_setter_implemented_in_private_script(attribute)}} | 465 {{attribute_setter_implemented_in_private_script(attribute)}} |
454 {% endif %} | 466 {% endif %} |
455 {% endfor %} | 467 {% endfor %} |
456 {% block partial_interface %}{% endblock %} | 468 {% block partial_interface %}{% endblock %} |
457 } // namespace blink | 469 } // namespace blink |
458 {% endfilter %} | 470 {% endfilter %} |
OLD | NEW |