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

Unified Diff: sdk/lib/html/scripts/generator.py

Issue 11415067: Add annotations on native fields and methods (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: comment Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | sdk/lib/html/scripts/systemhtml.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/scripts/generator.py
diff --git a/sdk/lib/html/scripts/generator.py b/sdk/lib/html/scripts/generator.py
index 1d838a8f685fe5551f36abc1f4b1e5b007d767ba..76b5ecfe5a570a05349b8e8f7fe85150b079b6a3 100644
--- a/sdk/lib/html/scripts/generator.py
+++ b/sdk/lib/html/scripts/generator.py
@@ -593,6 +593,19 @@ def FindConversion(idl_type, direction, interface, member):
dart2js_annotations = {
+ 'CanvasRenderingContext2D.createImageData':
+ "@Creates('ImageData|=Object')",
+
+ 'CanvasRenderingContext2D.getImageData':
+ "@Creates('ImageData|=Object')",
+
+ 'CanvasRenderingContext2D.webkitGetImageDataHD':
+ "@Creates('ImageData|=Object')",
+
+ 'DOMWindow.openDatabase': "@Creates('Database') @Creates('DatabaseSync')",
+
+ 'FileReader.result': "@Creates('String|ArrayBuffer|Null')",
+
# Rather than have the result of an IDBRequest as a union over all possible
# results, we mark the result as instantiating any classes, and mark
# each operation with the classes that it could cause to be asynchronously
@@ -630,21 +643,12 @@ dart2js_annotations = {
'+IDBVersionChangeRequest': "@Returns('IDBRequest') @Creates('IDBRequest')",
- 'FileReader.result': "@Creates('String|ArrayBuffer|Null')",
+ 'MessageEvent.ports': "@Creates('=List')",
- 'CanvasRenderingContext2D.createImageData':
- "@Creates('ImageData|=Object')",
-
- 'CanvasRenderingContext2D.getImageData':
- "@Creates('ImageData|=Object')",
-
- 'CanvasRenderingContext2D.webkitGetImageDataHD':
- "@Creates('ImageData|=Object')",
+ 'SQLResultSetRowList.item': "@Creates('=Object')",
'XMLHttpRequest.response':
"@Creates('ArrayBuffer|Blob|Document|=Object|=List|String|num')",
-
- 'SQLResultSetRowList.item': "@Creates('=Object')",
}
def FindAnnotations(idl_type, interface_name, member_name):
@@ -791,7 +795,7 @@ class InterfaceIDLTypeInfo(IDLTypeInfo):
def narrow_dart_type(self):
if self.list_item_type():
- return self.idl_type()
+ return self.implementation_name()
# TODO(podivilov): only primitive and collection types should override
# dart_type.
if self._data.dart_type != None:
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | sdk/lib/html/scripts/systemhtml.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698