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

Unified Diff: third_party/WebKit/Source/bindings/scripts/idl_definitions.py

Issue 2385073002: HTMLConstructor implementation (Closed)
Patch Set: Renamed V8HTMLElement constructor to HTMLConstructor Created 4 years, 2 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
Index: third_party/WebKit/Source/bindings/scripts/idl_definitions.py
diff --git a/third_party/WebKit/Source/bindings/scripts/idl_definitions.py b/third_party/WebKit/Source/bindings/scripts/idl_definitions.py
index 5ed496a16d5c2ebd1169af656f1f53012b01f211..f6033eb0fd64288f21f176c6dbc79161432f0a2e 100644
--- a/third_party/WebKit/Source/bindings/scripts/idl_definitions.py
+++ b/third_party/WebKit/Source/bindings/scripts/idl_definitions.py
@@ -295,6 +295,7 @@ class IdlInterface(object):
self.constructors = []
self.custom_constructors = []
self.extended_attributes = {}
+ self.html_constructors = []
self.operations = []
self.parent = None
self.serializer = None
@@ -331,7 +332,7 @@ class IdlInterface(object):
self.constants.append(IdlConstant(idl_name, child))
elif child_class == 'ExtAttributes':
extended_attributes = ext_attributes_node_to_extended_attributes(idl_name, child)
- self.constructors, self.custom_constructors = (
+ self.constructors, self.custom_constructors, self.html_constructors = (
extended_attributes_to_constructors(idl_name, extended_attributes))
clear_constructor_attributes(extended_attributes)
self.extended_attributes = extended_attributes
@@ -434,7 +435,7 @@ class IdlException(IdlInterface):
self.constants.append(IdlConstant(idl_name, child))
elif child_class == 'ExtAttributes':
extended_attributes = ext_attributes_node_to_extended_attributes(idl_name, child)
- self.constructors, self.custom_constructors = (
+ self.constructors, self.custom_constructors, self.html_constructors = (
extended_attributes_to_constructors(idl_name, extended_attributes))
clear_constructor_attributes(extended_attributes)
self.extended_attributes = extended_attributes
@@ -968,6 +969,11 @@ def extended_attributes_to_constructors(idl_name, extended_attributes):
IdlOperation.constructor_from_arguments_node('CustomConstructor', idl_name, arguments_node)
for arguments_node in custom_constructor_list]
+ if 'HTMLConstructor' in extended_attributes:
+ html_constructors = [IdlOperation.constructor_from_arguments_node('HTMLConstructor', idl_name, None)]
bashi 2016/10/04 05:53:51 Could you help me understand why we need to use a
+ else:
+ html_constructors = []
+
if 'NamedConstructor' in extended_attributes:
# FIXME: support overloaded named constructors, and make homogeneous
name = 'NamedConstructor'
@@ -981,7 +987,7 @@ def extended_attributes_to_constructors(idl_name, extended_attributes):
# FIXME: should return named_constructor separately; appended for Perl
constructors.append(named_constructor)
- return constructors, custom_constructors
+ return constructors, custom_constructors, html_constructors
def clear_constructor_attributes(extended_attributes):

Powered by Google App Engine
This is Rietveld 408576698