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

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

Issue 50263004: Make sure that classes in dart:html do not implement both List and List<E>. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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
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 from generator import AnalyzeOperation, ConstantOutputOrder, \ 10 from generator import AnalyzeOperation, ConstantOutputOrder, \
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 operations[0].type.id == 'void', 438 operations[0].type.id == 'void',
439 declaration, 439 declaration,
440 GenerateCall, 440 GenerateCall,
441 IsOptional, 441 IsOptional,
442 can_omit_type_check) 442 can_omit_type_check)
443 443
444 def AdditionalImplementedInterfaces(self): 444 def AdditionalImplementedInterfaces(self):
445 # TODO: Include all implemented interfaces, including other Lists. 445 # TODO: Include all implemented interfaces, including other Lists.
446 implements = [] 446 implements = []
447 if self._interface_type_info.list_item_type(): 447 if self._interface_type_info.list_item_type():
448 item_type_info = self._type_registry.TypeInfo( 448 item_type = self._type_registry.TypeInfo(
449 self._interface_type_info.list_item_type()) 449 self._interface_type_info.list_item_type()).dart_type()
450 implements.append('List') 450 implements.append('List<%s>' % item_type)
451 return implements 451 return implements
452 452
453 def Mixins(self): 453 def Mixins(self):
454 mixins = [] 454 mixins = []
455 if self._interface_type_info.list_item_type(): 455 if self._interface_type_info.list_item_type():
456 item_type = self._type_registry.TypeInfo( 456 item_type = self._type_registry.TypeInfo(
457 self._interface_type_info.list_item_type()).dart_type() 457 self._interface_type_info.list_item_type()).dart_type()
458 mixins.append('ListMixin<%s>' % item_type) 458 mixins.append('ListMixin<%s>' % item_type)
459 mixins.append('ImmutableListMixin<%s>' % item_type) 459 mixins.append('ImmutableListMixin<%s>' % item_type)
460 460
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 701
702 def SecureBaseName(self, type_name): 702 def SecureBaseName(self, type_name):
703 if type_name in _secure_base_types: 703 if type_name in _secure_base_types:
704 return _secure_base_types[type_name] 704 return _secure_base_types[type_name]
705 705
706 def _DartType(self, type_name): 706 def _DartType(self, type_name):
707 return self._type_registry.DartType(type_name) 707 return self._type_registry.DartType(type_name)
708 708
709 def _TypeInfo(self, type_name): 709 def _TypeInfo(self, type_name):
710 return self._type_registry.TypeInfo(type_name) 710 return self._type_registry.TypeInfo(type_name)
OLDNEW
« no previous file with comments | « sdk/lib/web_sql/dartium/web_sql_dartium.dart ('k') | tools/dom/templates/html/impl/impl_Element.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698