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

Unified Diff: lib/html/scripts/generator.py

Issue 10957064: Revert 12799. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/html/idl/dart/dart.idl ('k') | lib/html/scripts/systemdart2js.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/html/scripts/generator.py
===================================================================
--- lib/html/scripts/generator.py (revision 12800)
+++ lib/html/scripts/generator.py (working copy)
@@ -808,13 +808,7 @@
conversion_includes=None,
webcore_getter_name='getAttribute',
webcore_setter_name='setAttribute',
- requires_v8_scope=False, suppress_public_interface=False):
- """Constructor.
- Arguments:
- - suppress_public_interface is True if we are converting a DOM type to a
- built-in Dart type in which case we do not want to generate the new
- interface in the library (FooList -> List<Foo> for example) but we still
- generate the underlying implementation classes."""
+ requires_v8_scope=False):
self.clazz = clazz
self.dart_type = dart_type
self.native_type = native_type
@@ -824,7 +818,6 @@
self.webcore_getter_name = webcore_getter_name
self.webcore_setter_name = webcore_setter_name
self.requires_v8_scope = requires_v8_scope
- self.suppress_public_interface = suppress_public_interface
_idl_type_registry = {
@@ -878,51 +871,22 @@
'sequence': TypeData(clazz='Primitive', dart_type='List'),
'void': TypeData(clazz='Primitive', dart_type='void'),
- 'ClientRectList': TypeData(clazz='Interface', dart_type='List<ClientRect>',
- custom_to_native=True, suppress_public_interface=True),
- 'CSSRuleList': TypeData(clazz='Interface', dart_type='List<CSSRule>',
- custom_to_native=True, suppress_public_interface=True),
- 'CSSValueList': TypeData(clazz='Interface', dart_type='List<CSSValue>',
- custom_to_native=True, suppress_public_interface=True),
'CSSRule': TypeData(clazz='Interface', conversion_includes=['CSSImportRule']),
'DOMException': TypeData(clazz='Interface', native_type='DOMCoreException'),
'DOMStringList': TypeData(clazz='Interface', dart_type='List<String>', custom_to_native=True),
'DOMStringMap': TypeData(clazz='Interface', dart_type='Map<String, String>'),
'DOMWindow': TypeData(clazz='Interface', custom_to_dart=True),
'Element': TypeData(clazz='Interface', custom_to_dart=True),
- 'EntryArray': TypeData(clazz='Interface', dart_type='List<EntryArray>',
- custom_to_native=True, suppress_public_interface=True),
- 'EntryArraySync': TypeData(clazz='Interface',
- dart_type='List<EntryArraySync>', custom_to_native=True,
- suppress_public_interface=True),
'EventListener': TypeData(clazz='Interface', custom_to_native=True),
'EventTarget': TypeData(clazz='Interface', custom_to_native=True),
- 'FileList': TypeData(clazz='Interface', dart_type='List<File>',
- custom_to_native=True, suppress_public_interface=True),
- 'GamepadList': TypeData(clazz='Interface', dart_type='List<Gamepad>',
- custom_to_native=True, suppress_public_interface=True),
'HTMLElement': TypeData(clazz='Interface', custom_to_dart=True),
'IDBAny': TypeData(clazz='Interface', dart_type='Dynamic', custom_to_native=True),
'IDBKey': TypeData(clazz='Interface', dart_type='Dynamic', custom_to_native=True),
- 'MediaStreamList': TypeData(clazz='Interface',
- dart_type='List<MediaStream>', custom_to_native=True,
- suppress_public_interface=True),
'MutationRecordArray': TypeData(clazz='Interface', # C++ pass by pointer.
- native_type='MutationRecordArray', dart_type='List<MutationRecord>'),
+ native_type='MutationRecordArray',
+ dart_type='List<MutationRecord>'),
'StyleSheet': TypeData(clazz='Interface', conversion_includes=['CSSStyleSheet']),
'SVGElement': TypeData(clazz='Interface', custom_to_dart=True),
- 'SVGElementInstanceList': TypeData(clazz='Interface',
- dart_type='List<SVGElementInstance>', custom_to_native=True,
- suppress_public_interface=True),
- 'SpeechInputResultList': TypeData(clazz='Interface',
- dart_type='List<SpeechInputResult>', custom_to_native=True,
- suppress_public_interface=True),
- 'SpeechRecognitionResultList': TypeData(clazz='Interface',
- dart_type='List<SpeechRecognitionResult>', custom_to_native=True,
- suppress_public_interface=True),
- 'StyleSheetList': TypeData(clazz='Interface',
- dart_type='List<StyleSheet>', custom_to_native=True,
- suppress_public_interface=True),
'SVGAngle': TypeData(clazz='SVGTearOff'),
'SVGLength': TypeData(clazz='SVGTearOff'),
@@ -940,16 +904,6 @@
'SVGTransformList': TypeData(clazz='SVGTearOff', native_type='SVGTransformListPropertyTearOff'),
}
-# A list constructed of DOM types that are converted to built-in dart types
-# (like Lists) and therefore whose actual interface generation should be
-# suppressed. (For type information, we still generate the implementations
-# though, so these types should not be suppressed entirely.)
-nativified_classes = {}
-for key in _idl_type_registry:
- value = _idl_type_registry[key]
- if value.suppress_public_interface:
- nativified_classes[value.dart_type] = key
-
_svg_supplemental_includes = [
'"SVGAnimatedPropertyTearOff.h"',
'"SVGAnimatedListPropertyTearOff.h"',
« no previous file with comments | « lib/html/idl/dart/dart.idl ('k') | lib/html/scripts/systemdart2js.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698