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

Unified Diff: client/dom/scripts/systemhtml.py

Issue 9432024: Do not rename idl types to dart types at top level - this info is needed for native bindings genera… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update html frog system. Created 8 years, 10 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 | « client/dom/scripts/systemfrog.py ('k') | client/dom/scripts/systeminterface.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/dom/scripts/systemhtml.py
diff --git a/client/dom/scripts/systemhtml.py b/client/dom/scripts/systemhtml.py
index e18099e093f5c202ea2c2358b2449c925e915544..ead46709a530734e861fd436b91ca866a2b9954b 100644
--- a/client/dom/scripts/systemhtml.py
+++ b/client/dom/scripts/systemhtml.py
@@ -512,7 +512,7 @@ class HtmlDartInterfaceGenerator(DartInterfaceGenerator):
# TODO(vsm): Remove source_filter.
if MatchSourceFilter(self._source_filter, parent):
# Parent is a DOM type.
- extends.append(parent.type.id)
+ extends.append(DartType(parent.type.id))
elif '<' in parent.type.id:
# Parent is a Dart collection type.
# TODO(vsm): Make this check more robust.
@@ -549,7 +549,7 @@ class HtmlDartInterfaceGenerator(DartInterfaceGenerator):
'\n'
' $CTOR.fromBuffer(ArrayBuffer buffer);\n',
CTOR=self._interface.id,
- TYPE=element_type)
+ TYPE=DartType(element_type))
def AddAttribute(self, getter, setter):
if getter and not self._system._AllowInHtmlLibrary(self._interface,
@@ -560,13 +560,13 @@ class HtmlDartInterfaceGenerator(DartInterfaceGenerator):
setter = None
if not getter and not setter:
return
- if getter and setter and getter.type.id == setter.type.id:
+ if getter and setter and DartType(getter.type.id) == DartType(setter.type.id):
self._members_emitter.Emit('\n $TYPE $NAME;\n',
- NAME=getter.id, TYPE=getter.type.id);
+ NAME=getter.id, TYPE=DartType(getter.type.id));
return
if getter and not setter:
self._members_emitter.Emit('\n final $TYPE $NAME;\n',
- NAME=getter.id, TYPE=getter.type.id);
+ NAME=getter.id, TYPE=DartType(getter.type.id));
return
raise Exception('Unexpected getter/setter combination %s %s' %
(getter, setter))
@@ -661,7 +661,7 @@ class HtmlFrogClassGenerator(FrogInterfaceGenerator):
implements = [interface_name]
element_type = MaybeTypedArrayElementType(self._interface)
if element_type:
- implements.append('List<' + element_type + '>')
+ implements.append('List<%s>' % DartType(element_type))
self._members_emitter = self._dart_code.Emit(
self._template,
@@ -1040,7 +1040,7 @@ class WrappingInterfaceGenerator(object):
' $TYPE operator[](int index) {\n'
' return item(index);\n'
' }\n',
- TYPE=element_type)
+ TYPE=DartType(element_type))
if self._HasNativeIndexSetter(self._interface):
self._EmitNativeIndexSetter(self._interface, element_type)
« no previous file with comments | « client/dom/scripts/systemfrog.py ('k') | client/dom/scripts/systeminterface.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698