Chromium Code Reviews| Index: lib/html/scripts/systemhtml.py |
| =================================================================== |
| --- lib/html/scripts/systemhtml.py (revision 12656) |
| +++ lib/html/scripts/systemhtml.py (working copy) |
| @@ -217,8 +217,6 @@ |
| 'writestart': 'writeStart' |
| } |
| - |
| - |
| # Information for generating element constructors. |
| # |
| # TODO(sra): maybe remove all the argument complexity and use cascades. |
| @@ -460,9 +458,13 @@ |
| self._backend.GenerateLibraries(self._dart_file_paths) |
| def _CreateEmitter(self, filename): |
| - path = os.path.join(self._output_dir, 'dart', filename) |
| - self._dart_file_paths.append(path) |
| - return self._emitters.FileEmitter(path) |
| + is_native_class = filename[:-len('.dart')] in nativified_classes.values() |
|
vsm
2012/09/21 22:43:12
This feels brittle. If we change the file naming
Emily Fortuna
2012/09/22 00:13:52
Unfortunately not. The backend _Impl files are ver
|
| + if is_native_class: |
| + return emitter.Emitter() |
| + else: |
| + path = os.path.join(self._output_dir, 'dart', filename) |
| + self._dart_file_paths.append(path) |
| + return self._emitters.FileEmitter(path) |
| # ------------------------------------------------------------------------------ |
| @@ -562,7 +564,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) |
| @@ -782,7 +787,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 |