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

Side by Side Diff: tools/dom/scripts/systemhtml.py

Issue 16770003: Adding hidden HTMLElement base class back for Dart2JS (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/dom/scripts/generator.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
3 # for details. All rights reserved. Use of this source code is governed by a 3 # for details. All rights reserved. Use of this source code is governed by a
4 # BSD-style license that can be found in the LICENSE file. 4 # BSD-style license that can be found in the LICENSE file.
5 5
6 """This module provides shared functionality for the system to generate 6 """This module provides shared functionality for the system to generate
7 Dart:html APIs from the IDL database.""" 7 Dart:html APIs from the IDL database."""
8 8
9 import emitter 9 import emitter
10 import logging 10 import logging
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 else: 497 else:
498 factory_provider = info.factory_provider_name 498 factory_provider = info.factory_provider_name
499 499
500 implementation_emitter = self._ImplementationEmitter() 500 implementation_emitter = self._ImplementationEmitter()
501 501
502 base_type_info = None 502 base_type_info = None
503 if self._interface.parents: 503 if self._interface.parents:
504 supertype = self._interface.parents[0].type.id 504 supertype = self._interface.parents[0].type.id
505 if not IsDartCollectionType(supertype) and not IsPureInterface(supertype): 505 if not IsDartCollectionType(supertype) and not IsPureInterface(supertype):
506 base_type_info = self._type_registry.TypeInfo(supertype) 506 base_type_info = self._type_registry.TypeInfo(supertype)
507 if base_type_info.merged_into() \
508 and self._backend.ImplementsMergedMembers():
509 base_type_info = self._type_registry.TypeInfo(
510 base_type_info.merged_into())
511 507
512 if base_type_info: 508 if base_type_info:
513 base_class = base_type_info.implementation_name() 509 base_class = base_type_info.implementation_name()
514 else: 510 else:
515 base_class = self._backend.RootClassName() 511 base_class = self._backend.RootClassName()
516 512
517 implements = self._backend.AdditionalImplementedInterfaces() 513 implements = self._backend.AdditionalImplementedInterfaces()
518 for parent in self._interface.parents: 514 for parent in self._interface.parents:
519 parent_type_info = self._type_registry.TypeInfo(parent.type.id) 515 parent_type_info = self._type_registry.TypeInfo(parent.type.id)
520 if parent_type_info.interface_name() != base_class and \ 516 if parent_type_info.interface_name() != base_class and \
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after
1188 for library_name in libraries: 1184 for library_name in libraries:
1189 self._libraries[library_name] = DartLibrary( 1185 self._libraries[library_name] = DartLibrary(
1190 library_name, template_loader, library_type, output_dir) 1186 library_name, template_loader, library_type, output_dir)
1191 1187
1192 def AddFile(self, basename, library_name, path): 1188 def AddFile(self, basename, library_name, path):
1193 self._libraries[library_name].AddFile(path) 1189 self._libraries[library_name].AddFile(path)
1194 1190
1195 def Emit(self, emitter, auxiliary_dir): 1191 def Emit(self, emitter, auxiliary_dir):
1196 for lib in self._libraries.values(): 1192 for lib in self._libraries.values():
1197 lib.Emit(emitter, auxiliary_dir) 1193 lib.Emit(emitter, auxiliary_dir)
OLDNEW
« no previous file with comments | « tools/dom/scripts/generator.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698