Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(632)

Side by Side Diff: third_party/WebKit/Source/bindings/templates/attributes.cpp

Issue 2043503002: Add [CEReactions] IDL attributes for Custom Elements V1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 {% from 'utilities.cpp' import declare_enum_validation_variable, v8_value_to_loc al_cpp_value %} 1 {% from 'utilities.cpp' import declare_enum_validation_variable, v8_value_to_loc al_cpp_value %}
2 2
3 {##############################################################################} 3 {##############################################################################}
4 {% macro attribute_getter(attribute, world_suffix) %} 4 {% macro attribute_getter(attribute, world_suffix) %}
5 static void {{attribute.name}}AttributeGetter{{world_suffix}}( 5 static void {{attribute.name}}AttributeGetter{{world_suffix}}(
6 {%- if attribute.is_data_type_property %} 6 {%- if attribute.is_data_type_property %}
7 const v8::PropertyCallbackInfo<v8::Value>& info 7 const v8::PropertyCallbackInfo<v8::Value>& info
8 {%- else %} 8 {%- else %}
9 const v8::FunctionCallbackInfo<v8::Value>& info 9 const v8::FunctionCallbackInfo<v8::Value>& info
10 {%- endif %}) 10 {%- endif %})
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 {% if not attribute.has_setter_exception_state %} 324 {% if not attribute.has_setter_exception_state %}
325 NonThrowableExceptionState exceptionState; 325 NonThrowableExceptionState exceptionState;
326 {% endif %} 326 {% endif %}
327 {{declare_enum_validation_variable(attribute.enum_values) | indent}} 327 {{declare_enum_validation_variable(attribute.enum_values) | indent}}
328 if (!isValidEnum(cppValue, validValues, WTF_ARRAY_LENGTH(validValues), "{{at tribute.enum_type}}", exceptionState)) { 328 if (!isValidEnum(cppValue, validValues, WTF_ARRAY_LENGTH(validValues), "{{at tribute.enum_type}}", exceptionState)) {
329 currentExecutionContext(info.GetIsolate())->addConsoleMessage(ConsoleMes sage::create(JSMessageSource, WarningMessageLevel, exceptionState.message())); 329 currentExecutionContext(info.GetIsolate())->addConsoleMessage(ConsoleMes sage::create(JSMessageSource, WarningMessageLevel, exceptionState.message()));
330 return; 330 return;
331 } 331 }
332 {% endif %} 332 {% endif %}
333 {# Pre-set context #} 333 {# Pre-set context #}
334 {% if attribute.is_ce_reactions %}
335 CEReactionsScope reactions;
Yuki 2016/06/06 06:13:56 nit: I'd prefer cereactionsScope or ceReactionsSco
kojii 2016/06/07 07:51:17 Done.
336 {% endif %}
334 {% if attribute.is_custom_element_callbacks or 337 {% if attribute.is_custom_element_callbacks or
335 (attribute.is_reflect and 338 (attribute.is_reflect and
336 not(attribute.idl_type == 'DOMString' and is_node)) %} 339 not(attribute.idl_type == 'DOMString' and is_node)) %}
337 {# Skip on compact node DOMString getters #} 340 {# Skip on compact node DOMString getters #}
338 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; 341 V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope;
339 {% endif %} 342 {% endif %}
340 {% if attribute.is_call_with_execution_context or 343 {% if attribute.is_call_with_execution_context or
341 attribute.is_setter_call_with_execution_context %} 344 attribute.is_setter_call_with_execution_context %}
342 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ()); 345 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
343 {% endif %} 346 {% endif %}
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 setter_callback_for_main_world, 509 setter_callback_for_main_world,
507 wrapper_type_info, 510 wrapper_type_info,
508 access_control, 511 access_control,
509 property_attribute, 512 property_attribute,
510 only_exposed_to_private_script, 513 only_exposed_to_private_script,
511 property_location(attribute), 514 property_location(attribute),
512 holder_check, 515 holder_check,
513 ] %} 516 ] %}
514 {{'{'}}{{attribute_configuration_list | join(', ')}}{{'}'}} 517 {{'{'}}{{attribute_configuration_list | join(', ')}}{{'}'}}
515 {%- endmacro %} 518 {%- endmacro %}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698