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

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

Issue 10080008: Do not delete DOMStringMap and DOMStringList types from idl database. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added empty DOMStringList implementation. Created 8 years, 8 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 | « lib/dom/scripts/dartdomgenerator.py ('k') | lib/dom/src/DOMStringList.dart » ('j') | 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 re 9 import re
10 10
11 _pure_interfaces = set([ 11 _pure_interfaces = set([
12 'DOMStringList',
13 'DOMStringMap',
12 'ElementTimeControl', 14 'ElementTimeControl',
13 'ElementTraversal', 15 'ElementTraversal',
14 'MediaQueryListListener', 16 'MediaQueryListListener',
15 'NodeSelector', 17 'NodeSelector',
16 'SVGExternalResourcesRequired', 18 'SVGExternalResourcesRequired',
17 'SVGFilterPrimitiveStandardAttributes', 19 'SVGFilterPrimitiveStandardAttributes',
18 'SVGFitToViewBox', 20 'SVGFitToViewBox',
19 'SVGLangSpace', 21 'SVGLangSpace',
20 'SVGLocatable', 22 'SVGLocatable',
21 'SVGStylable', 23 'SVGStylable',
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 'any': PrimitiveIDLTypeInfo('any', dart_type='Object'), 538 'any': PrimitiveIDLTypeInfo('any', dart_type='Object'),
537 'any[]': PrimitiveIDLTypeInfo('any[]', dart_type='List'), 539 'any[]': PrimitiveIDLTypeInfo('any[]', dart_type='List'),
538 'Array': PrimitiveIDLTypeInfo('Array', dart_type='List'), 540 'Array': PrimitiveIDLTypeInfo('Array', dart_type='List'),
539 'custom': PrimitiveIDLTypeInfo('custom', dart_type='Dynamic'), 541 'custom': PrimitiveIDLTypeInfo('custom', dart_type='Dynamic'),
540 'Date': PrimitiveIDLTypeInfo('Date', dart_type='Date', native_type='double') , 542 'Date': PrimitiveIDLTypeInfo('Date', dart_type='Date', native_type='double') ,
541 'DOMObject': PrimitiveIDLTypeInfo('DOMObject', dart_type='Object', native_ty pe='ScriptValue'), 543 'DOMObject': PrimitiveIDLTypeInfo('DOMObject', dart_type='Object', native_ty pe='ScriptValue'),
542 'DOMString': PrimitiveIDLTypeInfo('DOMString', dart_type='String', native_ty pe='String'), 544 'DOMString': PrimitiveIDLTypeInfo('DOMString', dart_type='String', native_ty pe='String'),
543 # TODO(sra): Flags is really a dictionary: {create:bool, exclusive:bool} 545 # TODO(sra): Flags is really a dictionary: {create:bool, exclusive:bool}
544 # http://dev.w3.org/2009/dap/file-system/file-dir-sys.html#the-flags-interfa ce 546 # http://dev.w3.org/2009/dap/file-system/file-dir-sys.html#the-flags-interfa ce
545 'Flags': PrimitiveIDLTypeInfo('Flags', dart_type='Object'), 547 'Flags': PrimitiveIDLTypeInfo('Flags', dart_type='Object'),
546 'List<String>': PrimitiveIDLTypeInfo('DOMStringList', dart_type='List<String >'),
547 # TODO: there is no Map<String, String> type in idls. Fix the
548 # fremontcut builder and remove this entry.
549 'Map<String, String>': PrimitiveIDLTypeInfo('DOMStringMap', dart_type='Map<S tring, String>',
550 conversion_includes=['DOMStringMap']),
551 'DOMTimeStamp': PrimitiveIDLTypeInfo('DOMTimeStamp', dart_type='int'), 548 'DOMTimeStamp': PrimitiveIDLTypeInfo('DOMTimeStamp', dart_type='int'),
552 'object': PrimitiveIDLTypeInfo('object', dart_type='Object', native_type='Sc riptValue'), 549 'object': PrimitiveIDLTypeInfo('object', dart_type='Object', native_type='Sc riptValue'),
553 # TODO(sra): Come up with some meaningful name so that where this appears in 550 # TODO(sra): Come up with some meaningful name so that where this appears in
554 # the documentation, the user is made aware that only a limited subset of 551 # the documentation, the user is made aware that only a limited subset of
555 # serializable types are actually permitted. 552 # serializable types are actually permitted.
556 'SerializedScriptValue': PrimitiveIDLTypeInfo('SerializedScriptValue', dart_ type='Dynamic', ref_counted=True), 553 'SerializedScriptValue': PrimitiveIDLTypeInfo('SerializedScriptValue', dart_ type='Dynamic', ref_counted=True),
557 # TODO(sra): Flags is really a dictionary: {create:bool, exclusive:bool} 554 # TODO(sra): Flags is really a dictionary: {create:bool, exclusive:bool}
558 # http://dev.w3.org/2009/dap/file-system/file-dir-sys.html#the-flags-interfa ce 555 # http://dev.w3.org/2009/dap/file-system/file-dir-sys.html#the-flags-interfa ce
559 'WebKitFlags': PrimitiveIDLTypeInfo('WebKitFlags', dart_type='Object'), 556 'WebKitFlags': PrimitiveIDLTypeInfo('WebKitFlags', dart_type='Object'),
560 557
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 '"SVGAnimatedPropertyTearOff.h"', 594 '"SVGAnimatedPropertyTearOff.h"',
598 '"SVGAnimatedListPropertyTearOff.h"', 595 '"SVGAnimatedListPropertyTearOff.h"',
599 '"SVGStaticListPropertyTearOff.h"', 596 '"SVGStaticListPropertyTearOff.h"',
600 '"SVGAnimatedListPropertyTearOff.h"', 597 '"SVGAnimatedListPropertyTearOff.h"',
601 '"SVGTransformListPropertyTearOff.h"', 598 '"SVGTransformListPropertyTearOff.h"',
602 '"SVGPathSegListPropertyTearOff.h"', 599 '"SVGPathSegListPropertyTearOff.h"',
603 ] 600 ]
604 601
605 def GetIDLTypeInfo(idl_type_name): 602 def GetIDLTypeInfo(idl_type_name):
606 return _idl_type_registry.get(idl_type_name, IDLTypeInfo(idl_type_name)) 603 return _idl_type_registry.get(idl_type_name, IDLTypeInfo(idl_type_name))
OLDNEW
« no previous file with comments | « lib/dom/scripts/dartdomgenerator.py ('k') | lib/dom/src/DOMStringList.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698