| Index: lib/dom/scripts/generator.py
|
| diff --git a/lib/dom/scripts/generator.py b/lib/dom/scripts/generator.py
|
| index f46c61c2272816963e42783bfc304ec81e7e8b9a..09cd2bb0bb1aa90cb20a68598841bf9a7db29e19 100644
|
| --- a/lib/dom/scripts/generator.py
|
| +++ b/lib/dom/scripts/generator.py
|
| @@ -234,6 +234,7 @@ def AnalyzeOperation(interface, operations):
|
| info.overloads = operations
|
| info.declared_name = operations[0].id
|
| info.name = operations[0].ext_attrs.get('DartName', info.declared_name)
|
| + info.constructor_name = None
|
| info.js_name = info.declared_name
|
| info.type_name = DartType(operations[0].type.id) # TODO: widen.
|
| info.param_infos = args
|
| @@ -272,6 +273,7 @@ def AnalyzeConstructor(interface):
|
| info.idl_args = idl_args
|
| info.declared_name = name
|
| info.name = name
|
| + info.constructor_name = None
|
| info.js_name = name
|
| info.type_name = interface.id
|
| info.param_infos = args
|
| @@ -351,6 +353,8 @@ class OperationInfo(object):
|
| Attributes:
|
| overloads: A list of IDL operation overloads with the same name.
|
| name: A string, the simple name of the operation.
|
| + constructor_name: A string, the name of the constructor iff the constructor
|
| + is named, e.g. 'fromList' in Int8Array.fromList(list).
|
| type_name: A string, the name of the return type of the operation.
|
| param_infos: A list of ParamInfo.
|
| """
|
| @@ -422,6 +426,12 @@ class OperationInfo(object):
|
| assert any([is_static == o.is_static for o in self.overloads])
|
| return is_static
|
|
|
| + def ConstructorFullName(self):
|
| + if self.constructor_name:
|
| + return self.type_name + '.' + self.constructor_name
|
| + else:
|
| + return self.type_name
|
| +
|
|
|
| def AttributeOutputOrder(a, b):
|
| """Canonical output ordering for attributes."""
|
|
|