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

Unified Diff: tools/dom/scripts/generator.py

Issue 23163010: rollback problem blink merge cl (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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 | « tools/dom/idl/dart/dart.idl ('k') | tools/dom/scripts/htmldartgenerator.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/scripts/generator.py
===================================================================
--- tools/dom/scripts/generator.py (revision 26337)
+++ tools/dom/scripts/generator.py (working copy)
@@ -18,7 +18,6 @@
'DOMStringMap',
'ChildNode',
'EventListener',
- 'EventHandler',
'MediaQueryListListener',
'MutationCallback',
'ParentNode',
@@ -784,12 +783,6 @@
super(CallbackIDLTypeInfo, self).__init__(idl_type, data)
-def array_type(data_type):
- matched = re.match(r'([\w\d_\s]+)\[\]', data_type)
- if not matched:
- return None
- return matched.group(1)
-
class SequenceIDLTypeInfo(IDLTypeInfo):
def __init__(self, idl_type, data, item_info):
super(SequenceIDLTypeInfo, self).__init__(idl_type, data)
@@ -814,12 +807,8 @@
return '%s', 'Vector< RefPtr<%s> >' % item_native_type, 'DartUtilities', 'toNativeVector< RefPtr<%s> >' % item_native_type
def parameter_type(self):
- native_type = self.native_type()
- if array_type(native_type):
- return 'const Vector<RefPtr<%s> > &' % array_type(native_type)
+ return self.native_type()
- return native_type
-
def pass_native_by_ref(self): return True
def to_dart_conversion(self, value, interface_name=None, attributes=None):
@@ -1041,7 +1030,6 @@
'Element': TypeData(clazz='Interface', merged_interface='HTMLElement',
custom_to_dart=True),
'EventListener': TypeData(clazz='Interface', custom_to_native=True),
- 'EventHandler': TypeData(clazz='Interface', custom_to_native=True),
'EventTarget': TypeData(clazz='Interface', custom_to_native=True),
'HTMLElement': TypeData(clazz='Interface', merged_into='Element',
custom_to_dart=True),
@@ -1154,7 +1142,7 @@
item_info = self.TypeInfo(match.group(1) or match.group(2))
# TODO(vsm): Generalize this code.
if 'SourceInfo' in type_name:
- type_data.native_type = 'const Vector<RefPtr<SourceInfo> >& '
+ type_data.native_type = 'Vector<RefPtr<SourceInfo> >'
return SequenceIDLTypeInfo(type_name, type_data, item_info)
if not type_name in _idl_type_registry:
@@ -1191,7 +1179,8 @@
type_name, type_data, dart_interface_name, self)
if type_data.clazz == 'TypedList':
- dart_interface_name = self._renamer.RenameInterfaceId(type_name)
+ dart_interface_name = self._renamer.RenameInterface(
+ self._database.GetInterface(type_name))
return TypedListIDLTypeInfo(
type_name, type_data, dart_interface_name, self)
@@ -1199,7 +1188,8 @@
if type_name == 'ArrayBuffer':
dart_interface_name = 'ByteBuffer'
else:
- dart_interface_name = self._renamer.RenameInterfaceId(type_name)
+ dart_interface_name = self._renamer.RenameInterface(
+ self._database.GetInterface(type_name))
return BasicTypedListIDLTypeInfo(
type_name, type_data, dart_interface_name, self)
« no previous file with comments | « tools/dom/idl/dart/dart.idl ('k') | tools/dom/scripts/htmldartgenerator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698