| OLD | NEW |
| 1 {% extends 'interface_base.cpp' %} | 1 {% extends 'interface_base.cpp' %} |
| 2 | 2 |
| 3 | 3 |
| 4 {##############################################################################} | 4 {##############################################################################} |
| 5 {% block indexed_property_getter %} | 5 {% block indexed_property_getter %} |
| 6 {% if indexed_property_getter and not indexed_property_getter.is_custom %} | 6 {% if indexed_property_getter and not indexed_property_getter.is_custom %} |
| 7 {% set getter = indexed_property_getter %} | 7 {% set getter = indexed_property_getter %} |
| 8 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo
<v8::Value>& info) | 8 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo
<v8::Value>& info) |
| 9 { | 9 { |
| 10 {{cpp_class}}* impl = {{v8_class}}::toImpl(info.Holder()); | 10 {{cpp_class}}* impl = {{v8_class}}::toImpl(info.Holder()); |
| (...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 629 {% set setter_callback_for_main_world = '%sForMainWorld' % setter_callback | 629 {% set setter_callback_for_main_world = '%sForMainWorld' % setter_callback |
| 630 if not method.is_read_only else '0' %} | 630 if not method.is_read_only else '0' %} |
| 631 {% else %} | 631 {% else %} |
| 632 {% set getter_callback_for_main_world = '0' %} | 632 {% set getter_callback_for_main_world = '0' %} |
| 633 {% set setter_callback_for_main_world = '0' %} | 633 {% set setter_callback_for_main_world = '0' %} |
| 634 {% endif %} | 634 {% endif %} |
| 635 {% set property_attribute = | 635 {% set property_attribute = |
| 636 'static_cast<v8::PropertyAttribute>(%s)' % | 636 'static_cast<v8::PropertyAttribute>(%s)' % |
| 637 ' | '.join(method.property_attributes or ['v8::DontDelete']) %} | 637 ' | '.join(method.property_attributes or ['v8::DontDelete']) %} |
| 638 {% set only_exposed_to_private_script = 'V8DOMConfiguration::OnlyExposedToPrivat
eScript' if method.only_exposed_to_private_script else 'V8DOMConfiguration::Expo
sedToAllScripts' %} | 638 {% set only_exposed_to_private_script = 'V8DOMConfiguration::OnlyExposedToPrivat
eScript' if method.only_exposed_to_private_script else 'V8DOMConfiguration::Expo
sedToAllScripts' %} |
| 639 static const V8DOMConfiguration::AttributeConfiguration {{method.name}}OriginSaf
eAttributeConfiguration = { | 639 const V8DOMConfiguration::AttributeConfiguration {{method.name}}OriginSafeAttrib
uteConfiguration = { |
| 640 "{{method.name}}", {{getter_callback}}, {{setter_callback}}, {{getter_callba
ck_for_main_world}}, {{setter_callback_for_main_world}}, &{{v8_class}}::wrapperT
ypeInfo, v8::ALL_CAN_READ, {{property_attribute}}, {{only_exposed_to_private_scr
ipt}}, V8DOMConfiguration::OnInstance, | 640 "{{method.name}}", {{getter_callback}}, {{setter_callback}}, {{getter_callba
ck_for_main_world}}, {{setter_callback_for_main_world}}, &{{v8_class}}::wrapperT
ypeInfo, v8::ALL_CAN_READ, {{property_attribute}}, {{only_exposed_to_private_scr
ipt}}, V8DOMConfiguration::OnInstance, |
| 641 }; | 641 }; |
| 642 V8DOMConfiguration::installAttribute(isolate, {{method.function_template}}, v8::
Local<v8::ObjectTemplate>(), {{method.name}}OriginSafeAttributeConfiguration); | 642 V8DOMConfiguration::installAttribute(isolate, {{method.function_template}}, v8::
Local<v8::ObjectTemplate>(), {{method.name}}OriginSafeAttributeConfiguration); |
| 643 {%- endmacro %} | 643 {%- endmacro %} |
| 644 | 644 |
| 645 | 645 |
| 646 {##############################################################################} | 646 {##############################################################################} |
| 647 {% block get_dom_template %} | 647 {% block get_dom_template %} |
| 648 {% if not is_array_buffer_or_view %} | 648 {% if not is_array_buffer_or_view %} |
| 649 v8::Local<v8::FunctionTemplate> {{v8_class}}::domTemplate(v8::Isolate* isolate) | 649 v8::Local<v8::FunctionTemplate> {{v8_class}}::domTemplate(v8::Isolate* isolate) |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 831 {% endmacro %} | 831 {% endmacro %} |
| 832 | 832 |
| 833 | 833 |
| 834 {##############################################################################} | 834 {##############################################################################} |
| 835 {% macro install_conditionally_enabled_attributes_on_prototype() %} | 835 {% macro install_conditionally_enabled_attributes_on_prototype() %} |
| 836 {% from 'attributes.cpp' import attribute_configuration with context %} | 836 {% from 'attributes.cpp' import attribute_configuration with context %} |
| 837 ExecutionContext* context = toExecutionContext(prototypeObject->CreationContext(
)); | 837 ExecutionContext* context = toExecutionContext(prototypeObject->CreationContext(
)); |
| 838 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTempla
te); | 838 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTempla
te); |
| 839 {% for attribute in attributes if attribute.exposed_test and attribute.on_protot
ype %} | 839 {% for attribute in attributes if attribute.exposed_test and attribute.on_protot
ype %} |
| 840 {% filter exposed(attribute.exposed_test) %} | 840 {% filter exposed(attribute.exposed_test) %} |
| 841 static const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {
{attribute_configuration(attribute)}}; | 841 const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {{attrib
ute_configuration(attribute)}}; |
| 842 V8DOMConfiguration::installAccessor(isolate, v8::Local<v8::Object>(), prototypeO
bject, v8::Local<v8::Function>(), signature, accessorConfiguration); | 842 V8DOMConfiguration::installAccessor(isolate, v8::Local<v8::Object>(), prototypeO
bject, v8::Local<v8::Function>(), signature, accessorConfiguration); |
| 843 {% endfilter %} | 843 {% endfilter %} |
| 844 {% endfor %} | 844 {% endfor %} |
| 845 {% endmacro %} | 845 {% endmacro %} |
| 846 | 846 |
| 847 | 847 |
| 848 {##############################################################################} | 848 {##############################################################################} |
| 849 {% block to_active_dom_object %} | 849 {% block to_active_dom_object %} |
| 850 {% if is_active_dom_object %} | 850 {% if is_active_dom_object %} |
| 851 ActiveDOMObject* {{v8_class}}::toActiveDOMObject(v8::Local<v8::Object> wrapper) | 851 ActiveDOMObject* {{v8_class}}::toActiveDOMObject(v8::Local<v8::Object> wrapper) |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 896 } | 896 } |
| 897 | 897 |
| 898 {% for method in methods if method.overloads and method.overloads.has_partial_ov
erloads %} | 898 {% for method in methods if method.overloads and method.overloads.has_partial_ov
erloads %} |
| 899 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt
erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) | 899 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt
erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) |
| 900 { | 900 { |
| 901 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; | 901 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; |
| 902 } | 902 } |
| 903 {% endfor %} | 903 {% endfor %} |
| 904 {% endif %} | 904 {% endif %} |
| 905 {% endblock %} | 905 {% endblock %} |
| OLD | NEW |