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 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 'is_null_expression': is_null_expression(idl_type), | 507 'is_null_expression': is_null_expression(idl_type), |
508 'name': cpp_name(getter), | 508 'name': cpp_name(getter), |
509 'v8_set_return_value': v8_types.v8_set_return_value(idl_type, 'element',
extended_attributes=extended_attributes, script_wrappable='collection'), | 509 'v8_set_return_value': v8_types.v8_set_return_value(idl_type, 'element',
extended_attributes=extended_attributes, script_wrappable='collection'), |
510 } | 510 } |
511 | 511 |
512 | 512 |
513 def property_setter(setter): | 513 def property_setter(setter): |
514 idl_type = setter.arguments[1].idl_type | 514 idl_type = setter.arguments[1].idl_type |
515 extended_attributes = setter.extended_attributes | 515 extended_attributes = setter.extended_attributes |
516 return { | 516 return { |
| 517 'has_strict_type_checking': |
| 518 'StrictTypeChecking' in extended_attributes and |
| 519 v8_types.is_wrapper_type(idl_type), |
| 520 'idl_type': idl_type, |
517 'is_custom': 'Custom' in extended_attributes, | 521 'is_custom': 'Custom' in extended_attributes, |
518 'name': cpp_name(setter), | 522 'name': cpp_name(setter), |
519 'v8_value_to_local_cpp_value': v8_types.v8_value_to_local_cpp_value( | 523 'v8_value_to_local_cpp_value': v8_types.v8_value_to_local_cpp_value( |
520 idl_type, extended_attributes, 'jsValue', 'propertyValue'), | 524 idl_type, extended_attributes, 'jsValue', 'propertyValue'), |
521 } | 525 } |
522 | 526 |
523 | 527 |
524 def property_deleter(deleter): | 528 def property_deleter(deleter): |
525 idl_type = deleter.idl_type | 529 idl_type = deleter.idl_type |
526 if idl_type != 'boolean': | 530 if idl_type != 'boolean': |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
631 deleter = next( | 635 deleter = next( |
632 method | 636 method |
633 for method in interface.operations | 637 for method in interface.operations |
634 if ('deleter' in method.specials and | 638 if ('deleter' in method.specials and |
635 len(method.arguments) == 1 and | 639 len(method.arguments) == 1 and |
636 method.arguments[0].idl_type == 'DOMString')) | 640 method.arguments[0].idl_type == 'DOMString')) |
637 except StopIteration: | 641 except StopIteration: |
638 return None | 642 return None |
639 | 643 |
640 return property_deleter(deleter) | 644 return property_deleter(deleter) |
OLD | NEW |