| Index: third_party/WebKit/Source/bindings/scripts/v8_interface.py
|
| diff --git a/third_party/WebKit/Source/bindings/scripts/v8_interface.py b/third_party/WebKit/Source/bindings/scripts/v8_interface.py
|
| index 6c143aaf97f8cbe9c90949cccfa48682fca80980..e4f69f37d852ebb9d217301e5bf42067cb56baa5 100644
|
| --- a/third_party/WebKit/Source/bindings/scripts/v8_interface.py
|
| +++ b/third_party/WebKit/Source/bindings/scripts/v8_interface.py
|
| @@ -122,6 +122,9 @@ def interface_context(interface):
|
| # [DependentLifetime]
|
| is_dependent_lifetime = 'DependentLifetime' in extended_attributes
|
|
|
| + # [Global] and [PrimaryGlibal]
|
| + is_global = any(name in extended_attributes for name in ['Global', 'PrimaryGlobal'])
|
| +
|
| # [MeasureAs]
|
| is_measure_as = 'MeasureAs' in extended_attributes
|
| if is_measure_as:
|
| @@ -183,6 +186,7 @@ def interface_context(interface):
|
| 'is_check_security': is_check_security,
|
| 'is_event_target': is_event_target,
|
| 'is_exception': interface.is_exception,
|
| + 'is_global': is_global,
|
| 'is_node': inherits_interface(interface.name, 'Node'),
|
| 'is_partial': interface.is_partial,
|
| 'is_typed_array_type': is_typed_array_type,
|
| @@ -348,13 +352,15 @@ def interface_context(interface):
|
|
|
| # [Iterable], iterable<>, maplike<> and setlike<>
|
| iterator_method = None
|
| + has_array_iterator = False
|
| +
|
| # FIXME: support Iterable in partial interfaces. However, we don't
|
| # need to support iterator overloads between interface and
|
| # partial interface definitions.
|
| # http://heycam.github.io/webidl/#idl-overloading
|
| if (not interface.is_partial
|
| and (interface.iterable or interface.maplike or interface.setlike
|
| - or 'Iterable' in extended_attributes)):
|
| + or interface.has_indexed_elements or 'Iterable' in extended_attributes)):
|
|
|
| used_extended_attributes = {}
|
|
|
| @@ -387,7 +393,10 @@ def interface_context(interface):
|
| extended_attributes=used_extended_attributes,
|
| implemented_as=implemented_as)
|
|
|
| - iterator_method = generated_iterator_method('iterator', implemented_as='iterator')
|
| + if interface.iterable or interface.maplike or interface.setlike or 'Iterable' in extended_attributes:
|
| + iterator_method = generated_iterator_method('iterator', implemented_as='iterator')
|
| + elif interface.has_indexed_elements:
|
| + has_array_iterator = True
|
|
|
| if interface.iterable or interface.maplike or interface.setlike:
|
| implicit_methods = [
|
| @@ -560,6 +569,7 @@ def interface_context(interface):
|
| 'has_private_script': any(attribute['is_implemented_in_private_script'] for attribute in attributes) or
|
| any(method['is_implemented_in_private_script'] for method in methods),
|
| 'iterator_method': iterator_method,
|
| + 'has_array_iterator': has_array_iterator,
|
| 'method_configuration_methods': method_configuration_methods,
|
| 'methods': methods,
|
| })
|
|
|