Chromium Code Reviews| 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 149 'is_custom_element_callbacks': is_custom_element_callbacks, | 149 'is_custom_element_callbacks': is_custom_element_callbacks, | 
| 150 # TODO(yukishiino): Make all DOM attributes accessor-type properties. | 150 # TODO(yukishiino): Make all DOM attributes accessor-type properties. | 
| 151 'is_data_type_property': is_data_type_property(interface, attribute), | 151 'is_data_type_property': is_data_type_property(interface, attribute), | 
| 152 'is_getter_raises_exception': # [RaisesException] | 152 'is_getter_raises_exception': # [RaisesException] | 
| 153 'RaisesException' in extended_attributes and | 153 'RaisesException' in extended_attributes and | 
| 154 extended_attributes['RaisesException'] in (None, 'Getter'), | 154 extended_attributes['RaisesException'] in (None, 'Getter'), | 
| 155 'is_keep_alive_for_gc': keep_alive_for_gc, | 155 'is_keep_alive_for_gc': keep_alive_for_gc, | 
| 156 'is_lenient_this': 'LenientThis' in extended_attributes, | 156 'is_lenient_this': 'LenientThis' in extended_attributes, | 
| 157 'is_nullable': idl_type.is_nullable, | 157 'is_nullable': idl_type.is_nullable, | 
| 158 'is_explicit_nullable': idl_type.is_explicit_nullable, | 158 'is_explicit_nullable': idl_type.is_explicit_nullable, | 
| 159 'is_named_constructor': is_named_constructor_attribute(attribute), | |
| 159 'is_partial_interface_member': | 160 'is_partial_interface_member': | 
| 160 'PartialInterfaceImplementedAs' in extended_attributes, | 161 'PartialInterfaceImplementedAs' in extended_attributes, | 
| 161 'is_per_world_bindings': 'PerWorldBindings' in extended_attributes, | 162 'is_per_world_bindings': 'PerWorldBindings' in extended_attributes, | 
| 162 'is_put_forwards': 'PutForwards' in extended_attributes, | 163 'is_put_forwards': 'PutForwards' in extended_attributes, | 
| 163 'is_read_only': attribute.is_read_only, | 164 'is_read_only': attribute.is_read_only, | 
| 164 'is_reflect': is_reflect, | 165 'is_reflect': is_reflect, | 
| 165 'is_replaceable': 'Replaceable' in attribute.extended_attributes, | 166 'is_replaceable': 'Replaceable' in attribute.extended_attributes, | 
| 166 'is_save_same_object': is_save_same_object, | 167 'is_save_same_object': is_save_same_object, | 
| 167 'is_static': attribute.is_static, | 168 'is_static': attribute.is_static, | 
| 168 'is_url': 'URL' in extended_attributes, | 169 'is_url': 'URL' in extended_attributes, | 
| (...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 564 idl_types.IdlType.constructor_type_name = property( | 565 idl_types.IdlType.constructor_type_name = property( | 
| 565 # FIXME: replace this with a [ConstructorAttribute] extended attribute | 566 # FIXME: replace this with a [ConstructorAttribute] extended attribute | 
| 566 lambda self: strip_suffix(self.base_type, 'Constructor')) | 567 lambda self: strip_suffix(self.base_type, 'Constructor')) | 
| 567 | 568 | 
| 568 | 569 | 
| 569 def is_constructor_attribute(attribute): | 570 def is_constructor_attribute(attribute): | 
| 570 # FIXME: replace this with [ConstructorAttribute] extended attribute | 571 # FIXME: replace this with [ConstructorAttribute] extended attribute | 
| 571 return attribute.idl_type.name.endswith('Constructor') | 572 return attribute.idl_type.name.endswith('Constructor') | 
| 572 | 573 | 
| 573 | 574 | 
| 575 def is_named_constructor_attribute(attribute): | |
| 576 # FIXME: replace this with [NamedConstructor] extended attribute | |
| 
 
Yuki
2017/01/19 09:57:28
nit: FIXME is an old style in WebKit era, and we'r
 
bashi
2017/01/19 09:58:01
Can we remove this comment? I think FIXME comments
 
Yuki
2017/01/19 10:09:30
I'm fine to remove the comment.
 
sashab
2017/01/20 04:37:05
Removed all 3 comments on lines 571, 566 and new a
 
 | |
| 577 return attribute.idl_type.name.endswith('ConstructorConstructor') | |
| 578 | |
| 579 | |
| 574 def update_constructor_attribute_context(interface, attribute, context): | 580 def update_constructor_attribute_context(interface, attribute, context): | 
| 575 context['needs_constructor_getter_callback'] = context['measure_as'] or cont ext['deprecate_as'] | 581 context['needs_constructor_getter_callback'] = context['measure_as'] or cont ext['deprecate_as'] | 
| OLD | NEW |