Chromium Code Reviews| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 62 'Int16Array', | 62 'Int16Array', |
| 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 'SharedArrayBuffer', | |
|
haraken
2015/06/11 05:59:28
Alphabetical order.
| |
| 72 'DataView', | 73 'DataView', |
| 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 906 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 991 number_of_nullable_member_types_union) | 993 number_of_nullable_member_types_union) |
| 992 | 994 |
| 993 | 995 |
| 994 def includes_nullable_type_union(idl_type): | 996 def includes_nullable_type_union(idl_type): |
| 995 # http://heycam.github.io/webidl/#dfn-includes-a-nullable-type | 997 # http://heycam.github.io/webidl/#dfn-includes-a-nullable-type |
| 996 return idl_type.number_of_nullable_member_types == 1 | 998 return idl_type.number_of_nullable_member_types == 1 |
| 997 | 999 |
| 998 IdlTypeBase.includes_nullable_type = False | 1000 IdlTypeBase.includes_nullable_type = False |
| 999 IdlNullableType.includes_nullable_type = True | 1001 IdlNullableType.includes_nullable_type = True |
| 1000 IdlUnionType.includes_nullable_type = property(includes_nullable_type_union) | 1002 IdlUnionType.includes_nullable_type = property(includes_nullable_type_union) |
| OLD | NEW |