| 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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 template_contents.update({ | 210 template_contents.update({ |
| 211 'any_type_attributes': any_type_attributes, | 211 'any_type_attributes': any_type_attributes, |
| 212 'constructors': constructors, | 212 'constructors': constructors, |
| 213 'has_custom_constructor': bool(custom_constructors), | 213 'has_custom_constructor': bool(custom_constructors), |
| 214 'has_event_constructor': has_event_constructor, | 214 'has_event_constructor': has_event_constructor, |
| 215 'interface_length': | 215 'interface_length': |
| 216 interface_length(interface, constructors + custom_constructors), | 216 interface_length(interface, constructors + custom_constructors), |
| 217 'is_constructor_call_with_document': has_extended_attribute_value( | 217 'is_constructor_call_with_document': has_extended_attribute_value( |
| 218 interface, 'ConstructorCallWith', 'Document'), # [ConstructorCallWi
th=Document] | 218 interface, 'ConstructorCallWith', 'Document'), # [ConstructorCallWi
th=Document] |
| 219 'is_constructor_call_with_execution_context': has_extended_attribute_val
ue( | 219 'is_constructor_call_with_execution_context': has_extended_attribute_val
ue( |
| 220 interface, 'ConstructorCallWith', 'ExecutionContext'), # [Construct
orCallWith=ExeuctionContext] | 220 interface, 'ConstructorCallWith', 'ExecutionContext'), # [Construct
orCallWith=ExecutionContext] |
| 221 'is_constructor_raises_exception': extended_attributes.get('RaisesExcept
ion') == 'Constructor', # [RaisesException=Constructor] | 221 'is_constructor_raises_exception': extended_attributes.get('RaisesExcept
ion') == 'Constructor', # [RaisesException=Constructor] |
| 222 'named_constructor': named_constructor, | 222 'named_constructor': named_constructor, |
| 223 }) | 223 }) |
| 224 | 224 |
| 225 # Constants | 225 # Constants |
| 226 template_contents.update({ | 226 template_contents.update({ |
| 227 'constants': [generate_constant(constant) for constant in interface.cons
tants], | 227 'constants': [generate_constant(constant) for constant in interface.cons
tants], |
| 228 'do_not_check_constants': 'DoNotCheckConstants' in extended_attributes, | 228 'do_not_check_constants': 'DoNotCheckConstants' in extended_attributes, |
| 229 }) | 229 }) |
| 230 | 230 |
| (...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1078 deleter = next( | 1078 deleter = next( |
| 1079 method | 1079 method |
| 1080 for method in interface.operations | 1080 for method in interface.operations |
| 1081 if ('deleter' in method.specials and | 1081 if ('deleter' in method.specials and |
| 1082 len(method.arguments) == 1 and | 1082 len(method.arguments) == 1 and |
| 1083 str(method.arguments[0].idl_type) == 'DOMString')) | 1083 str(method.arguments[0].idl_type) == 'DOMString')) |
| 1084 except StopIteration: | 1084 except StopIteration: |
| 1085 return None | 1085 return None |
| 1086 | 1086 |
| 1087 return property_deleter(deleter) | 1087 return property_deleter(deleter) |
| OLD | NEW |