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

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

Issue 1098953002: Revert "getElementsByName returns HtmlCollection on IE" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 Window is never null, 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 'Document.getElementsByTagName': [
72 "@Creates('NodeList|HtmlCollection')",
73 "@Returns('NodeList|HtmlCollection')",
74 ],
75
71 'Document.getElementsByClassName': [ 76 'Document.getElementsByClassName': [
72 "@Creates('NodeList|HtmlCollection')", 77 "@Creates('NodeList|HtmlCollection')",
73 "@Returns('NodeList|HtmlCollection')", 78 "@Returns('NodeList|HtmlCollection')",
74 ], 79 ],
75
76 'Document.getElementsByName': [
77 "@Creates('NodeList|HtmlCollection')",
78 "@Returns('NodeList|HtmlCollection')",
79 ],
80
81 'Document.getElementsByTagName': [
82 "@Creates('NodeList|HtmlCollection')",
83 "@Returns('NodeList|HtmlCollection')",
84 ],
85 80
86 # Methods returning Window can return a local window, or a cross-frame 81 # Methods returning Window can return a local window, or a cross-frame
87 # window (=Object) that needs wrapping. 82 # window (=Object) that needs wrapping.
88 'Window': [ 83 'Window': [
89 "@Creates('Window|=Object')", 84 "@Creates('Window|=Object')",
90 "@Returns('Window|=Object')", 85 "@Returns('Window|=Object')",
91 ], 86 ],
92 87
93 'Window.openDatabase': [ 88 'Window.openDatabase': [
94 "@Creates('SqlDatabase')", 89 "@Creates('SqlDatabase')",
95 ], 90 ],
96 91
97 'Window.showModalDialog': [ 92 'Window.showModalDialog': [
98 "@Creates('Null')", 93 "@Creates('Null')",
99 ], 94 ],
100 95
101 'Element.webkitGetRegionFlowRanges': [ 96 'Element.webkitGetRegionFlowRanges': [
102 "@Creates('JSExtendableArray')", 97 "@Creates('JSExtendableArray')",
103 "@Returns('JSExtendableArray')", 98 "@Returns('JSExtendableArray')",
104 ], 99 ],
105 100
101 'Element.getElementsByTagName': [
102 "@Creates('NodeList|HtmlCollection')",
103 "@Returns('NodeList|HtmlCollection')",
104 ],
105
106 'Element.getElementsByClassName': [ 106 'Element.getElementsByClassName': [
107 "@Creates('NodeList|HtmlCollection')", 107 "@Creates('NodeList|HtmlCollection')",
108 "@Returns('NodeList|HtmlCollection')", 108 "@Returns('NodeList|HtmlCollection')",
109 ], 109 ],
110
111 'Element.getElementsByName': [
112 "@Creates('NodeList|HtmlCollection')",
113 "@Returns('NodeList|HtmlCollection')",
114 ],
115
116 'Element.getElementsByTagName': [
117 "@Creates('NodeList|HtmlCollection')",
118 "@Returns('NodeList|HtmlCollection')",
119 ],
120 110
121 "ErrorEvent.error": [ 111 "ErrorEvent.error": [
122 "@Creates('Null')", # Only returns values created elsewhere. 112 "@Creates('Null')", # Only returns values created elsewhere.
123 ], 113 ],
124 114
125 # To be in callback with the browser-created Event, we had to have called 115 # To be in callback with the browser-created Event, we had to have called
126 # addEventListener on the target, so we avoid 116 # addEventListener on the target, so we avoid
127 'Event.currentTarget': [ 117 'Event.currentTarget': [
128 "@Creates('Null')", 118 "@Creates('Null')",
129 "@Returns('EventTarget|=Object')", 119 "@Returns('EventTarget|=Object')",
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 273
284 'RTCStatsReport.timestamp': [ 274 'RTCStatsReport.timestamp': [
285 "@Creates('Null')", # JS date object. 275 "@Creates('Null')", # JS date object.
286 ], 276 ],
287 277
288 'SerializedScriptValue': [ 278 'SerializedScriptValue': [
289 "@annotation_Creates_SerializedScriptValue", 279 "@annotation_Creates_SerializedScriptValue",
290 "@annotation_Returns_SerializedScriptValue", 280 "@annotation_Returns_SerializedScriptValue",
291 ], 281 ],
292 282
283 'ShadowRoot.getElementsByTagName': [
284 "@Creates('NodeList|HtmlCollection')",
285 "@Returns('NodeList|HtmlCollection')",
286 ],
287
293 'ShadowRoot.getElementsByClassName': [ 288 'ShadowRoot.getElementsByClassName': [
294 "@Creates('NodeList|HtmlCollection')", 289 "@Creates('NodeList|HtmlCollection')",
295 "@Returns('NodeList|HtmlCollection')", 290 "@Returns('NodeList|HtmlCollection')",
296 ], 291 ],
297
298 'ShadowRoot.getElementsByName': [
299 "@Creates('NodeList|HtmlCollection')",
300 "@Returns('NodeList|HtmlCollection')",
301 ],
302
303 'ShadowRoot.getElementsByTagName': [
304 "@Creates('NodeList|HtmlCollection')",
305 "@Returns('NodeList|HtmlCollection')",
306 ],
307 292
308 'SQLResultSetRowList.item': ["@Creates('=Object')"], 293 'SQLResultSetRowList.item': ["@Creates('=Object')"],
309 294
310 # Touch targets are Elements in a Document, or the Document. 295 # Touch targets are Elements in a Document, or the Document.
311 'Touch.target': [ 296 'Touch.target': [
312 "@Creates('Element|Document')", 297 "@Creates('Element|Document')",
313 "@Returns('Element|Document')", 298 "@Returns('Element|Document')",
314 ], 299 ],
315 300
316 'TrackEvent.track': [ 301 'TrackEvent.track': [
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
855 pass 840 pass
856 else: 841 else:
857 _logger.warn('Unknown support_level - %s:%s' % (interface_id, member_id)) 842 _logger.warn('Unknown support_level - %s:%s' % (interface_id, member_id))
858 843
859 return annotations 844 return annotations
860 845
861 def Flush(self): 846 def Flush(self):
862 json_file = open(self._api_status_path, 'w+') 847 json_file = open(self._api_status_path, 'w+')
863 json.dump(self._types, json_file, indent=2, separators=(',', ': '), sort_key s=True) 848 json.dump(self._types, json_file, indent=2, separators=(',', ': '), sort_key s=True)
864 json_file.close() 849 json_file.close()
OLDNEW
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698