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

Unified Diff: bindings/dart/scripts/dart_methods.py

Issue 551053003: Roll IDL Dartium37 (r181477) (Closed) Base URL: https://dart.googlecode.com/svn/third_party/WebCore
Patch Set: Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « bindings/dart/scripts/dart_interface.py ('k') | bindings/dart/scripts/dart_utilities.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bindings/dart/scripts/dart_methods.py
diff --git a/bindings/dart/scripts/dart_methods.py b/bindings/dart/scripts/dart_methods.py
index 0a59338bc4db6b4893d546b9cfe37e83209bc72c..aac8f5efe4b0cf1ac3b9218bfacc48f84f98784c 100644
--- a/bindings/dart/scripts/dart_methods.py
+++ b/bindings/dart/scripts/dart_methods.py
@@ -86,10 +86,23 @@ def generate_method(interface, method):
this_cpp_type = idl_type.cpp_type
is_auto_scope = not 'DartNoAutoScope' in extended_attributes
+
+ number_of_arguments = len(arguments)
+
+ number_of_required_arguments = \
+ len([
+ argument for argument in arguments
+ if not ((argument.is_optional and not ('Default' in argument.extended_attributes or argument.default_value)) or
+ argument.is_variadic)])
+
+ arguments_data = [generate_argument(interface, method, argument, index)
+ for index, argument in enumerate(arguments)]
+
+ is_custom = 'Custom' in extended_attributes or 'DartCustom' in extended_attributes
+
method_data = {
'activity_logging_world_list': DartUtilities.activity_logging_world_list(method), # [ActivityLogging]
- 'arguments': [generate_argument(interface, method, argument, index)
- for index, argument in enumerate(arguments)],
+ 'arguments': arguments_data,
'conditional_string': DartUtilities.conditional_string(method),
'cpp_type': this_cpp_type,
'cpp_value': this_cpp_value,
@@ -116,7 +129,7 @@ def generate_method(interface, method):
'is_call_with_script_state': is_call_with_script_state,
'is_check_security_for_frame': is_check_security_for_frame,
'is_check_security_for_node': is_check_security_for_node,
- 'is_custom': 'Custom' in extended_attributes or 'DartCustom' in extended_attributes,
+ 'is_custom': is_custom,
'is_custom_dart': 'DartCustom' in extended_attributes,
'is_custom_dart_new': DartUtilities.has_extended_attribute_value(method, 'DartCustom', 'New'),
'is_custom_element_callbacks': is_custom_element_callbacks,
@@ -135,11 +148,8 @@ def generate_method(interface, method):
'is_variadic': arguments and arguments[-1].is_variadic,
'measure_as': DartUtilities.measure_as(method), # [MeasureAs]
'name': name,
- 'number_of_arguments': len(arguments),
- 'number_of_required_arguments': len([
- argument for argument in arguments
- if not ((argument.is_optional and not ('Default' in argument.extended_attributes or argument.default_value)) or
- argument.is_variadic)]),
+ 'number_of_arguments': number_of_arguments,
+ 'number_of_required_arguments': number_of_required_arguments,
'number_of_required_or_variadic_arguments': len([
argument for argument in arguments
if not argument.is_optional]),
« no previous file with comments | « bindings/dart/scripts/dart_interface.py ('k') | bindings/dart/scripts/dart_utilities.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698