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

Side by Side Diff: Source/bindings/scripts/v8_attributes.py

Issue 420763002: IDL: DOM impl class code generation for IDL dictionaries (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 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 # Copyright (C) 2013 Google Inc. All rights reserved. 1 # Copyright (C) 2013 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 interface.name in ['Window', 'WorkerGlobalScope'] and 85 interface.name in ['Window', 'WorkerGlobalScope'] and
86 attribute.name == 'onerror'): 86 attribute.name == 'onerror'):
87 includes.add('bindings/core/v8/V8ErrorHandler.h') 87 includes.add('bindings/core/v8/V8ErrorHandler.h')
88 88
89 context = { 89 context = {
90 'access_control_list': access_control_list(attribute), 90 'access_control_list': access_control_list(attribute),
91 'activity_logging_world_list_for_getter': v8_utilities.activity_logging_ world_list(attribute, 'Getter'), # [ActivityLogging] 91 'activity_logging_world_list_for_getter': v8_utilities.activity_logging_ world_list(attribute, 'Getter'), # [ActivityLogging]
92 'activity_logging_world_list_for_setter': v8_utilities.activity_logging_ world_list(attribute, 'Setter'), # [ActivityLogging] 92 'activity_logging_world_list_for_setter': v8_utilities.activity_logging_ world_list(attribute, 'Setter'), # [ActivityLogging]
93 'activity_logging_include_old_value_for_setter': 'LogPreviousValue' in e xtended_attributes, # [ActivityLogging] 93 'activity_logging_include_old_value_for_setter': 'LogPreviousValue' in e xtended_attributes, # [ActivityLogging]
94 'activity_logging_world_check': v8_utilities.activity_logging_world_chec k(attribute), # [ActivityLogging] 94 'activity_logging_world_check': v8_utilities.activity_logging_world_chec k(attribute), # [ActivityLogging]
95 'argument_cpp_type': idl_type.cpp_type_args(used_as_argument=True), 95 'argument_cpp_type': idl_type.cpp_type_args(used_as_rvalue_type=True),
96 'cached_attribute_validation_method': extended_attributes.get('CachedAtt ribute'), 96 'cached_attribute_validation_method': extended_attributes.get('CachedAtt ribute'),
97 'conditional_string': v8_utilities.conditional_string(attribute), 97 'conditional_string': v8_utilities.conditional_string(attribute),
98 'constructor_type': idl_type.constructor_type_name 98 'constructor_type': idl_type.constructor_type_name
99 if is_constructor_attribute(attribute) else None, 99 if is_constructor_attribute(attribute) else None,
100 'cpp_name': cpp_name(attribute), 100 'cpp_name': cpp_name(attribute),
101 'cpp_type': idl_type.cpp_type, 101 'cpp_type': idl_type.cpp_type,
102 'cpp_type_initializer': idl_type.cpp_type_initializer, 102 'cpp_type_initializer': idl_type.cpp_type_initializer,
103 'deprecate_as': v8_utilities.deprecate_as(attribute), # [DeprecateAs] 103 'deprecate_as': v8_utilities.deprecate_as(attribute), # [DeprecateAs]
104 'enum_validation_expression': idl_type.enum_validation_expression, 104 'enum_validation_expression': idl_type.enum_validation_expression,
105 'has_custom_getter': has_custom_getter, 105 'has_custom_getter': has_custom_getter,
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 lambda self: strip_suffix(self.base_type, 'Constructor')) 482 lambda self: strip_suffix(self.base_type, 'Constructor'))
483 483
484 484
485 def is_constructor_attribute(attribute): 485 def is_constructor_attribute(attribute):
486 # FIXME: replace this with [ConstructorAttribute] extended attribute 486 # FIXME: replace this with [ConstructorAttribute] extended attribute
487 return attribute.idl_type.base_type.endswith('Constructor') 487 return attribute.idl_type.base_type.endswith('Constructor')
488 488
489 489
490 def constructor_getter_context(interface, attribute, context): 490 def constructor_getter_context(interface, attribute, context):
491 context['needs_constructor_getter_callback'] = context['measure_as'] or cont ext['deprecate_as'] 491 context['needs_constructor_getter_callback'] = context['measure_as'] or cont ext['deprecate_as']
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698