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 86a596357364db32414d96e8a80093241c956745..21b2c83384165752ab67d3c6d837599067ed26b8 100644 |
--- a/third_party/WebKit/Source/bindings/scripts/v8_interface.py |
+++ b/third_party/WebKit/Source/bindings/scripts/v8_interface.py |
@@ -291,10 +291,19 @@ def interface_context(interface, interfaces): |
number_of_required_arguments(constructor), |
} for constructor in interface.custom_constructors] |
+ # [HTMLConstructor] |
+ html_constructor = 'HTMLConstructor' in extended_attributes |
+ if html_constructor: |
+ # https://html.spec.whatwg.org/#html-element-constructors |
+ if ('Constructor' in extended_attributes) or ('NoInterfaceObject' in extended_attributes): |
+ raise Exception('[Constructor] and [NoInterfaceObject] MUST NOT be' |
+ ' specified with [HTMLConstructor]: ' |
+ '%s' % interface.name) |
+ |
# [NamedConstructor] |
named_constructor = named_constructor_context(interface) |
- if constructors or custom_constructors or named_constructor: |
+ if constructors or custom_constructors or html_constructor or named_constructor: |
if interface.is_partial: |
raise Exception('[Constructor] and [NamedConstructor] MUST NOT be' |
' specified on partial interface definitions: ' |
@@ -329,6 +338,7 @@ def interface_context(interface, interfaces): |
context.update({ |
'constructors': constructors, |
+ 'has_html_constructor': bool(html_constructor), |
haraken
2016/10/03 06:13:04
Alphabetical order.
|
'has_custom_constructor': bool(custom_constructors), |
'interface_length': |
interface_length(constructors + custom_constructors), |