| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 'Int32Array', | 63 'Int32Array', |
| 64 'Uint8Array', | 64 'Uint8Array', |
| 65 'Uint8ClampedArray', | 65 'Uint8ClampedArray', |
| 66 'Uint16Array', | 66 'Uint16Array', |
| 67 'Uint32Array', | 67 'Uint32Array', |
| 68 ]) | 68 ]) |
| 69 ARRAY_BUFFER_AND_VIEW_TYPES = TYPED_ARRAY_TYPES.union(frozenset([ | 69 ARRAY_BUFFER_AND_VIEW_TYPES = TYPED_ARRAY_TYPES.union(frozenset([ |
| 70 'ArrayBuffer', | 70 'ArrayBuffer', |
| 71 'ArrayBufferView', | 71 'ArrayBufferView', |
| 72 'DataView', | 72 'DataView', |
| 73 'SharedArrayBuffer', |
| 73 ])) | 74 ])) |
| 74 | 75 |
| 76 |
| 75 IdlType.is_array_buffer_or_view = property( | 77 IdlType.is_array_buffer_or_view = property( |
| 76 lambda self: self.base_type in ARRAY_BUFFER_AND_VIEW_TYPES) | 78 lambda self: self.base_type in ARRAY_BUFFER_AND_VIEW_TYPES) |
| 77 | 79 |
| 78 IdlType.is_typed_array = property( | 80 IdlType.is_typed_array = property( |
| 79 lambda self: self.base_type in TYPED_ARRAY_TYPES) | 81 lambda self: self.base_type in TYPED_ARRAY_TYPES) |
| 80 | 82 |
| 81 IdlType.is_wrapper_type = property( | 83 IdlType.is_wrapper_type = property( |
| 82 lambda self: (self.is_interface_type and | 84 lambda self: (self.is_interface_type and |
| 83 not self.is_callback_interface and | 85 not self.is_callback_interface and |
| 84 self.base_type not in NON_WRAPPER_TYPES)) | 86 self.base_type not in NON_WRAPPER_TYPES)) |
| (...skipping 911 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 996 number_of_nullable_member_types_union) | 998 number_of_nullable_member_types_union) |
| 997 | 999 |
| 998 | 1000 |
| 999 def includes_nullable_type_union(idl_type): | 1001 def includes_nullable_type_union(idl_type): |
| 1000 # http://heycam.github.io/webidl/#dfn-includes-a-nullable-type | 1002 # http://heycam.github.io/webidl/#dfn-includes-a-nullable-type |
| 1001 return idl_type.number_of_nullable_member_types == 1 | 1003 return idl_type.number_of_nullable_member_types == 1 |
| 1002 | 1004 |
| 1003 IdlTypeBase.includes_nullable_type = False | 1005 IdlTypeBase.includes_nullable_type = False |
| 1004 IdlNullableType.includes_nullable_type = True | 1006 IdlNullableType.includes_nullable_type = True |
| 1005 IdlUnionType.includes_nullable_type = property(includes_nullable_type_union) | 1007 IdlUnionType.includes_nullable_type = property(includes_nullable_type_union) |
| OLD | NEW |