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

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

Issue 14732003: Implement Model-Driven-Views spec for Dart (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: small fix Created 7 years, 7 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 'CanvasRenderingContext2D.fillStyle': [ 49 'CanvasRenderingContext2D.fillStyle': [
50 "@Creates('String|CanvasGradient|CanvasPattern')", 50 "@Creates('String|CanvasGradient|CanvasPattern')",
51 "@Returns('String|CanvasGradient|CanvasPattern')", 51 "@Returns('String|CanvasGradient|CanvasPattern')",
52 ], 52 ],
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 # Normally DOMWindow is nevernull, but starting from a <template> element in
60 # JavaScript, this will be null:
61 # template.content.ownerDocument.defaultView
62 'Document.window': [
63 "@Creates('Window|=Object|Null')",
64 "@Returns('Window|=Object|Null')",
65 ],
66
59 # Methods returning Window can return a local window, or a cross-frame 67 # Methods returning Window can return a local window, or a cross-frame
60 # window (=Object) that needs wrapping. 68 # window (=Object) that needs wrapping.
61 'DOMWindow': [ 69 'DOMWindow': [
62 "@Creates('Window|=Object')", 70 "@Creates('Window|=Object')",
63 "@Returns('Window|=Object')", 71 "@Returns('Window|=Object')",
64 ], 72 ],
65 73
66 'DOMWindow.openDatabase': [ 74 'DOMWindow.openDatabase': [
67 "@Creates('SqlDatabase')", 75 "@Creates('SqlDatabase')",
68 ], 76 ],
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 return 567 return
560 elif support_level == 'deprecated': 568 elif support_level == 'deprecated':
561 return '@Deprecated' 569 return '@Deprecated'
562 else: 570 else:
563 _logger.warn('Unknown support_level - %s:%s' % (interface.id, member_id)) 571 _logger.warn('Unknown support_level - %s:%s' % (interface.id, member_id))
564 572
565 def Flush(self): 573 def Flush(self):
566 json_file = open(self._api_status_path, 'w+') 574 json_file = open(self._api_status_path, 'w+')
567 json.dump(self._types, json_file, indent=2, separators=(',', ': '), sort_key s=True) 575 json.dump(self._types, json_file, indent=2, separators=(',', ': '), sort_key s=True)
568 json_file.close() 576 json_file.close()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698