aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/codegen/parser
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2015-09-11 23:55:20 +0200
committerAnthony Ramine <n.oxyde@gmail.com>2015-09-13 19:46:28 +0200
commitc25085f68a86e2885d77146add097f9f796c96ac (patch)
tree6e5f7040cd7b4ba5cfb421049485782f44b22740 /components/script/dom/bindings/codegen/parser
parent941f7dc04bc02ad196e86c5167ea292477fb7284 (diff)
downloadservo-c25085f68a86e2885d77146add097f9f796c96ac.tar.gz
servo-c25085f68a86e2885d77146add097f9f796c96ac.zip
Introduce [Abstract] to mark non-leaf interfaces
Some interfaces like Node, CharacterData and HTMLTableCellElement are never instantiated directly, only their descendant interfaces are. Those are marked with [Abstract] to set their type_id to None instead of having dummy values in the TypeId enums.
Diffstat (limited to 'components/script/dom/bindings/codegen/parser')
-rw-r--r--components/script/dom/bindings/codegen/parser/WebIDL.py3
-rw-r--r--components/script/dom/bindings/codegen/parser/abstract.patch12
-rwxr-xr-xcomponents/script/dom/bindings/codegen/parser/update.sh1
3 files changed, 15 insertions, 1 deletions
diff --git a/components/script/dom/bindings/codegen/parser/WebIDL.py b/components/script/dom/bindings/codegen/parser/WebIDL.py
index 09368e45aa7..90ec9e88921 100644
--- a/components/script/dom/bindings/codegen/parser/WebIDL.py
+++ b/components/script/dom/bindings/codegen/parser/WebIDL.py
@@ -1357,7 +1357,8 @@ class IDLInterface(IDLObjectWithScope, IDLExposureMixins):
identifier == "ChromeOnly" or
identifier == "Unforgeable" or
identifier == "UnsafeInPrerendering" or
- identifier == "LegacyEventInit"):
+ identifier == "LegacyEventInit" or
+ identifier == "Abstract"):
# Known extended attributes that do not take values
if not attr.noArguments():
raise WebIDLError("[%s] must take no arguments" % identifier,
diff --git a/components/script/dom/bindings/codegen/parser/abstract.patch b/components/script/dom/bindings/codegen/parser/abstract.patch
new file mode 100644
index 00000000000..e971a97e443
--- /dev/null
+++ b/components/script/dom/bindings/codegen/parser/abstract.patch
@@ -0,0 +1,12 @@
+--- WebIDL.py
++++ WebIDL.py
+@@ -1357,7 +1357,8 @@ class IDLInterface(IDLObjectWithScope, IDLExposureMixins):
+ identifier == "ChromeOnly" or
+ identifier == "Unforgeable" or
+ identifier == "UnsafeInPrerendering" or
+- identifier == "LegacyEventInit"):
++ identifier == "LegacyEventInit" or
++ identifier == "Abstract"):
+ # Known extended attributes that do not take values
+ if not attr.noArguments():
+ raise WebIDLError("[%s] must take no arguments" % identifier,
diff --git a/components/script/dom/bindings/codegen/parser/update.sh b/components/script/dom/bindings/codegen/parser/update.sh
index 5dd513812e1..26f70aac6ae 100755
--- a/components/script/dom/bindings/codegen/parser/update.sh
+++ b/components/script/dom/bindings/codegen/parser/update.sh
@@ -1,3 +1,4 @@
wget https://mxr.mozilla.org/mozilla-central/source/dom/bindings/parser/WebIDL.py?raw=1 -O WebIDL.py
patch < external.patch
patch < module.patch
+patch < abstract.patch