mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Change bindings generation to make Exposed annotation aware of members/partial interfaces
This commit is contained in:
parent
2b84348372
commit
871239a3e3
25 changed files with 151 additions and 78 deletions
|
@ -3723,6 +3723,7 @@ class IDLInterfaceMember(IDLObjectWithIdentifier, IDLExposureMixins):
|
|||
IDLObjectWithIdentifier.__init__(self, location, None, identifier)
|
||||
IDLExposureMixins.__init__(self, location)
|
||||
self.tag = tag
|
||||
self.exposed = set()
|
||||
if extendedAttrDict is None:
|
||||
self._extendedAttrDict = {}
|
||||
else:
|
||||
|
@ -3756,12 +3757,16 @@ class IDLInterfaceMember(IDLObjectWithIdentifier, IDLExposureMixins):
|
|||
def getExtendedAttribute(self, name):
|
||||
return self._extendedAttrDict.get(name, None)
|
||||
|
||||
def exposedSet(self):
|
||||
return self.exposed
|
||||
|
||||
def finish(self, scope):
|
||||
# We better be exposed _somewhere_.
|
||||
if (len(self._exposureGlobalNames) == 0):
|
||||
print(self.identifier.name)
|
||||
assert len(self._exposureGlobalNames) != 0
|
||||
IDLExposureMixins.finish(self, scope)
|
||||
globalNameSetToExposureSet(scope, self._exposureGlobalNames, self.exposed)
|
||||
|
||||
def validate(self):
|
||||
if self.isAttr() or self.isMethod():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue