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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 'argument_cpp_type': idl_type.cpp_type_args(used_as_rvalue_type=True), | 89 'argument_cpp_type': idl_type.cpp_type_args(used_as_rvalue_type=True), |
90 'cached_attribute_validation_method': extended_attributes.get('CachedAtt
ribute'), | 90 'cached_attribute_validation_method': extended_attributes.get('CachedAtt
ribute'), |
91 'conditional_string': v8_utilities.conditional_string(attribute), | 91 'conditional_string': v8_utilities.conditional_string(attribute), |
92 'constructor_type': idl_type.constructor_type_name | 92 'constructor_type': idl_type.constructor_type_name |
93 if is_constructor_attribute(attribute) else None, | 93 if is_constructor_attribute(attribute) else None, |
94 'cpp_name': cpp_name(attribute), | 94 'cpp_name': cpp_name(attribute), |
95 'cpp_type': idl_type.cpp_type, | 95 'cpp_type': idl_type.cpp_type, |
96 'cpp_type_initializer': idl_type.cpp_type_initializer, | 96 'cpp_type_initializer': idl_type.cpp_type_initializer, |
97 'deprecate_as': v8_utilities.deprecate_as(attribute), # [DeprecateAs] | 97 'deprecate_as': v8_utilities.deprecate_as(attribute), # [DeprecateAs] |
98 'enum_validation_expression': idl_type.enum_validation_expression, | 98 'enum_validation_expression': idl_type.enum_validation_expression, |
| 99 'exposed_test': v8_utilities.exposed(attribute, interface), # [Exposed] |
99 'has_custom_getter': has_custom_getter(attribute), | 100 'has_custom_getter': has_custom_getter(attribute), |
100 'has_custom_setter': has_custom_setter(attribute), | 101 'has_custom_setter': has_custom_setter(attribute), |
101 'has_type_checking_unrestricted': has_type_checking_unrestricted, | 102 'has_type_checking_unrestricted': has_type_checking_unrestricted, |
102 'idl_type': str(idl_type), # need trailing [] on array for Dictionary::
ConversionContext::setConversionType | 103 'idl_type': str(idl_type), # need trailing [] on array for Dictionary::
ConversionContext::setConversionType |
103 'is_call_with_execution_context': v8_utilities.has_extended_attribute_va
lue(attribute, 'CallWith', 'ExecutionContext'), | 104 'is_call_with_execution_context': v8_utilities.has_extended_attribute_va
lue(attribute, 'CallWith', 'ExecutionContext'), |
104 'is_call_with_script_state': v8_utilities.has_extended_attribute_value(a
ttribute, 'CallWith', 'ScriptState'), | 105 'is_call_with_script_state': v8_utilities.has_extended_attribute_value(a
ttribute, 'CallWith', 'ScriptState'), |
105 'is_check_security_for_node': is_check_security_for_node, | 106 'is_check_security_for_node': is_check_security_for_node, |
106 'is_custom_element_callbacks': is_custom_element_callbacks, | 107 'is_custom_element_callbacks': is_custom_element_callbacks, |
107 'is_expose_js_accessors': 'ExposeJSAccessors' in extended_attributes, | 108 'is_expose_js_accessors': 'ExposeJSAccessors' in extended_attributes, |
108 'is_getter_raises_exception': # [RaisesException] | 109 'is_getter_raises_exception': # [RaisesException] |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 lambda self: strip_suffix(self.base_type, 'Constructor')) | 494 lambda self: strip_suffix(self.base_type, 'Constructor')) |
494 | 495 |
495 | 496 |
496 def is_constructor_attribute(attribute): | 497 def is_constructor_attribute(attribute): |
497 # FIXME: replace this with [ConstructorAttribute] extended attribute | 498 # FIXME: replace this with [ConstructorAttribute] extended attribute |
498 return attribute.idl_type.base_type.endswith('Constructor') | 499 return attribute.idl_type.base_type.endswith('Constructor') |
499 | 500 |
500 | 501 |
501 def constructor_getter_context(interface, attribute, context): | 502 def constructor_getter_context(interface, attribute, context): |
502 context['needs_constructor_getter_callback'] = context['measure_as'] or cont
ext['deprecate_as'] | 503 context['needs_constructor_getter_callback'] = context['measure_as'] or cont
ext['deprecate_as'] |
OLD | NEW |