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

Unified Diff: tools/dom/scripts/generator.py

Issue 12493003: Exposing Point & Rect types (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Sync to ToT Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/html/wheelevent_test.dart ('k') | tools/dom/scripts/htmlrenamer.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/scripts/generator.py
diff --git a/tools/dom/scripts/generator.py b/tools/dom/scripts/generator.py
index f0bd2f47e7756c9bae72d481eba77a5864ada5d1..ff5118086539e01fd196ab56126d5e859c29c184 100644
--- a/tools/dom/scripts/generator.py
+++ b/tools/dom/scripts/generator.py
@@ -1089,9 +1089,11 @@ class InterfaceIDLTypeInfo(IDLTypeInfo):
self._type_registry = type_registry
def dart_type(self):
+ if self._data.dart_type:
+ return self._data.dart_type
if self.list_item_type() and not self.has_generated_interface():
return 'List<%s>' % self._type_registry.TypeInfo(self._data.item_type).dart_type()
- return self._data.dart_type or self._dart_interface_name
+ return self._dart_interface_name
def narrow_dart_type(self):
if self.list_item_type():
@@ -1342,6 +1344,8 @@ _idl_type_registry = monitored.Dict('generator._idl_type_registry', {
'any': TypeData(clazz='Primitive', dart_type='Object', native_type='ScriptValue'),
'Array': TypeData(clazz='Primitive', dart_type='List'),
'custom': TypeData(clazz='Primitive', dart_type='dynamic'),
+ 'ClientRect': TypeData(clazz='Interface',
+ dart_type='Rect', suppress_interface=True),
'Date': TypeData(clazz='Primitive', dart_type='DateTime', native_type='double'),
'DOMObject': TypeData(clazz='Primitive', dart_type='Object', native_type='ScriptValue'),
'DOMString': TypeData(clazz='Primitive', dart_type='String', native_type='String'),
@@ -1376,7 +1380,7 @@ _idl_type_registry = monitored.Dict('generator._idl_type_registry', {
'SVGElement': TypeData(clazz='Interface', custom_to_dart=True),
'ClientRectList': TypeData(clazz='Interface',
- item_type='ClientRect', suppress_interface=True),
+ item_type='ClientRect', dart_type='List<Rect>', suppress_interface=True),
'CSSRuleList': TypeData(clazz='Interface',
item_type='CSSRule', suppress_interface=True),
'CSSValueList': TypeData(clazz='Interface',
« no previous file with comments | « tests/html/wheelevent_test.dart ('k') | tools/dom/scripts/htmlrenamer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698