aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/codegen/Configuration.py
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2016-09-26 15:48:09 +0200
committerAnthony Ramine <n.oxyde@gmail.com>2016-10-06 20:59:08 +0200
commit5a42bb58f9da18426f1d5bb892ccf74525793e01 (patch)
treec6cc2144f8ffaa47c4714aa2ffa0a30f779fd686 /components/script/dom/bindings/codegen/Configuration.py
parentb745866a4d16eeb5de5f05811b7c4e107d644397 (diff)
downloadservo-5a42bb58f9da18426f1d5bb892ccf74525793e01.tar.gz
servo-5a42bb58f9da18426f1d5bb892ccf74525793e01.zip
Implement [Inline] interfaces
Inline interfaces just appear as a Rust type and in the TypeId hierarchy. They are completely invisible on the JS side.
Diffstat (limited to 'components/script/dom/bindings/codegen/Configuration.py')
-rw-r--r--components/script/dom/bindings/codegen/Configuration.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/components/script/dom/bindings/codegen/Configuration.py b/components/script/dom/bindings/codegen/Configuration.py
index 9a1120769c8..f2f64e9bee0 100644
--- a/components/script/dom/bindings/codegen/Configuration.py
+++ b/components/script/dom/bindings/codegen/Configuration.py
@@ -88,6 +88,8 @@ class Configuration:
getter = lambda x: x.interface.isJSImplemented()
elif key == 'isGlobal':
getter = lambda x: x.isGlobal()
+ elif key == 'isInline':
+ getter = lambda x: x.interface.getExtendedAttribute('Inline') is not None
elif key == 'isExposedConditionally':
getter = lambda x: x.interface.isExposedConditionally()
elif key == 'isIteratorInterface':
@@ -234,6 +236,7 @@ class Descriptor(DescriptorProvider):
self.concrete = (not self.interface.isCallback() and
not self.interface.isNamespace() and
not self.interface.getExtendedAttribute("Abstract") and
+ not self.interface.getExtendedAttribute("Inline") and
not spiderMonkeyInterface)
self.hasUnforgeableMembers = (self.concrete and
any(MemberIsUnforgeable(m, self) for m in
@@ -383,8 +386,12 @@ class Descriptor(DescriptorProvider):
return attrs
def getParentName(self):
- assert self.interface.parent is not None
- return self.interface.parent.identifier.name
+ parent = self.interface.parent
+ while parent:
+ if not parent.getExtendedAttribute("Inline"):
+ return parent.identifier.name
+ parent = parent.parent
+ return None
def hasDescendants(self):
return (self.interface.getUserData("hasConcreteDescendant", False) or