OLD | NEW |
---|---|
1 # Copyright (C) 2013 Google Inc. All rights reserved. | 1 # Copyright (C) 2013 Google Inc. All rights reserved. |
2 # coding=utf-8 | 2 # coding=utf-8 |
3 # | 3 # |
4 # Redistribution and use in source and binary forms, with or without | 4 # Redistribution and use in source and binary forms, with or without |
5 # modification, are permitted provided that the following conditions are | 5 # modification, are permitted provided that the following conditions are |
6 # met: | 6 # met: |
7 # | 7 # |
8 # * Redistributions of source code must retain the above copyright | 8 # * Redistributions of source code must retain the above copyright |
9 # notice, this list of conditions and the following disclaimer. | 9 # notice, this list of conditions and the following disclaimer. |
10 # * Redistributions in binary form must reproduce the above | 10 # * Redistributions in binary form must reproduce the above |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
305 # E.g., [RuntimeEnabled=Foo] void f(); void f(long x); | 305 # E.g., [RuntimeEnabled=Foo] void f(); void f(long x); |
306 # should have length 1 if Foo is not enabled, but length 0 if it is. | 306 # should have length 1 if Foo is not enabled, but length 0 if it is. |
307 method['length'] = (method['overloads']['minarg'] if 'overloads' in meth od else | 307 method['length'] = (method['overloads']['minarg'] if 'overloads' in meth od else |
308 method['number_of_required_arguments']) | 308 method['number_of_required_arguments']) |
309 | 309 |
310 context.update({ | 310 context.update({ |
311 'custom_registration_methods': custom_registration_methods, | 311 'custom_registration_methods': custom_registration_methods, |
312 'has_origin_safe_method_setter': any( | 312 'has_origin_safe_method_setter': any( |
313 method['is_check_security_for_frame'] and not method['is_read_only'] | 313 method['is_check_security_for_frame'] and not method['is_read_only'] |
314 for method in methods), | 314 for method in methods), |
315 'has_private_script': any(attribute['is_implemented_in_private_script'] for attribute in attributes) or | |
Jens Widell
2014/08/08 07:39:29
This isn't used anywhere?
| |
316 any(method['is_implemented_in_private_script'] for method in methods ), | |
315 'method_configuration_methods': method_configuration_methods, | 317 'method_configuration_methods': method_configuration_methods, |
316 'per_context_enabled_methods': per_context_enabled_methods, | 318 'per_context_enabled_methods': per_context_enabled_methods, |
317 'methods': methods, | 319 'methods': methods, |
318 }) | 320 }) |
319 | 321 |
320 context.update({ | 322 context.update({ |
321 'indexed_property_getter': indexed_property_getter(interface), | 323 'indexed_property_getter': indexed_property_getter(interface), |
322 'indexed_property_setter': indexed_property_setter(interface), | 324 'indexed_property_setter': indexed_property_setter(interface), |
323 'indexed_property_deleter': indexed_property_deleter(interface), | 325 'indexed_property_deleter': indexed_property_deleter(interface), |
324 'is_override_builtins': 'OverrideBuiltins' in extended_attributes, | 326 'is_override_builtins': 'OverrideBuiltins' in extended_attributes, |
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1102 deleter = next( | 1104 deleter = next( |
1103 method | 1105 method |
1104 for method in interface.operations | 1106 for method in interface.operations |
1105 if ('deleter' in method.specials and | 1107 if ('deleter' in method.specials and |
1106 len(method.arguments) == 1 and | 1108 len(method.arguments) == 1 and |
1107 str(method.arguments[0].idl_type) == 'DOMString')) | 1109 str(method.arguments[0].idl_type) == 'DOMString')) |
1108 except StopIteration: | 1110 except StopIteration: |
1109 return None | 1111 return None |
1110 | 1112 |
1111 return property_deleter(deleter) | 1113 return property_deleter(deleter) |
OLD | NEW |