aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/codegen/Configuration.py
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2015-10-14 12:47:48 -0600
committerbors-servo <metajack+bors@gmail.com>2015-10-14 12:47:48 -0600
commit32daa17d5cbcad02db0713e21e52410cdc60480e (patch)
treed5cf3137ab06523b1c8958d830751b74642f048e /components/script/dom/bindings/codegen/Configuration.py
parent8db8a86ab1e943b5102a05d6d31800579fdb7875 (diff)
parentaab2c40389c71c4b0db3ffa75bdec99cd440b8af (diff)
downloadservo-32daa17d5cbcad02db0713e21e52410cdc60480e.tar.gz
servo-32daa17d5cbcad02db0713e21e52410cdc60480e.zip
Auto merge of #7873 - nox:codegen-typeid, r=Ms2ger
Generate the various TypeId enums in codegen This frees us forever from caring about maintaining these enums. The last commit removes their use from the initialisation of interface objects derived from Node. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7873) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/bindings/codegen/Configuration.py')
-rw-r--r--components/script/dom/bindings/codegen/Configuration.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/components/script/dom/bindings/codegen/Configuration.py b/components/script/dom/bindings/codegen/Configuration.py
index a8179c5be95..4275d8da24c 100644
--- a/components/script/dom/bindings/codegen/Configuration.py
+++ b/components/script/dom/bindings/codegen/Configuration.py
@@ -318,6 +318,14 @@ class Descriptor(DescriptorProvider):
maybeAppendInfallibleToAttrs(attrs, throws)
return attrs
+ def getParentName(self):
+ assert self.interface.parent is not None
+ return self.interface.parent.identifier.name
+
+ def hasDescendants(self):
+ return (self.interface.getUserData("hasConcreteDescendant", False) or
+ self.interface.getUserData("hasProxyDescendant", False))
+
def isGlobal(self):
"""
Returns true if this is the primary interface for a global object