OLD | NEW |
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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 has_custom_getter = ('Custom' in extended_attributes and | 56 has_custom_getter = ('Custom' in extended_attributes and |
57 extended_attributes['Custom'] in [None, 'Getter']) | 57 extended_attributes['Custom'] in [None, 'Getter']) |
58 has_custom_setter = (not attribute.is_read_only and | 58 has_custom_setter = (not attribute.is_read_only and |
59 'Custom' in extended_attributes and | 59 'Custom' in extended_attributes and |
60 extended_attributes['Custom'] in [None, 'Setter']) | 60 extended_attributes['Custom'] in [None, 'Setter']) |
61 # [CustomElementCallbacks], [Reflect] | 61 # [CustomElementCallbacks], [Reflect] |
62 is_custom_element_callbacks = 'CustomElementCallbacks' in extended_attribute
s | 62 is_custom_element_callbacks = 'CustomElementCallbacks' in extended_attribute
s |
63 is_reflect = 'Reflect' in extended_attributes | 63 is_reflect = 'Reflect' in extended_attributes |
64 if is_custom_element_callbacks or is_reflect: | 64 if is_custom_element_callbacks or is_reflect: |
65 includes.add('core/dom/custom/CustomElementCallbackDispatcher.h') | 65 includes.add('core/dom/custom/CustomElementCallbackDispatcher.h') |
| 66 # [PerWorldBindings] |
| 67 if 'PerWorldBindings' in extended_attributes: |
| 68 assert idl_type.is_wrapper_type or 'LogActivity' in extended_attributes,
'[PerWorldBindings] should only be used with wrapper types: %s.%s' % (interface
.name, attribute.name) |
66 # [RaisesException], [RaisesException=Setter] | 69 # [RaisesException], [RaisesException=Setter] |
67 is_setter_raises_exception = ( | 70 is_setter_raises_exception = ( |
68 'RaisesException' in extended_attributes and | 71 'RaisesException' in extended_attributes and |
69 extended_attributes['RaisesException'] in [None, 'Setter']) | 72 extended_attributes['RaisesException'] in [None, 'Setter']) |
70 # [TypeChecking] | 73 # [TypeChecking] |
71 has_type_checking_interface = ( | 74 has_type_checking_interface = ( |
72 (has_extended_attribute_value(interface, 'TypeChecking', 'Interface') or | 75 (has_extended_attribute_value(interface, 'TypeChecking', 'Interface') or |
73 has_extended_attribute_value(attribute, 'TypeChecking', 'Interface')) a
nd | 76 has_extended_attribute_value(attribute, 'TypeChecking', 'Interface')) a
nd |
74 idl_type.is_wrapper_type) | 77 idl_type.is_wrapper_type) |
75 has_type_checking_nullable = ( | 78 has_type_checking_nullable = ( |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 lambda self: strip_suffix(self.base_type, 'Constructor')) | 413 lambda self: strip_suffix(self.base_type, 'Constructor')) |
411 | 414 |
412 | 415 |
413 def is_constructor_attribute(attribute): | 416 def is_constructor_attribute(attribute): |
414 # FIXME: replace this with [ConstructorAttribute] extended attribute | 417 # FIXME: replace this with [ConstructorAttribute] extended attribute |
415 return attribute.idl_type.base_type.endswith('Constructor') | 418 return attribute.idl_type.base_type.endswith('Constructor') |
416 | 419 |
417 | 420 |
418 def generate_constructor_getter(interface, attribute, contents): | 421 def generate_constructor_getter(interface, attribute, contents): |
419 contents['needs_constructor_getter_callback'] = contents['measure_as'] or co
ntents['deprecate_as'] | 422 contents['needs_constructor_getter_callback'] = contents['measure_as'] or co
ntents['deprecate_as'] |
OLD | NEW |