| Index: third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl
|
| diff --git a/third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl
|
| index d81b1b5252b972fd767e9ea633f27aa00a898171..3870a15cd1c8318bad73b0555185a8fd0363a192 100644
|
| --- a/third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl
|
| +++ b/third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl
|
| @@ -531,16 +531,15 @@ static void install{{v8_class}}Template(v8::Isolate* isolate, const DOMWrapperWo
|
| {% from 'attributes.cpp.tmpl' import attribute_configuration with context %}
|
| {% from 'constants.cpp.tmpl' import constant_configuration with context %}
|
| {% from 'methods.cpp.tmpl' import method_configuration with context %}
|
| -{% for origin_trial_feature in origin_trial_features %}
|
| -void {{v8_class_or_partial}}::install{{origin_trial_feature.name}}(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::Object> instance, v8::Local<v8::Object> prototype, v8::Local<v8::Function> interface) {
|
| - {% if attributes | for_origin_trial_feature(origin_trial_feature.name) or
|
| - methods | method_for_origin_trial_feature(origin_trial_feature.name, is_partial) %}
|
| +{% for feature in origin_trial_features %}
|
| +void {{v8_class_or_partial}}::install{{feature.name}}(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::Object> instance, v8::Local<v8::Object> prototype, v8::Local<v8::Function> interface) {
|
| + {% if feature.attributes or feature.methods %}
|
| v8::Local<v8::FunctionTemplate> interfaceTemplate = {{v8_class}}::wrapperTypeInfo.domTemplate(isolate, world);
|
| v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemplate);
|
| ALLOW_UNUSED_LOCAL(signature);
|
| {% endif %}
|
| {# Origin-Trial-enabled attributes #}
|
| - {% for attribute in attributes | for_origin_trial_feature(origin_trial_feature.name) | unique_by('name') | sort %}
|
| + {% for attribute in feature.attributes %}
|
| {% if attribute.is_data_type_property %}
|
| const V8DOMConfiguration::AttributeConfiguration attribute{{attribute.name}}Configuration = {{attribute_configuration(attribute)}};
|
| V8DOMConfiguration::installAttribute(isolate, world, instance, prototype, attribute{{attribute.name}}Configuration);
|
| @@ -550,34 +549,34 @@ void {{v8_class_or_partial}}::install{{origin_trial_feature.name}}(v8::Isolate*
|
| {% endif %}
|
| {% endfor %}
|
| {# Origin-Trial-enabled constants #}
|
| - {% for constant in constants | for_origin_trial_feature(origin_trial_feature.name) | unique_by('name') | sort %}
|
| + {% for constant in feature.constants %}
|
| {% set constant_name = constant.name.title().replace('_', '') %}
|
| const V8DOMConfiguration::ConstantConfiguration constant{{constant_name}}Configuration = {{constant_configuration(constant)}};
|
| V8DOMConfiguration::installConstant(isolate, interface, prototype, constant{{constant_name}}Configuration);
|
| {% endfor %}
|
| {# Origin-Trial-enabled methods (no overloads) #}
|
| - {% for method in methods | method_for_origin_trial_feature(origin_trial_feature.name, is_partial) | unique_by('name') | sort %}
|
| + {% for method in feature.methods %}
|
| {% set method_name = method.name.title().replace('_', '') %}
|
| const V8DOMConfiguration::MethodConfiguration method{{method_name}}Configuration = {{method_configuration(method)}};
|
| V8DOMConfiguration::installMethod(isolate, world, instance, prototype, interface, signature, method{{method_name}}Configuration);
|
| {% endfor %}
|
| }
|
|
|
| -void {{v8_class_or_partial}}::install{{origin_trial_feature.name}}(ScriptState* scriptState, v8::Local<v8::Object> instance) {
|
| +void {{v8_class_or_partial}}::install{{feature.name}}(ScriptState* scriptState, v8::Local<v8::Object> instance) {
|
| V8PerContextData* perContextData = V8PerContextData::from(scriptState->context());
|
| v8::Local<v8::Object> prototype = perContextData->prototypeForType(&{{v8_class}}::wrapperTypeInfo);
|
| v8::Local<v8::Function> interface = perContextData->constructorForType(&{{v8_class}}::wrapperTypeInfo);
|
| ALLOW_UNUSED_LOCAL(interface);
|
| - install{{origin_trial_feature.name}}(scriptState->isolate(), scriptState->world(), instance, prototype, interface);
|
| + install{{feature.name}}(scriptState->isolate(), scriptState->world(), instance, prototype, interface);
|
| }
|
| -{% if not origin_trial_feature.needs_instance %}
|
| +{% if not feature.needs_instance %}
|
|
|
| -void {{v8_class_or_partial}}::install{{origin_trial_feature.name}}(ScriptState* scriptState) {
|
| - install{{origin_trial_feature.name}}(scriptState, v8::Local<v8::Object>());
|
| +void {{v8_class_or_partial}}::install{{feature.name}}(ScriptState* scriptState) {
|
| + install{{feature.name}}(scriptState, v8::Local<v8::Object>());
|
| }
|
| {% endif %}
|
|
|
| -{% endfor %}
|
| +{% endfor %}{# feature #}
|
| {% endblock %}
|
| {##############################################################################}
|
| {% block get_dom_template %}{% endblock %}
|
|
|