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 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 # Note that ExposeJSAccessors and DoNotExposeJSAccessors are more powerful | 454 # Note that ExposeJSAccessors and DoNotExposeJSAccessors are more powerful |
455 # than 'static', [Unforgeable] and [OverrideBuiltins]. | 455 # than 'static', [Unforgeable] and [OverrideBuiltins]. |
456 if 'ExposeJSAccessors' in member.extended_attributes: | 456 if 'ExposeJSAccessors' in member.extended_attributes: |
457 return True | 457 return True |
458 if 'DoNotExposeJSAccessors' in member.extended_attributes: | 458 if 'DoNotExposeJSAccessors' in member.extended_attributes: |
459 return False | 459 return False |
460 | 460 |
461 # These members must not be placed on prototype chains. | 461 # These members must not be placed on prototype chains. |
462 if (is_constructor_attribute(member) or | 462 if (is_constructor_attribute(member) or |
463 member.is_static or | 463 member.is_static or |
464 is_unforgeable(interface, member) or | 464 is_unforgeable(interface, member)): |
465 'OverrideBuiltins' in interface.extended_attributes): | |
466 return False | 465 return False |
467 | 466 |
468 # TODO(yukishiino): We should handle [Global] and [PrimaryGlobal] instead of | 467 # TODO(yukishiino): We should handle [Global] and [PrimaryGlobal] instead of |
469 # Window. | 468 # Window. |
470 if (interface.name == 'Window'): | 469 if (interface.name == 'Window'): |
471 return member.idl_type.name == 'EventHandler' | 470 return member.idl_type.name == 'EventHandler' |
472 | 471 |
473 if 'ExposeJSAccessors' in interface.extended_attributes: | 472 if 'ExposeJSAccessors' in interface.extended_attributes: |
474 return True | 473 return True |
475 if 'DoNotExposeJSAccessors' in interface.extended_attributes: | 474 if 'DoNotExposeJSAccessors' in interface.extended_attributes: |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
588 except StopIteration: | 587 except StopIteration: |
589 return None | 588 return None |
590 | 589 |
591 | 590 |
592 IdlInterface.indexed_property_getter = property(indexed_property_getter) | 591 IdlInterface.indexed_property_getter = property(indexed_property_getter) |
593 IdlInterface.indexed_property_setter = property(indexed_property_setter) | 592 IdlInterface.indexed_property_setter = property(indexed_property_setter) |
594 IdlInterface.indexed_property_deleter = property(indexed_property_deleter) | 593 IdlInterface.indexed_property_deleter = property(indexed_property_deleter) |
595 IdlInterface.named_property_getter = property(named_property_getter) | 594 IdlInterface.named_property_getter = property(named_property_getter) |
596 IdlInterface.named_property_setter = property(named_property_setter) | 595 IdlInterface.named_property_setter = property(named_property_setter) |
597 IdlInterface.named_property_deleter = property(named_property_deleter) | 596 IdlInterface.named_property_deleter = property(named_property_deleter) |
OLD | NEW |