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

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

Issue 19820007: Fixes for Blink roll. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Minors fixes Created 7 years, 4 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 'CanvasRenderingContext2D.strokeStyle': [ 54 'CanvasRenderingContext2D.strokeStyle': [
55 "@Creates('String|CanvasGradient|CanvasPattern')", 55 "@Creates('String|CanvasGradient|CanvasPattern')",
56 "@Returns('String|CanvasGradient|CanvasPattern')", 56 "@Returns('String|CanvasGradient|CanvasPattern')",
57 ], 57 ],
58 58
59 'CustomEvent.detail': [ 59 'CustomEvent.detail': [
60 "@Creates('Null')", 60 "@Creates('Null')",
61 ], 61 ],
62 62
63 # Normally DOMWindow is nevernull, but starting from a <template> element in 63 # Normally Window is nevernull, but starting from a <template> element in
64 # JavaScript, this will be null: 64 # JavaScript, this will be null:
65 # template.content.ownerDocument.defaultView 65 # template.content.ownerDocument.defaultView
66 'Document.window': [ 66 'Document.window': [
67 "@Creates('Window|=Object|Null')", 67 "@Creates('Window|=Object|Null')",
68 "@Returns('Window|=Object|Null')", 68 "@Returns('Window|=Object|Null')",
69 ], 69 ],
70 70
71 # Methods returning Window can return a local window, or a cross-frame 71 # Methods returning Window can return a local window, or a cross-frame
72 # window (=Object) that needs wrapping. 72 # window (=Object) that needs wrapping.
73 'DOMWindow': [ 73 'Window': [
74 "@Creates('Window|=Object')", 74 "@Creates('Window|=Object')",
75 "@Returns('Window|=Object')", 75 "@Returns('Window|=Object')",
76 ], 76 ],
77 77
78 'DOMWindow.openDatabase': [ 78 'Window.openDatabase': [
79 "@Creates('SqlDatabase')", 79 "@Creates('SqlDatabase')",
80 ], 80 ],
81 81
82 'DOMWindow.showModalDialog': [ 82 'Window.showModalDialog': [
83 "@Creates('Null')", 83 "@Creates('Null')",
84 ], 84 ],
85 85
86 # To be in callback with the browser-created Event, we had to have called 86 # To be in callback with the browser-created Event, we had to have called
87 # addEventListener on the target, so we avoid 87 # addEventListener on the target, so we avoid
88 'Event.currentTarget': [ 88 'Event.currentTarget': [
89 "@Creates('Null')", 89 "@Creates('Null')",
90 "@Returns('EventTarget|=Object')", 90 "@Returns('EventTarget|=Object')",
91 ], 91 ],
92 92
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 'DatabaseSync': _web_sql_annotations, 382 'DatabaseSync': _web_sql_annotations,
383 'DOMApplicationCache': [ 383 'DOMApplicationCache': [
384 "@SupportedBrowser(SupportedBrowser.CHROME)", 384 "@SupportedBrowser(SupportedBrowser.CHROME)",
385 "@SupportedBrowser(SupportedBrowser.FIREFOX)", 385 "@SupportedBrowser(SupportedBrowser.FIREFOX)",
386 "@SupportedBrowser(SupportedBrowser.IE, '10')", 386 "@SupportedBrowser(SupportedBrowser.IE, '10')",
387 "@SupportedBrowser(SupportedBrowser.OPERA)", 387 "@SupportedBrowser(SupportedBrowser.OPERA)",
388 "@SupportedBrowser(SupportedBrowser.SAFARI)", 388 "@SupportedBrowser(SupportedBrowser.SAFARI)",
389 ], 389 ],
390 'DOMFileSystem': _file_system_annotations, 390 'DOMFileSystem': _file_system_annotations,
391 'DOMFileSystemSync': _file_system_annotations, 391 'DOMFileSystemSync': _file_system_annotations,
392 'DOMPoint': _webkit_experimental_annotations, 392 'WebKitPoint': _webkit_experimental_annotations,
393 'DOMWindow.webkitConvertPointFromNodeToPage': _webkit_experimental_annotations , 393 'Window.webkitConvertPointFromNodeToPage': _webkit_experimental_annotations,
394 'DOMWindow.webkitConvertPointFromPageToNode': _webkit_experimental_annotations , 394 'Window.webkitConvertPointFromPageToNode': _webkit_experimental_annotations,
395 'DOMWindow.indexedDB': _indexed_db_annotations, 395 'Window.indexedDB': _indexed_db_annotations,
396 'DOMWindow.openDatabase': _web_sql_annotations, 396 'Window.openDatabase': _web_sql_annotations,
397 'DOMWindow.performance': _performance_annotations, 397 'Window.performance': _performance_annotations,
398 'DOMWindow.webkitNotifications': _webkit_experimental_annotations, 398 'Window.webkitNotifications': _webkit_experimental_annotations,
399 'DOMWindow.webkitRequestFileSystem': _file_system_annotations, 399 'Window.webkitRequestFileSystem': _file_system_annotations,
400 'DOMWindow.webkitResolveLocalFileSystemURL': _file_system_annotations, 400 'Window.webkitResolveLocalFileSystemURL': _file_system_annotations,
401 'Element.ontransitionend': _all_but_ie9_annotations, 401 'Element.ontransitionend': _all_but_ie9_annotations,
402 # Placeholder to add experimental flag, implementation for this is 402 # Placeholder to add experimental flag, implementation for this is
403 # pending in a separate CL. 403 # pending in a separate CL.
404 'Element.webkitMatchesSelector': ['@Experimental()'], 404 'Element.webkitMatchesSelector': ['@Experimental()'],
405 'Element.webkitCreateShadowRoot': [ 405 'Element.webkitCreateShadowRoot': [
406 "@SupportedBrowser(SupportedBrowser.CHROME, '25')", 406 "@SupportedBrowser(SupportedBrowser.CHROME, '25')",
407 "@Experimental()", 407 "@Experimental()",
408 ], 408 ],
409 'Event.clipboardData': _webkit_experimental_annotations, 409 'Event.clipboardData': _webkit_experimental_annotations,
410 'FormData': _all_but_ie9_annotations, 410 'FormData': _all_but_ie9_annotations,
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 pass 752 pass
753 else: 753 else:
754 _logger.warn('Unknown support_level - %s:%s' % (interface_id, member_id)) 754 _logger.warn('Unknown support_level - %s:%s' % (interface_id, member_id))
755 755
756 return annotations 756 return annotations
757 757
758 def Flush(self): 758 def Flush(self):
759 json_file = open(self._api_status_path, 'w+') 759 json_file = open(self._api_status_path, 'w+')
760 json.dump(self._types, json_file, indent=2, separators=(',', ': '), sort_key s=True) 760 json.dump(self._types, json_file, indent=2, separators=(',', ': '), sort_key s=True)
761 json_file.close() 761 json_file.close()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698