| 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 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 return 'RuntimeEnabledFeatures::%sEnabled' % uncapitalize(feature_name) | 395 return 'RuntimeEnabledFeatures::%sEnabled' % uncapitalize(feature_name) |
| 396 | 396 |
| 397 | 397 |
| 398 # [Unforgeable] | 398 # [Unforgeable] |
| 399 def is_unforgeable(interface, member): | 399 def is_unforgeable(interface, member): |
| 400 return (('Unforgeable' in interface.extended_attributes or | 400 return (('Unforgeable' in interface.extended_attributes or |
| 401 'Unforgeable' in member.extended_attributes) and | 401 'Unforgeable' in member.extended_attributes) and |
| 402 not member.is_static) | 402 not member.is_static) |
| 403 | 403 |
| 404 | 404 |
| 405 # [TypeChecking=Interface] / [LegacyInterfaceTypeChecking] | 405 # [LegacyInterfaceTypeChecking] |
| 406 def is_legacy_interface_type_checking(interface, member): | 406 def is_legacy_interface_type_checking(interface, member): |
| 407 if not ('TypeChecking' in interface.extended_attributes or | 407 return ('LegacyInterfaceTypeChecking' in interface.extended_attributes or |
| 408 'TypeChecking' in member.extended_attributes): | 408 'LegacyInterfaceTypeChecking' in member.extended_attributes) |
| 409 return True | |
| 410 if 'LegacyInterfaceTypeChecking' in member.extended_attributes: | |
| 411 return True | |
| 412 return False | |
| 413 | 409 |
| 414 | 410 |
| 415 # [Unforgeable], [Global], [PrimaryGlobal] | 411 # [Unforgeable], [Global], [PrimaryGlobal] |
| 416 def on_instance(interface, member): | 412 def on_instance(interface, member): |
| 417 """Returns True if the interface's member needs to be defined on every | 413 """Returns True if the interface's member needs to be defined on every |
| 418 instance object. | 414 instance object. |
| 419 | 415 |
| 420 The following members must be defiend on an instance object. | 416 The following members must be defiend on an instance object. |
| 421 - [Unforgeable] members | 417 - [Unforgeable] members |
| 422 - regular members of [Global] or [PrimaryGlobal] interfaces | 418 - regular members of [Global] or [PrimaryGlobal] interfaces |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 except StopIteration: | 578 except StopIteration: |
| 583 return None | 579 return None |
| 584 | 580 |
| 585 | 581 |
| 586 IdlInterface.indexed_property_getter = property(indexed_property_getter) | 582 IdlInterface.indexed_property_getter = property(indexed_property_getter) |
| 587 IdlInterface.indexed_property_setter = property(indexed_property_setter) | 583 IdlInterface.indexed_property_setter = property(indexed_property_setter) |
| 588 IdlInterface.indexed_property_deleter = property(indexed_property_deleter) | 584 IdlInterface.indexed_property_deleter = property(indexed_property_deleter) |
| 589 IdlInterface.named_property_getter = property(named_property_getter) | 585 IdlInterface.named_property_getter = property(named_property_getter) |
| 590 IdlInterface.named_property_setter = property(named_property_setter) | 586 IdlInterface.named_property_setter = property(named_property_setter) |
| 591 IdlInterface.named_property_deleter = property(named_property_deleter) | 587 IdlInterface.named_property_deleter = property(named_property_deleter) |
| OLD | NEW |