| 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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 def filter_runtime_enabled(attributes): | 219 def filter_runtime_enabled(attributes): |
| 220 return [attribute for attribute in attributes if | 220 return [attribute for attribute in attributes if |
| 221 attribute['runtime_feature_name'] and | 221 attribute['runtime_feature_name'] and |
| 222 not attribute['exposed_test']] | 222 not attribute['exposed_test']] |
| 223 | 223 |
| 224 | 224 |
| 225 def attribute_filters(): | 225 def attribute_filters(): |
| 226 return {'has_accessor_configuration': filter_has_accessor_configuration, | 226 return {'has_accessor_configuration': filter_has_accessor_configuration, |
| 227 'has_attribute_configuration': filter_has_attribute_configuration, | 227 'has_attribute_configuration': filter_has_attribute_configuration, |
| 228 'origin_trial_enabled_attributes': filter_origin_trial_enabled, | 228 'origin_trial_enabled_attributes': filter_origin_trial_enabled, |
| 229 'runtime_enabled_attributes': filter_runtime_enabled, | 229 'runtime_enabled_attributes': filter_runtime_enabled} |
| 230 } | |
| 231 | 230 |
| 232 | 231 |
| 233 ################################################################################ | 232 ################################################################################ |
| 234 # Getter | 233 # Getter |
| 235 ################################################################################ | 234 ################################################################################ |
| 236 | 235 |
| 237 def getter_context(interface, attribute, context): | 236 def getter_context(interface, attribute, context): |
| 238 idl_type = attribute.idl_type | 237 idl_type = attribute.idl_type |
| 239 base_idl_type = idl_type.base_type | 238 base_idl_type = idl_type.base_type |
| 240 extended_attributes = attribute.extended_attributes | 239 extended_attributes = attribute.extended_attributes |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 572 lambda self: strip_suffix(self.base_type, 'Constructor')) | 571 lambda self: strip_suffix(self.base_type, 'Constructor')) |
| 573 | 572 |
| 574 | 573 |
| 575 def is_constructor_attribute(attribute): | 574 def is_constructor_attribute(attribute): |
| 576 # FIXME: replace this with [ConstructorAttribute] extended attribute | 575 # FIXME: replace this with [ConstructorAttribute] extended attribute |
| 577 return attribute.idl_type.name.endswith('Constructor') | 576 return attribute.idl_type.name.endswith('Constructor') |
| 578 | 577 |
| 579 | 578 |
| 580 def update_constructor_attribute_context(interface, attribute, context): | 579 def update_constructor_attribute_context(interface, attribute, context): |
| 581 context['needs_constructor_getter_callback'] = context['measure_as'] or cont
ext['deprecate_as'] | 580 context['needs_constructor_getter_callback'] = context['measure_as'] or cont
ext['deprecate_as'] |
| OLD | NEW |