| 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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 "@SupportedBrowser(SupportedBrowser.SAFARI)", | 251 "@SupportedBrowser(SupportedBrowser.SAFARI)", |
| 252 "@Experimental", | 252 "@Experimental", |
| 253 ] | 253 ] |
| 254 | 254 |
| 255 # Annotations to be placed on generated members. | 255 # Annotations to be placed on generated members. |
| 256 # The table is indexed as: | 256 # The table is indexed as: |
| 257 # INTERFACE: annotations to be added to the interface declaration | 257 # INTERFACE: annotations to be added to the interface declaration |
| 258 # INTERFACE.MEMBER: annotation to be added to the member declaration | 258 # INTERFACE.MEMBER: annotation to be added to the member declaration |
| 259 _annotations = monitored.Dict('dartmetadata._annotations', { | 259 _annotations = monitored.Dict('dartmetadata._annotations', { |
| 260 'CSSHostRule': _shadow_dom_annotations, | 260 'CSSHostRule': _shadow_dom_annotations, |
| 261 'CSSMatrix': _webkit_experimental_annotations, |
| 261 'Crypto': _webkit_experimental_annotations, | 262 'Crypto': _webkit_experimental_annotations, |
| 262 'Database': _web_sql_annotations, | 263 'Database': _web_sql_annotations, |
| 263 'DatabaseSync': _web_sql_annotations, | 264 'DatabaseSync': _web_sql_annotations, |
| 264 'DOMApplicationCache': [ | 265 'DOMApplicationCache': [ |
| 265 "@SupportedBrowser(SupportedBrowser.CHROME)", | 266 "@SupportedBrowser(SupportedBrowser.CHROME)", |
| 266 "@SupportedBrowser(SupportedBrowser.FIREFOX)", | 267 "@SupportedBrowser(SupportedBrowser.FIREFOX)", |
| 267 "@SupportedBrowser(SupportedBrowser.IE, '10')", | 268 "@SupportedBrowser(SupportedBrowser.IE, '10')", |
| 268 "@SupportedBrowser(SupportedBrowser.OPERA)", | 269 "@SupportedBrowser(SupportedBrowser.OPERA)", |
| 269 "@SupportedBrowser(SupportedBrowser.SAFARI)", | 270 "@SupportedBrowser(SupportedBrowser.SAFARI)", |
| 270 ], | 271 ], |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 'SVGFESpecularLightingElement': _svg_annotations, | 371 'SVGFESpecularLightingElement': _svg_annotations, |
| 371 'SVGFESpotLightElement': _svg_annotations, | 372 'SVGFESpotLightElement': _svg_annotations, |
| 372 'SVGFETileElement': _svg_annotations, | 373 'SVGFETileElement': _svg_annotations, |
| 373 'SVGFETurbulenceElement': _svg_annotations, | 374 'SVGFETurbulenceElement': _svg_annotations, |
| 374 'SVGFilterElement': _svg_annotations, | 375 'SVGFilterElement': _svg_annotations, |
| 375 'SVGForeignObjectElement': _no_ie_annotations, | 376 'SVGForeignObjectElement': _no_ie_annotations, |
| 376 'SVGSetElement': _no_ie_annotations, | 377 'SVGSetElement': _no_ie_annotations, |
| 377 'SQLTransaction': _web_sql_annotations, | 378 'SQLTransaction': _web_sql_annotations, |
| 378 'SQLTransactionSync': _web_sql_annotations, | 379 'SQLTransactionSync': _web_sql_annotations, |
| 379 'WebGLRenderingContext': _webgl_annotations, | 380 'WebGLRenderingContext': _webgl_annotations, |
| 380 'WebKitCSSMatrix': _webkit_experimental_annotations, | |
| 381 'WebSocket': _all_but_ie9_annotations, | 381 'WebSocket': _all_but_ie9_annotations, |
| 382 'Worker': _all_but_ie9_annotations, | 382 'Worker': _all_but_ie9_annotations, |
| 383 'XMLHttpRequest.onloadend': _all_but_ie9_annotations, | 383 'XMLHttpRequest.onloadend': _all_but_ie9_annotations, |
| 384 'XMLHttpRequest.onprogress': _all_but_ie9_annotations, | 384 'XMLHttpRequest.onprogress': _all_but_ie9_annotations, |
| 385 'XMLHttpRequest.overrideMimeType': _no_ie_annotations, | 385 'XMLHttpRequest.overrideMimeType': _no_ie_annotations, |
| 386 'XMLHttpRequest.response': _all_but_ie9_annotations, | 386 'XMLHttpRequest.response': _all_but_ie9_annotations, |
| 387 'XMLHttpRequestProgressEvent': _webkit_experimental_annotations, | 387 'XMLHttpRequestProgressEvent': _webkit_experimental_annotations, |
| 388 'XSLTProcessor': [ | 388 'XSLTProcessor': [ |
| 389 "@SupportedBrowser(SupportedBrowser.CHROME)", | 389 "@SupportedBrowser(SupportedBrowser.CHROME)", |
| 390 "@SupportedBrowser(SupportedBrowser.FIREFOX)", | 390 "@SupportedBrowser(SupportedBrowser.FIREFOX)", |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 632 pass | 632 pass |
| 633 else: | 633 else: |
| 634 _logger.warn('Unknown support_level - %s:%s' % (interface_id, member_id)) | 634 _logger.warn('Unknown support_level - %s:%s' % (interface_id, member_id)) |
| 635 | 635 |
| 636 return annotations | 636 return annotations |
| 637 | 637 |
| 638 def Flush(self): | 638 def Flush(self): |
| 639 json_file = open(self._api_status_path, 'w+') | 639 json_file = open(self._api_status_path, 'w+') |
| 640 json.dump(self._types, json_file, indent=2, separators=(',', ': '), sort_key
s=True) | 640 json.dump(self._types, json_file, indent=2, separators=(',', ': '), sort_key
s=True) |
| 641 json_file.close() | 641 json_file.close() |
| OLD | NEW |