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

Unified Diff: lib/html/scripts/systemhtml.py

Issue 10957066: Reapply 12799. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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 | « lib/html/scripts/systemdart2js.py ('k') | lib/html/scripts/systemnative.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/html/scripts/systemhtml.py
===================================================================
--- lib/html/scripts/systemhtml.py (revision 12802)
+++ lib/html/scripts/systemhtml.py (working copy)
@@ -218,8 +218,6 @@
'writestart': 'writeStart'
}
-
-
# Information for generating element constructors.
#
# TODO(sra): maybe remove all the argument complexity and use cascades.
@@ -479,7 +477,9 @@
self._backend = system._backend.ImplementationGenerator(self._interface)
def StartInterface(self):
- if not self._interface.id in _merged_html_interfaces:
+ if (not self._interface.id in _merged_html_interfaces and
+ # Don't re-generate types that have been converted to native dart types.
+ self._html_interface_name not in nativified_classes):
path = '%s.dart' % self._html_interface_name
self._interface_emitter = self._system._CreateEmitter(path)
else:
@@ -563,7 +563,10 @@
if self._backend.HasImplementation():
if not self._interface.id in _merged_html_interfaces:
- filename = '%sImpl.dart' % self._html_interface_name
+ name = self._html_interface_name
+ if self._html_interface_name in nativified_classes:
+ name = nativified_classes[self._html_interface_name]
+ filename = '%sImpl.dart' % name
else:
filename = '%sImpl_Merged.dart' % self._html_interface_name
self._implementation_emitter = self._system._CreateEmitter(filename)
@@ -783,7 +786,10 @@
return True
def _ImplClassName(self, type_name):
- return '_%sImpl' % type_name
+ name = type_name
+ if type_name in nativified_classes:
+ name = nativified_classes[type_name]
+ return '_%sImpl' % name
def StartInterface(self):
interface = self._interface
« no previous file with comments | « lib/html/scripts/systemdart2js.py ('k') | lib/html/scripts/systemnative.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698