Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 3 # for details. All rights reserved. Use of this source code is governed by a | 3 # for details. All rights reserved. Use of this source code is governed by a |
| 4 # BSD-style license that can be found in the LICENSE file. | 4 # BSD-style license that can be found in the LICENSE file. |
| 5 | 5 |
| 6 """This module provides shared functionality to provide Dart metadata for | 6 """This module provides shared functionality to provide Dart metadata for |
| 7 DOM APIs. | 7 DOM APIs. |
| 8 """ | 8 """ |
| 9 | 9 |
| 10 import copy | 10 import copy |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 191 'IDBVersionChangeEvent.newVersion': [ | 191 'IDBVersionChangeEvent.newVersion': [ |
| 192 "@Creates('int|String|Null')", | 192 "@Creates('int|String|Null')", |
| 193 "@Returns('int|String|Null')", | 193 "@Returns('int|String|Null')", |
| 194 ], | 194 ], |
| 195 | 195 |
| 196 'IDBVersionChangeEvent.oldVersion': [ | 196 'IDBVersionChangeEvent.oldVersion': [ |
| 197 "@Creates('int|String|Null')", | 197 "@Creates('int|String|Null')", |
| 198 "@Returns('int|String|Null')", | 198 "@Returns('int|String|Null')", |
| 199 ], | 199 ], |
| 200 | 200 |
| 201 'MessageEvent.ports': ["@Creates('=List')"], | 201 'MessageEvent.ports': ["@Creates('JSExtendableArray')"], |
| 202 | 202 |
| 203 'MessageEvent.data': [ | 203 'MessageEvent.data': [ |
| 204 "@annotation_Creates_SerializedScriptValue", | 204 "@annotation_Creates_SerializedScriptValue", |
| 205 "@annotation_Returns_SerializedScriptValue", | 205 "@annotation_Returns_SerializedScriptValue", |
| 206 ], | 206 ], |
| 207 | 207 |
| 208 'Metadata.modificationTime': [ | 208 'Metadata.modificationTime': [ |
| 209 "@Creates('Null')", # JS date object. | 209 "@Creates('Null')", # JS date object. |
| 210 ], | 210 ], |
| 211 | 211 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 264 "@Creates('int|Null')", | 264 "@Creates('int|Null')", |
| 265 "@Returns('int|Null')", | 265 "@Returns('int|Null')", |
| 266 ], | 266 ], |
| 267 | 267 |
| 268 'WebGLRenderingContext.getTexParameter': [ | 268 'WebGLRenderingContext.getTexParameter': [ |
| 269 "@Creates('int|Null')", | 269 "@Creates('int|Null')", |
| 270 "@Returns('int|Null')", | 270 "@Returns('int|Null')", |
| 271 ], | 271 ], |
| 272 | 272 |
| 273 'WebGLRenderingContext.getUniform': [ | 273 'WebGLRenderingContext.getUniform': [ |
| 274 "@Creates('Null|num|String|bool|=List|Float32List|Int32List|Uint32List')", | 274 "@Creates('Null|num|String|bool|JSExtendableArray|Float32List|Int32List|Ui nt32List')", |
|
kasperl
2013/06/21 06:03:55
Lots of long lines.
ngeoffray
2013/06/24 09:47:23
Done.
| |
| 275 "@Returns('Null|num|String|bool|=List|Float32List|Int32List|Uint32List')", | 275 "@Returns('Null|num|String|bool|JSExtendableArray|Float32List|Int32List|Ui nt32List')", |
| 276 ], | 276 ], |
| 277 | 277 |
| 278 'WebGLRenderingContext.getVertexAttrib': [ | 278 'WebGLRenderingContext.getVertexAttrib': [ |
| 279 "@Creates('Null|num|bool|Float32List|Buffer')", | 279 "@Creates('Null|num|bool|Float32List|Buffer')", |
| 280 "@Returns('Null|num|bool|Float32List|Buffer')", | 280 "@Returns('Null|num|bool|Float32List|Buffer')", |
| 281 ], | 281 ], |
| 282 | 282 |
| 283 'WebGLRenderingContext.getParameter': [ | 283 'WebGLRenderingContext.getParameter': [ |
| 284 # Taken from http://www.khronos.org/registry/webgl/specs/latest/ | 284 # Taken from http://www.khronos.org/registry/webgl/specs/latest/ |
| 285 # Section 5.14.3 Setting and getting state | 285 # Section 5.14.3 Setting and getting state |
| 286 "@Creates('Null|num|String|bool|=List|Float32List|Int32List|Uint32List" | 286 "@Creates('Null|num|String|bool|JSExtendableArray|Float32List|Int32List|Ui nt32List" |
| 287 "|Framebuffer|Renderbuffer|Texture')", | 287 "|Framebuffer|Renderbuffer|Texture')", |
| 288 "@Returns('Null|num|String|bool|=List|Float32List|Int32List|Uint32List" | 288 "@Returns('Null|num|String|bool|JSExtendableArray|Float32List|Int32List|Ui nt32List" |
| 289 "|Framebuffer|Renderbuffer|Texture')", | 289 "|Framebuffer|Renderbuffer|Texture')", |
| 290 ], | 290 ], |
| 291 | 291 |
| 292 'XMLHttpRequest.response': [ | 292 'XMLHttpRequest.response': [ |
| 293 "@Creates('ByteBuffer|Blob|Document|=Object|=List|String|num')", | 293 "@Creates('ByteBuffer|Blob|Document|=Object|JSExtendableArray|String|num') ", |
| 294 ], | 294 ], |
| 295 }, dart2jsOnly=True) | 295 }, dart2jsOnly=True) |
| 296 | 296 |
| 297 _blink_experimental_annotations = [ | 297 _blink_experimental_annotations = [ |
| 298 "@SupportedBrowser(SupportedBrowser.CHROME)", | 298 "@SupportedBrowser(SupportedBrowser.CHROME)", |
| 299 "@Experimental", | 299 "@Experimental", |
| 300 ] | 300 ] |
| 301 | 301 |
| 302 _indexed_db_annotations = [ | 302 _indexed_db_annotations = [ |
| 303 "@SupportedBrowser(SupportedBrowser.CHROME)", | 303 "@SupportedBrowser(SupportedBrowser.CHROME)", |
| (...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 749 pass | 749 pass |
| 750 else: | 750 else: |
| 751 _logger.warn('Unknown support_level - %s:%s' % (interface_id, member_id)) | 751 _logger.warn('Unknown support_level - %s:%s' % (interface_id, member_id)) |
| 752 | 752 |
| 753 return annotations | 753 return annotations |
| 754 | 754 |
| 755 def Flush(self): | 755 def Flush(self): |
| 756 json_file = open(self._api_status_path, 'w+') | 756 json_file = open(self._api_status_path, 'w+') |
| 757 json.dump(self._types, json_file, indent=2, separators=(',', ': '), sort_key s=True) | 757 json.dump(self._types, json_file, indent=2, separators=(',', ': '), sort_key s=True) |
| 758 json_file.close() | 758 json_file.close() |
| OLD | NEW |