From 5a42bb58f9da18426f1d5bb892ccf74525793e01 Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Mon, 26 Sep 2016 15:48:09 +0200 Subject: Implement [Inline] interfaces Inline interfaces just appear as a Rust type and in the TypeId hierarchy. They are completely invisible on the JS side. --- components/script/dom/bindings/codegen/Configuration.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'components/script/dom/bindings/codegen/Configuration.py') 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 -- cgit v1.2.3