Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(197)

Side by Side Diff: tools/dom/scripts/dartmetadata.py

Issue 130563004: Redo "Make dart2js typed_data implementation classes private" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 # Only nodes in the DOM bubble and have target !== currentTarget. 102 # Only nodes in the DOM bubble and have target !== currentTarget.
103 'Event.target': [ 103 'Event.target': [
104 "@Creates('Node')", 104 "@Creates('Node')",
105 "@Returns('EventTarget|=Object')", 105 "@Returns('EventTarget|=Object')",
106 ], 106 ],
107 107
108 'File.lastModifiedDate': [ 108 'File.lastModifiedDate': [
109 "@Creates('Null')", # JS date object. 109 "@Creates('Null')", # JS date object.
110 ], 110 ],
111 111
112 'FileReader.result': ["@Creates('String|ByteBuffer|Null')"], 112 'FileReader.result': ["@Creates('String|NativeByteBuffer|Null')"],
113 113
114 'FocusEvent.relatedTarget': [ 114 'FocusEvent.relatedTarget': [
115 "@Creates('Null')", 115 "@Creates('Null')",
116 ], 116 ],
117 117
118 'HTMLInputElement.valueAsDate': [ 118 'HTMLInputElement.valueAsDate': [
119 "@Creates('Null')", # JS date object. 119 "@Creates('Null')", # JS date object.
120 ], 120 ],
121 121
122 # Rather than have the result of an IDBRequest as a union over all possible 122 # Rather than have the result of an IDBRequest as a union over all possible
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 "@Creates('int|String|Null')", 201 "@Creates('int|String|Null')",
202 "@Returns('int|String|Null')", 202 "@Returns('int|String|Null')",
203 ], 203 ],
204 204
205 'IDBVersionChangeEvent.oldVersion': [ 205 'IDBVersionChangeEvent.oldVersion': [
206 "@Creates('int|String|Null')", 206 "@Creates('int|String|Null')",
207 "@Returns('int|String|Null')", 207 "@Returns('int|String|Null')",
208 ], 208 ],
209 209
210 'ImageData.data': [ 210 'ImageData.data': [
211 "@Creates('Uint8ClampedList')", 211 "@Creates('NativeUint8ClampedList')",
212 "@Returns('Uint8ClampedList')", 212 "@Returns('NativeUint8ClampedList')",
213 ], 213 ],
214 214
215 'MediaStream.getAudioTracks': [ 215 'MediaStream.getAudioTracks': [
216 "@Creates('JSExtendableArray')", 216 "@Creates('JSExtendableArray')",
217 "@Returns('JSExtendableArray')", 217 "@Returns('JSExtendableArray')",
218 ], 218 ],
219 219
220 'MediaStream.getVideoTracks': [ 220 'MediaStream.getVideoTracks': [
221 "@Creates('JSExtendableArray')", 221 "@Creates('JSExtendableArray')",
222 "@Returns('JSExtendableArray')", 222 "@Returns('JSExtendableArray')",
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 "@Creates('int|bool|Null')", 293 "@Creates('int|bool|Null')",
294 "@Returns('int|bool|Null')", 294 "@Returns('int|bool|Null')",
295 ], 295 ],
296 296
297 'WebGLRenderingContext.getTexParameter': [ 297 'WebGLRenderingContext.getTexParameter': [
298 "@Creates('int|Null')", 298 "@Creates('int|Null')",
299 "@Returns('int|Null')", 299 "@Returns('int|Null')",
300 ], 300 ],
301 301
302 'WebGLRenderingContext.getUniform': [ 302 'WebGLRenderingContext.getUniform': [
303 "@Creates('Null|num|String|bool|JSExtendableArray|Float32List|Int32List" 303 "@Creates('Null|num|String|bool|JSExtendableArray|"
304 "|Uint32List')", 304 "NativeFloat32List|NativeInt32List|NativeUint32List')",
305 "@Returns('Null|num|String|bool|JSExtendableArray|Float32List|Int32List" 305 "@Returns('Null|num|String|bool|JSExtendableArray|"
306 "|Uint32List')", 306 "NativeFloat32List|NativeInt32List|NativeUint32List')",
307 ], 307 ],
308 308
309 'WebGLRenderingContext.getVertexAttrib': [ 309 'WebGLRenderingContext.getVertexAttrib': [
310 "@Creates('Null|num|bool|Float32List|Buffer')", 310 "@Creates('Null|num|bool|NativeFloat32List|Buffer')",
311 "@Returns('Null|num|bool|Float32List|Buffer')", 311 "@Returns('Null|num|bool|NativeFloat32List|Buffer')",
312 ], 312 ],
313 313
314 'WebGLRenderingContext.getParameter': [ 314 'WebGLRenderingContext.getParameter': [
315 # Taken from http://www.khronos.org/registry/webgl/specs/latest/ 315 # Taken from http://www.khronos.org/registry/webgl/specs/latest/
316 # Section 5.14.3 Setting and getting state 316 # Section 5.14.3 Setting and getting state
317 "@Creates('Null|num|String|bool|JSExtendableArray|Float32List|Int32List" 317 "@Creates('Null|num|String|bool|JSExtendableArray|"
318 "|Uint32List|Framebuffer|Renderbuffer|Texture')", 318 "NativeFloat32List|NativeInt32List|NativeUint32List|"
319 "@Returns('Null|num|String|bool|JSExtendableArray|Float32List|Int32List" 319 "Framebuffer|Renderbuffer|Texture')",
320 "|Uint32List|Framebuffer|Renderbuffer|Texture')", 320 "@Returns('Null|num|String|bool|JSExtendableArray|"
321 "NativeFloat32List|NativeInt32List|NativeUint32List|"
322 "Framebuffer|Renderbuffer|Texture')",
321 ], 323 ],
322 324
323 'WebGLRenderingContext.getContextAttributes': [ 325 'WebGLRenderingContext.getContextAttributes': [
324 "@Creates('ContextAttributes|=Object')", 326 "@Creates('ContextAttributes|=Object')",
325 ], 327 ],
326 328
327 'XMLHttpRequest.response': [ 329 'XMLHttpRequest.response': [
328 "@Creates('ByteBuffer|Blob|Document|=Object|JSExtendableArray|String" 330 "@Creates('NativeByteBuffer|Blob|Document|=Object|JSExtendableArray"
329 "|num')", 331 "|String|num')",
330 ], 332 ],
331 }, dart2jsOnly=True) 333 }, dart2jsOnly=True)
332 334
333 _blink_experimental_annotations = [ 335 _blink_experimental_annotations = [
334 "@SupportedBrowser(SupportedBrowser.CHROME)", 336 "@SupportedBrowser(SupportedBrowser.CHROME)",
335 "@Experimental()", 337 "@Experimental()",
336 ] 338 ]
337 339
338 _indexed_db_annotations = [ 340 _indexed_db_annotations = [
339 "@SupportedBrowser(SupportedBrowser.CHROME)", 341 "@SupportedBrowser(SupportedBrowser.CHROME)",
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 pass 791 pass
790 else: 792 else:
791 _logger.warn('Unknown support_level - %s:%s' % (interface_id, member_id)) 793 _logger.warn('Unknown support_level - %s:%s' % (interface_id, member_id))
792 794
793 return annotations 795 return annotations
794 796
795 def Flush(self): 797 def Flush(self):
796 json_file = open(self._api_status_path, 'w+') 798 json_file = open(self._api_status_path, 'w+')
797 json.dump(self._types, json_file, indent=2, separators=(',', ': '), sort_key s=True) 799 json.dump(self._types, json_file, indent=2, separators=(',', ': '), sort_key s=True)
798 json_file.close() 800 json_file.close()
OLDNEW
« no previous file with comments | « sdk/lib/web_gl/dart2js/web_gl_dart2js.dart ('k') | tools/dom/templates/html/dart2js/html_dart2js.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698