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

Side by Side Diff: lib/html/scripts/generator.py

Issue 11044023: Finish Listifying html classes. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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
« lib/html/idl/dart/dart.idl ('K') | « lib/html/idl/dart/dart.idl ('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 systems to generate 6 """This module provides shared functionality for systems to generate
7 Dart APIs from the IDL database.""" 7 Dart APIs from the IDL database."""
8 8
9 import copy 9 import copy
10 import re 10 import re
(...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 # the documentation, the user is made aware that only a limited subset of 872 # the documentation, the user is made aware that only a limited subset of
873 # serializable types are actually permitted. 873 # serializable types are actually permitted.
874 'SerializedScriptValue': TypeData(clazz='Primitive', dart_type='Dynamic'), 874 'SerializedScriptValue': TypeData(clazz='Primitive', dart_type='Dynamic'),
875 # TODO(sra): Flags is really a dictionary: {create:bool, exclusive:bool} 875 # TODO(sra): Flags is really a dictionary: {create:bool, exclusive:bool}
876 # http://dev.w3.org/2009/dap/file-system/file-dir-sys.html#the-flags-interfa ce 876 # http://dev.w3.org/2009/dap/file-system/file-dir-sys.html#the-flags-interfa ce
877 'WebKitFlags': TypeData(clazz='Primitive', dart_type='Object'), 877 'WebKitFlags': TypeData(clazz='Primitive', dart_type='Object'),
878 878
879 'sequence': TypeData(clazz='Primitive', dart_type='List'), 879 'sequence': TypeData(clazz='Primitive', dart_type='List'),
880 'void': TypeData(clazz='Primitive', dart_type='void'), 880 'void': TypeData(clazz='Primitive', dart_type='void'),
881 881
882 'WebKitAnimationList': TypeData(clazz='Interface',
883 dart_type='List<Animation>', suppress_public_interface=True),
882 'ClientRectList': TypeData(clazz='Interface', dart_type='List<ClientRect>', 884 'ClientRectList': TypeData(clazz='Interface', dart_type='List<ClientRect>',
883 suppress_public_interface=True), 885 suppress_public_interface=True),
884 'CSSRuleList': TypeData(clazz='Interface', dart_type='List<CSSRule>', 886 'CSSRuleList': TypeData(clazz='Interface', dart_type='List<CSSRule>',
885 suppress_public_interface=True), 887 suppress_public_interface=True),
886 'CSSValueList': TypeData(clazz='Interface', dart_type='List<CSSValue>', 888 'CSSValueList': TypeData(clazz='Interface', dart_type='List<CSSValue>',
887 suppress_public_interface=True), 889 suppress_public_interface=True),
888 'CSSRule': TypeData(clazz='Interface', conversion_includes=['CSSImportRule'] ), 890 'CSSRule': TypeData(clazz='Interface', conversion_includes=['CSSImportRule'] ),
889 'DOMException': TypeData(clazz='Interface', native_type='DOMCoreException'), 891 'DOMException': TypeData(clazz='Interface', native_type='DOMCoreException'),
890 'DOMStringList': TypeData(clazz='Interface', dart_type='List<String>', custo m_to_native=True), 892 'DOMStringList': TypeData(clazz='Interface', dart_type='List<String>', custo m_to_native=True),
891 'DOMStringMap': TypeData(clazz='Interface', dart_type='Map<String, String>') , 893 'DOMStringMap': TypeData(clazz='Interface', dart_type='Map<String, String>') ,
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
984 if match: 986 if match:
985 if type_name == 'DOMString[]': 987 if type_name == 'DOMString[]':
986 return DOMStringArrayTypeInfo(TypeData('Sequence'), self.TypeInfo('DOMSt ring')) 988 return DOMStringArrayTypeInfo(TypeData('Sequence'), self.TypeInfo('DOMSt ring'))
987 item_info = self.TypeInfo(match.group(1) or match.group(2)) 989 item_info = self.TypeInfo(match.group(1) or match.group(2))
988 return SequenceIDLTypeInfo(type_name, TypeData('Sequence'), item_info) 990 return SequenceIDLTypeInfo(type_name, TypeData('Sequence'), item_info)
989 if not type_name in _idl_type_registry: 991 if not type_name in _idl_type_registry:
990 return InterfaceIDLTypeInfo(type_name, TypeData('Interface')) 992 return InterfaceIDLTypeInfo(type_name, TypeData('Interface'))
991 type_data = _idl_type_registry.get(type_name) 993 type_data = _idl_type_registry.get(type_name)
992 class_name = '%sIDLTypeInfo' % type_data.clazz 994 class_name = '%sIDLTypeInfo' % type_data.clazz
993 return globals()[class_name](type_name, type_data) 995 return globals()[class_name](type_name, type_data)
OLDNEW
« lib/html/idl/dart/dart.idl ('K') | « lib/html/idl/dart/dart.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698