| 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 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 500 | 500 |
| 501 def generated_argument(idl_type, name, is_optional=False, extended_attribute
s=None): | 501 def generated_argument(idl_type, name, is_optional=False, extended_attribute
s=None): |
| 502 argument = IdlArgument() | 502 argument = IdlArgument() |
| 503 argument.idl_type = idl_type | 503 argument.idl_type = idl_type |
| 504 argument.name = name | 504 argument.name = name |
| 505 argument.is_optional = is_optional | 505 argument.is_optional = is_optional |
| 506 if extended_attributes: | 506 if extended_attributes: |
| 507 argument.extended_attributes.update(extended_attributes) | 507 argument.extended_attributes.update(extended_attributes) |
| 508 return argument | 508 return argument |
| 509 | 509 |
| 510 # [Iterable], iterable<>, maplike<> and setlike<> | 510 # iterable<>, maplike<> and setlike<> |
| 511 iterator_method = None | 511 iterator_method = None |
| 512 | 512 |
| 513 # FIXME: support Iterable in partial interfaces. However, we don't | 513 # FIXME: support Iterable in partial interfaces. However, we don't |
| 514 # need to support iterator overloads between interface and | 514 # need to support iterator overloads between interface and |
| 515 # partial interface definitions. | 515 # partial interface definitions. |
| 516 # http://heycam.github.io/webidl/#idl-overloading | 516 # http://heycam.github.io/webidl/#idl-overloading |
| 517 if (not interface.is_partial and ( | 517 if (not interface.is_partial and ( |
| 518 interface.iterable or interface.maplike or interface.setlike or | 518 interface.iterable or interface.maplike or interface.setlike or |
| 519 interface.has_indexed_elements or | 519 interface.has_indexed_elements)): |
| 520 'Iterable' in interface.extended_attributes)): | |
| 521 | 520 |
| 522 used_extended_attributes = {} | 521 used_extended_attributes = {} |
| 523 | 522 |
| 524 if interface.iterable: | 523 if interface.iterable: |
| 525 used_extended_attributes.update(interface.iterable.extended_attribut
es) | 524 used_extended_attributes.update(interface.iterable.extended_attribut
es) |
| 526 elif interface.maplike: | 525 elif interface.maplike: |
| 527 used_extended_attributes.update(interface.maplike.extended_attribute
s) | 526 used_extended_attributes.update(interface.maplike.extended_attribute
s) |
| 528 elif interface.setlike: | 527 elif interface.setlike: |
| 529 used_extended_attributes.update(interface.setlike.extended_attribute
s) | 528 used_extended_attributes.update(interface.setlike.extended_attribute
s) |
| 530 | 529 |
| (...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1373 extended_attributes = deleter.extended_attributes | 1372 extended_attributes = deleter.extended_attributes |
| 1374 is_call_with_script_state = v8_utilities.has_extended_attribute_value(delete
r, 'CallWith', 'ScriptState') | 1373 is_call_with_script_state = v8_utilities.has_extended_attribute_value(delete
r, 'CallWith', 'ScriptState') |
| 1375 is_ce_reactions = 'CEReactions' in extended_attributes | 1374 is_ce_reactions = 'CEReactions' in extended_attributes |
| 1376 return { | 1375 return { |
| 1377 'is_call_with_script_state': is_call_with_script_state, | 1376 'is_call_with_script_state': is_call_with_script_state, |
| 1378 'is_ce_reactions': is_ce_reactions, | 1377 'is_ce_reactions': is_ce_reactions, |
| 1379 'is_custom': 'Custom' in extended_attributes, | 1378 'is_custom': 'Custom' in extended_attributes, |
| 1380 'is_raises_exception': 'RaisesException' in extended_attributes, | 1379 'is_raises_exception': 'RaisesException' in extended_attributes, |
| 1381 'name': cpp_name(deleter), | 1380 'name': cpp_name(deleter), |
| 1382 } | 1381 } |
| OLD | NEW |