mirror of
https://github.com/servo/servo.git
synced 2025-07-23 15:23:42 +01:00
Remove [PrimaryGlobal]
This commit is contained in:
parent
84693d8117
commit
2660f35925
167 changed files with 417 additions and 829 deletions
|
@ -827,10 +827,6 @@ def getJSToNativeConversionInfo(type, descriptorProvider, failureCode=None,
|
||||||
elif isArgument:
|
elif isArgument:
|
||||||
descriptorType = descriptor.argumentType
|
descriptorType = descriptor.argumentType
|
||||||
|
|
||||||
if descriptor.interface.isConsequential():
|
|
||||||
raise TypeError("Consequential interface %s being used as an "
|
|
||||||
"argument" % descriptor.interface.identifier.name)
|
|
||||||
|
|
||||||
if failureCode is None:
|
if failureCode is None:
|
||||||
substitutions = {
|
substitutions = {
|
||||||
"sourceDescription": sourceDescription,
|
"sourceDescription": sourceDescription,
|
||||||
|
|
|
@ -38,11 +38,6 @@ class Configuration:
|
||||||
iface = thing
|
iface = thing
|
||||||
self.interfaces[iface.identifier.name] = iface
|
self.interfaces[iface.identifier.name] = iface
|
||||||
if iface.identifier.name not in config:
|
if iface.identifier.name not in config:
|
||||||
# Completely skip consequential interfaces with no descriptor
|
|
||||||
# if they have no interface object because chances are we
|
|
||||||
# don't need to do anything interesting with them.
|
|
||||||
if iface.isConsequential() and not iface.hasInterfaceObject():
|
|
||||||
continue
|
|
||||||
entry = {}
|
entry = {}
|
||||||
else:
|
else:
|
||||||
entry = config[iface.identifier.name]
|
entry = config[iface.identifier.name]
|
||||||
|
|
|
@ -154,6 +154,9 @@ class IDLObject(object):
|
||||||
def isNamespace(self):
|
def isNamespace(self):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
def isInterfaceMixin(self):
|
||||||
|
return False
|
||||||
|
|
||||||
def isEnum(self):
|
def isEnum(self):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
@ -233,8 +236,6 @@ class IDLScope(IDLObject):
|
||||||
# A mapping from global name to the set of global interfaces
|
# A mapping from global name to the set of global interfaces
|
||||||
# that have that global name.
|
# that have that global name.
|
||||||
self.globalNameMapping = defaultdict(set)
|
self.globalNameMapping = defaultdict(set)
|
||||||
self.primaryGlobalAttr = None
|
|
||||||
self.primaryGlobalName = None
|
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.QName()
|
return self.QName()
|
||||||
|
@ -462,8 +463,17 @@ class IDLExposureMixins():
|
||||||
raise WebIDLError("Unknown [Exposed] value %s" % globalName,
|
raise WebIDLError("Unknown [Exposed] value %s" % globalName,
|
||||||
[self._location])
|
[self._location])
|
||||||
|
|
||||||
if len(self._exposureGlobalNames) == 0:
|
# Verify that we are exposed _somwhere_ if we have some place to be
|
||||||
self._exposureGlobalNames.add(scope.primaryGlobalName)
|
# exposed. We don't want to assert that we're definitely exposed
|
||||||
|
# because a lot of our parser tests have small-enough IDL snippets that
|
||||||
|
# they don't include any globals, and we don't really want to go through
|
||||||
|
# and add global interfaces and [Exposed] annotations to all those
|
||||||
|
# tests.
|
||||||
|
if len(scope.globalNames) != 0:
|
||||||
|
if (len(self._exposureGlobalNames) == 0):
|
||||||
|
raise WebIDLError(("'%s' is not exposed anywhere even though we have "
|
||||||
|
"globals to be exposed to") % self,
|
||||||
|
[self.location])
|
||||||
|
|
||||||
globalNameSetToExposureSet(scope, self._exposureGlobalNames,
|
globalNameSetToExposureSet(scope, self._exposureGlobalNames,
|
||||||
self.exposureSet)
|
self.exposureSet)
|
||||||
|
@ -508,17 +518,15 @@ class IDLExposureMixins():
|
||||||
return workerDebuggerScopes.intersection(self.exposureSet)
|
return workerDebuggerScopes.intersection(self.exposureSet)
|
||||||
|
|
||||||
|
|
||||||
class IDLExternalInterface(IDLObjectWithIdentifier, IDLExposureMixins):
|
class IDLExternalInterface(IDLObjectWithIdentifier):
|
||||||
def __init__(self, location, parentScope, identifier):
|
def __init__(self, location, parentScope, identifier):
|
||||||
assert isinstance(identifier, IDLUnresolvedIdentifier)
|
assert isinstance(identifier, IDLUnresolvedIdentifier)
|
||||||
assert isinstance(parentScope, IDLScope)
|
assert isinstance(parentScope, IDLScope)
|
||||||
self.parent = None
|
self.parent = None
|
||||||
IDLObjectWithIdentifier.__init__(self, location, parentScope, identifier)
|
IDLObjectWithIdentifier.__init__(self, location, parentScope, identifier)
|
||||||
IDLExposureMixins.__init__(self, location)
|
|
||||||
IDLObjectWithIdentifier.resolve(self, parentScope)
|
IDLObjectWithIdentifier.resolve(self, parentScope)
|
||||||
|
|
||||||
def finish(self, scope):
|
def finish(self, scope):
|
||||||
IDLExposureMixins.finish(self, scope)
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def validate(self):
|
def validate(self):
|
||||||
|
@ -533,9 +541,6 @@ class IDLExternalInterface(IDLObjectWithIdentifier, IDLExposureMixins):
|
||||||
def isInterface(self):
|
def isInterface(self):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def isConsequential(self):
|
|
||||||
return False
|
|
||||||
|
|
||||||
def addExtendedAttributes(self, attrs):
|
def addExtendedAttributes(self, attrs):
|
||||||
if len(attrs) != 0:
|
if len(attrs) != 0:
|
||||||
raise WebIDLError("There are no extended attributes that are "
|
raise WebIDLError("There are no extended attributes that are "
|
||||||
|
@ -554,9 +559,6 @@ class IDLExternalInterface(IDLObjectWithIdentifier, IDLExposureMixins):
|
||||||
def hasProbablyShortLivingWrapper(self):
|
def hasProbablyShortLivingWrapper(self):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def isSerializable(self):
|
|
||||||
return False
|
|
||||||
|
|
||||||
def _getDependentObjects(self):
|
def _getDependentObjects(self):
|
||||||
return set()
|
return set()
|
||||||
|
|
||||||
|
@ -718,6 +720,7 @@ class IDLInterfaceOrInterfaceMixinOrNamespace(IDLObjectWithScope, IDLExposureMix
|
||||||
return "interface"
|
return "interface"
|
||||||
if self.isNamespace():
|
if self.isNamespace():
|
||||||
return "namespace"
|
return "namespace"
|
||||||
|
assert self.isInterfaceMixin()
|
||||||
return "interface mixin"
|
return "interface mixin"
|
||||||
|
|
||||||
def getExtendedAttribute(self, name):
|
def getExtendedAttribute(self, name):
|
||||||
|
@ -770,10 +773,13 @@ class IDLInterfaceOrInterfaceMixinOrNamespace(IDLObjectWithScope, IDLExposureMix
|
||||||
# sets, make sure they aren't exposed in places where we are not.
|
# sets, make sure they aren't exposed in places where we are not.
|
||||||
for member in self.members:
|
for member in self.members:
|
||||||
if not member.exposureSet.issubset(self.exposureSet):
|
if not member.exposureSet.issubset(self.exposureSet):
|
||||||
raise WebIDLError("Interface or interface mixin member has"
|
raise WebIDLError("Interface or interface mixin member has "
|
||||||
"larger exposure set than its container",
|
"larger exposure set than its container",
|
||||||
[member.location, self.location])
|
[member.location, self.location])
|
||||||
|
|
||||||
|
def isExternal(self):
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
class IDLInterfaceMixin(IDLInterfaceOrInterfaceMixinOrNamespace):
|
class IDLInterfaceMixin(IDLInterfaceOrInterfaceMixinOrNamespace):
|
||||||
def __init__(self, location, parentScope, name, members, isKnownNonPartial):
|
def __init__(self, location, parentScope, name, members, isKnownNonPartial):
|
||||||
|
@ -788,6 +794,9 @@ class IDLInterfaceMixin(IDLInterfaceOrInterfaceMixinOrNamespace):
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return "Interface mixin '%s'" % self.identifier.name
|
return "Interface mixin '%s'" % self.identifier.name
|
||||||
|
|
||||||
|
def isInterfaceMixin(self):
|
||||||
|
return True
|
||||||
|
|
||||||
def finish(self, scope):
|
def finish(self, scope):
|
||||||
if self._finished:
|
if self._finished:
|
||||||
return
|
return
|
||||||
|
@ -796,8 +805,10 @@ class IDLInterfaceMixin(IDLInterfaceOrInterfaceMixinOrNamespace):
|
||||||
# Expose to the globals of interfaces that includes this mixin if this
|
# Expose to the globals of interfaces that includes this mixin if this
|
||||||
# mixin has no explicit [Exposed] so that its members can be exposed
|
# mixin has no explicit [Exposed] so that its members can be exposed
|
||||||
# based on the base interface exposure set.
|
# based on the base interface exposure set.
|
||||||
# Make sure this is done before IDLExposureMixins.finish call to
|
#
|
||||||
# prevent exposing to PrimaryGlobal by default.
|
# Make sure this is done before IDLExposureMixins.finish call, since
|
||||||
|
# that converts our set of exposure global names to an actual exposure
|
||||||
|
# set.
|
||||||
hasImplicitExposure = len(self._exposureGlobalNames) == 0
|
hasImplicitExposure = len(self._exposureGlobalNames) == 0
|
||||||
if hasImplicitExposure:
|
if hasImplicitExposure:
|
||||||
self._exposureGlobalNames.update(self.actualExposureGlobalNames)
|
self._exposureGlobalNames.update(self.actualExposureGlobalNames)
|
||||||
|
@ -876,16 +887,11 @@ class IDLInterfaceOrNamespace(IDLInterfaceOrInterfaceMixinOrNamespace):
|
||||||
# them.
|
# them.
|
||||||
self.namedConstructors = list()
|
self.namedConstructors = list()
|
||||||
self.legacyWindowAliases = []
|
self.legacyWindowAliases = []
|
||||||
self.implementedInterfaces = set()
|
|
||||||
self.includedMixins = set()
|
self.includedMixins = set()
|
||||||
self._consequential = False
|
|
||||||
# self.interfacesBasedOnSelf is the set of interfaces that inherit from
|
# self.interfacesBasedOnSelf is the set of interfaces that inherit from
|
||||||
# self or have self as a consequential interface, including self itself.
|
# self, including self itself.
|
||||||
# Used for distinguishability checking.
|
# Used for distinguishability checking.
|
||||||
self.interfacesBasedOnSelf = set([self])
|
self.interfacesBasedOnSelf = set([self])
|
||||||
# self.interfacesImplementingSelf is the set of interfaces that directly
|
|
||||||
# have self as a consequential interface
|
|
||||||
self.interfacesImplementingSelf = set()
|
|
||||||
self._hasChildInterfaces = False
|
self._hasChildInterfaces = False
|
||||||
self._isOnGlobalProtoChain = False
|
self._isOnGlobalProtoChain = False
|
||||||
# Tracking of the number of reserved slots we need for our
|
# Tracking of the number of reserved slots we need for our
|
||||||
|
@ -896,6 +902,10 @@ class IDLInterfaceOrNamespace(IDLInterfaceOrInterfaceMixinOrNamespace):
|
||||||
# If this is an iterator interface, we need to know what iterable
|
# If this is an iterator interface, we need to know what iterable
|
||||||
# interface we're iterating for in order to get its nativeType.
|
# interface we're iterating for in order to get its nativeType.
|
||||||
self.iterableInterface = None
|
self.iterableInterface = None
|
||||||
|
# True if we have cross-origin members.
|
||||||
|
self.hasCrossOriginMembers = False
|
||||||
|
# True if some descendant (including ourselves) has cross-origin members
|
||||||
|
self.hasDescendantWithCrossOriginMembers = False
|
||||||
|
|
||||||
self.toStringTag = toStringTag
|
self.toStringTag = toStringTag
|
||||||
|
|
||||||
|
@ -996,10 +1006,8 @@ class IDLInterfaceOrNamespace(IDLInterfaceOrInterfaceMixinOrNamespace):
|
||||||
|
|
||||||
self.totalMembersInSlots = self.parent.totalMembersInSlots
|
self.totalMembersInSlots = self.parent.totalMembersInSlots
|
||||||
|
|
||||||
# Interfaces with [Global] or [PrimaryGlobal] must not
|
# Interfaces with [Global] must not have anything inherit from them
|
||||||
# have anything inherit from them
|
if self.parent.getExtendedAttribute("Global"):
|
||||||
if (self.parent.getExtendedAttribute("Global") or
|
|
||||||
self.parent.getExtendedAttribute("PrimaryGlobal")):
|
|
||||||
# Note: This is not a self.parent.isOnGlobalProtoChain() check
|
# Note: This is not a self.parent.isOnGlobalProtoChain() check
|
||||||
# because ancestors of a [Global] interface can have other
|
# because ancestors of a [Global] interface can have other
|
||||||
# descendants.
|
# descendants.
|
||||||
|
@ -1015,10 +1023,8 @@ class IDLInterfaceOrNamespace(IDLInterfaceOrInterfaceMixinOrNamespace):
|
||||||
self.parent.identifier.name),
|
self.parent.identifier.name),
|
||||||
[self.location, self.parent.location])
|
[self.location, self.parent.location])
|
||||||
|
|
||||||
# Callbacks must not inherit from non-callbacks or inherit from
|
# Callbacks must not inherit from non-callbacks.
|
||||||
# anything that has consequential interfaces.
|
|
||||||
# XXXbz Can non-callbacks inherit from callbacks? Spec issue pending.
|
# XXXbz Can non-callbacks inherit from callbacks? Spec issue pending.
|
||||||
# XXXbz Can callbacks have consequential interfaces? Spec issue pending
|
|
||||||
if self.isCallback():
|
if self.isCallback():
|
||||||
if not self.parent.isCallback():
|
if not self.parent.isCallback():
|
||||||
raise WebIDLError("Callback interface %s inheriting from "
|
raise WebIDLError("Callback interface %s inheriting from "
|
||||||
|
@ -1055,23 +1061,14 @@ class IDLInterfaceOrNamespace(IDLInterfaceOrInterfaceMixinOrNamespace):
|
||||||
self.parent.identifier.name),
|
self.parent.identifier.name),
|
||||||
[self.location, self.parent.location])
|
[self.location, self.parent.location])
|
||||||
|
|
||||||
for iface in self.implementedInterfaces:
|
|
||||||
iface.finish(scope)
|
|
||||||
for mixin in self.includedMixins:
|
for mixin in self.includedMixins:
|
||||||
mixin.finish(scope)
|
mixin.finish(scope)
|
||||||
|
|
||||||
cycleInGraph = self.findInterfaceLoopPoint(self)
|
cycleInGraph = self.findInterfaceLoopPoint(self)
|
||||||
if cycleInGraph:
|
if cycleInGraph:
|
||||||
raise WebIDLError("Interface %s has itself as ancestor or "
|
raise WebIDLError(
|
||||||
"implemented interface" % self.identifier.name,
|
"Interface %s has itself as ancestor" % self.identifier.name,
|
||||||
[self.location, cycleInGraph.location])
|
[self.location, cycleInGraph.location])
|
||||||
|
|
||||||
if self.isCallback():
|
|
||||||
# "implements" should have made sure we have no
|
|
||||||
# consequential interfaces.
|
|
||||||
assert len(self.getConsequentialInterfaces()) == 0
|
|
||||||
# And that we're not consequential.
|
|
||||||
assert not self.isConsequential()
|
|
||||||
|
|
||||||
self.finishMembers(scope)
|
self.finishMembers(scope)
|
||||||
|
|
||||||
|
@ -1104,7 +1101,7 @@ class IDLInterfaceOrNamespace(IDLInterfaceOrInterfaceMixinOrNamespace):
|
||||||
if self.globalNames:
|
if self.globalNames:
|
||||||
raise WebIDLError(
|
raise WebIDLError(
|
||||||
"Can't have both a named constructor and [Global]",
|
"Can't have both a named constructor and [Global]",
|
||||||
[self.location, self.namedConstructors.location])
|
[self.location, ctor.location])
|
||||||
assert len(ctor._exposureGlobalNames) == 0
|
assert len(ctor._exposureGlobalNames) == 0
|
||||||
ctor._exposureGlobalNames.update(self._exposureGlobalNames)
|
ctor._exposureGlobalNames.update(self._exposureGlobalNames)
|
||||||
ctor.finish(scope)
|
ctor.finish(scope)
|
||||||
|
@ -1114,43 +1111,15 @@ class IDLInterfaceOrNamespace(IDLInterfaceOrInterfaceMixinOrNamespace):
|
||||||
# admixed.
|
# admixed.
|
||||||
self.originalMembers = list(self.members)
|
self.originalMembers = list(self.members)
|
||||||
|
|
||||||
# Import everything from our consequential interfaces into
|
|
||||||
# self.members. Sort our consequential interfaces by name
|
|
||||||
# just so we have a consistent order.
|
|
||||||
for iface in sorted(self.getConsequentialInterfaces(),
|
|
||||||
key=lambda x: x.identifier.name):
|
|
||||||
# Flag the interface as being someone's consequential interface
|
|
||||||
iface.setIsConsequentialInterfaceOf(self)
|
|
||||||
# Verify that we're not exposed somewhere where iface is not exposed
|
|
||||||
if not self.exposureSet.issubset(iface.exposureSet):
|
|
||||||
raise WebIDLError("Interface %s is exposed in globals where its "
|
|
||||||
"consequential interface %s is not exposed." %
|
|
||||||
(self.identifier.name, iface.identifier.name),
|
|
||||||
[self.location, iface.location])
|
|
||||||
|
|
||||||
# If we have a maplike or setlike, and the consequential interface
|
|
||||||
# also does, throw an error.
|
|
||||||
if iface.maplikeOrSetlikeOrIterable and self.maplikeOrSetlikeOrIterable:
|
|
||||||
raise WebIDLError("Maplike/setlike/iterable interface %s cannot have "
|
|
||||||
"maplike/setlike/iterable interface %s as a "
|
|
||||||
"consequential interface" %
|
|
||||||
(self.identifier.name,
|
|
||||||
iface.identifier.name),
|
|
||||||
[self.maplikeOrSetlikeOrIterable.location,
|
|
||||||
iface.maplikeOrSetlikeOrIterable.location])
|
|
||||||
additionalMembers = iface.originalMembers
|
|
||||||
for additionalMember in additionalMembers:
|
|
||||||
for member in self.members:
|
|
||||||
if additionalMember.identifier.name == member.identifier.name:
|
|
||||||
raise WebIDLError(
|
|
||||||
"Multiple definitions of %s on %s coming from 'implements' statements" %
|
|
||||||
(member.identifier.name, self),
|
|
||||||
[additionalMember.location, member.location])
|
|
||||||
self.members.extend(additionalMembers)
|
|
||||||
iface.interfacesImplementingSelf.add(self)
|
|
||||||
|
|
||||||
for mixin in sorted(self.includedMixins,
|
for mixin in sorted(self.includedMixins,
|
||||||
key=lambda x: x.identifier.name):
|
key=lambda x: x.identifier.name):
|
||||||
|
for mixinMember in mixin.members:
|
||||||
|
for member in self.members:
|
||||||
|
if mixinMember.identifier.name == member.identifier.name:
|
||||||
|
raise WebIDLError(
|
||||||
|
"Multiple definitions of %s on %s coming from 'includes' statements" %
|
||||||
|
(member.identifier.name, self),
|
||||||
|
[mixinMember.location, member.location])
|
||||||
self.members.extend(mixin.members)
|
self.members.extend(mixin.members)
|
||||||
|
|
||||||
for ancestor in self.getInheritedInterfaces():
|
for ancestor in self.getInheritedInterfaces():
|
||||||
|
@ -1164,8 +1133,6 @@ class IDLInterfaceOrNamespace(IDLInterfaceOrInterfaceMixinOrNamespace):
|
||||||
ancestor.identifier.name),
|
ancestor.identifier.name),
|
||||||
[self.maplikeOrSetlikeOrIterable.location,
|
[self.maplikeOrSetlikeOrIterable.location,
|
||||||
ancestor.maplikeOrSetlikeOrIterable.location])
|
ancestor.maplikeOrSetlikeOrIterable.location])
|
||||||
for ancestorConsequential in ancestor.getConsequentialInterfaces():
|
|
||||||
ancestorConsequential.interfacesBasedOnSelf.add(self)
|
|
||||||
|
|
||||||
# Deal with interfaces marked [Unforgeable], now that we have our full
|
# Deal with interfaces marked [Unforgeable], now that we have our full
|
||||||
# member list, except unforgeables pulled in from parents. We want to
|
# member list, except unforgeables pulled in from parents. We want to
|
||||||
|
@ -1199,6 +1166,21 @@ class IDLInterfaceOrNamespace(IDLInterfaceOrInterfaceMixinOrNamespace):
|
||||||
not hasattr(member, "originatingInterface")):
|
not hasattr(member, "originatingInterface")):
|
||||||
member.originatingInterface = self
|
member.originatingInterface = self
|
||||||
|
|
||||||
|
for member in self.members:
|
||||||
|
if ((member.isMethod() and
|
||||||
|
member.getExtendedAttribute("CrossOriginCallable")) or
|
||||||
|
(member.isAttr() and
|
||||||
|
(member.getExtendedAttribute("CrossOriginReadable") or
|
||||||
|
member.getExtendedAttribute("CrossOriginWritable")))):
|
||||||
|
self.hasCrossOriginMembers = True
|
||||||
|
break
|
||||||
|
|
||||||
|
if self.hasCrossOriginMembers:
|
||||||
|
parent = self
|
||||||
|
while parent:
|
||||||
|
parent.hasDescendantWithCrossOriginMembers = True
|
||||||
|
parent = parent.parent
|
||||||
|
|
||||||
# Compute slot indices for our members before we pull in unforgeable
|
# Compute slot indices for our members before we pull in unforgeable
|
||||||
# members from our parent. Also, maplike/setlike declarations get a
|
# members from our parent. Also, maplike/setlike declarations get a
|
||||||
# slot to hold their backing object.
|
# slot to hold their backing object.
|
||||||
|
@ -1221,13 +1203,12 @@ class IDLInterfaceOrNamespace(IDLInterfaceOrInterfaceMixinOrNamespace):
|
||||||
self._ownMembersInSlots += 1
|
self._ownMembersInSlots += 1
|
||||||
|
|
||||||
if self.parent:
|
if self.parent:
|
||||||
# Make sure we don't shadow any of the [Unforgeable] attributes on
|
# Make sure we don't shadow any of the [Unforgeable] attributes on our
|
||||||
# our ancestor interfaces. We don't have to worry about
|
# ancestor interfaces. We don't have to worry about mixins here, because
|
||||||
# consequential interfaces here, because those have already been
|
# those have already been imported into the relevant .members lists. And
|
||||||
# imported into the relevant .members lists. And we don't have to
|
# we don't have to worry about anything other than our parent, because it
|
||||||
# worry about anything other than our parent, because it has already
|
# has already imported its ancestors' unforgeable attributes into its
|
||||||
# imported its ancestors unforgeable attributes into its member
|
# member list.
|
||||||
# list.
|
|
||||||
for unforgeableMember in (member for member in self.parent.members if
|
for unforgeableMember in (member for member in self.parent.members if
|
||||||
(member.isAttr() or member.isMethod()) and
|
(member.isAttr() or member.isMethod()) and
|
||||||
member.isUnforgeable()):
|
member.isUnforgeable()):
|
||||||
|
@ -1363,17 +1344,6 @@ class IDLInterfaceOrNamespace(IDLInterfaceOrInterfaceMixinOrNamespace):
|
||||||
(attributeName, name),
|
(attributeName, name),
|
||||||
[member.location, m.location])
|
[member.location, m.location])
|
||||||
|
|
||||||
# We don't support consequential unforgeable interfaces. Need to check
|
|
||||||
# this here, because in finish() an interface might not know yet that
|
|
||||||
# it's consequential.
|
|
||||||
if self.getExtendedAttribute("Unforgeable") and self.isConsequential():
|
|
||||||
raise WebIDLError(
|
|
||||||
"%s is an unforgeable consequential interface" %
|
|
||||||
self.identifier.name,
|
|
||||||
[self.location] +
|
|
||||||
list(i.location for i in
|
|
||||||
(self.interfacesBasedOnSelf - {self})))
|
|
||||||
|
|
||||||
# We also don't support inheriting from unforgeable interfaces.
|
# We also don't support inheriting from unforgeable interfaces.
|
||||||
if self.getExtendedAttribute("Unforgeable") and self.hasChildInterfaces():
|
if self.getExtendedAttribute("Unforgeable") and self.hasChildInterfaces():
|
||||||
locations = ([self.location] +
|
locations = ([self.location] +
|
||||||
|
@ -1529,16 +1499,6 @@ class IDLInterfaceOrNamespace(IDLInterfaceOrInterfaceMixinOrNamespace):
|
||||||
'an integer-typed "length" attribute',
|
'an integer-typed "length" attribute',
|
||||||
[self.location, indexedGetter.location])
|
[self.location, indexedGetter.location])
|
||||||
|
|
||||||
def isExternal(self):
|
|
||||||
return False
|
|
||||||
|
|
||||||
def setIsConsequentialInterfaceOf(self, other):
|
|
||||||
self._consequential = True
|
|
||||||
self.interfacesBasedOnSelf.add(other)
|
|
||||||
|
|
||||||
def isConsequential(self):
|
|
||||||
return self._consequential
|
|
||||||
|
|
||||||
def setCallback(self, value):
|
def setCallback(self, value):
|
||||||
self._callback = value
|
self._callback = value
|
||||||
|
|
||||||
|
@ -1553,8 +1513,6 @@ class IDLInterfaceOrNamespace(IDLInterfaceOrInterfaceMixinOrNamespace):
|
||||||
not self.isJSImplemented() and
|
not self.isJSImplemented() and
|
||||||
# Not inheriting from another interface
|
# Not inheriting from another interface
|
||||||
not self.parent and
|
not self.parent and
|
||||||
# No consequential interfaces
|
|
||||||
len(self.getConsequentialInterfaces()) == 0 and
|
|
||||||
# No attributes of any kinds
|
# No attributes of any kinds
|
||||||
not any(m.isAttr() for m in self.members) and
|
not any(m.isAttr() for m in self.members) and
|
||||||
# There is at least one regular operation, and all regular
|
# There is at least one regular operation, and all regular
|
||||||
|
@ -1582,10 +1540,6 @@ class IDLInterfaceOrNamespace(IDLInterfaceOrInterfaceMixinOrNamespace):
|
||||||
return (not self.isCallback() and not self.isNamespace()
|
return (not self.isCallback() and not self.isNamespace()
|
||||||
and self.getUserData('hasConcreteDescendant', False))
|
and self.getUserData('hasConcreteDescendant', False))
|
||||||
|
|
||||||
def addImplementedInterface(self, implementedInterface):
|
|
||||||
assert(isinstance(implementedInterface, IDLInterface))
|
|
||||||
self.implementedInterfaces.add(implementedInterface)
|
|
||||||
|
|
||||||
def addIncludedMixin(self, includedMixin):
|
def addIncludedMixin(self, includedMixin):
|
||||||
assert(isinstance(includedMixin, IDLInterfaceMixin))
|
assert(isinstance(includedMixin, IDLInterfaceMixin))
|
||||||
self.includedMixins.add(includedMixin)
|
self.includedMixins.add(includedMixin)
|
||||||
|
@ -1603,27 +1557,10 @@ class IDLInterfaceOrNamespace(IDLInterfaceOrInterfaceMixinOrNamespace):
|
||||||
parentInterfaces.insert(0, self.parent)
|
parentInterfaces.insert(0, self.parent)
|
||||||
return parentInterfaces
|
return parentInterfaces
|
||||||
|
|
||||||
def getConsequentialInterfaces(self):
|
|
||||||
assert(self._finished)
|
|
||||||
# The interfaces we implement directly
|
|
||||||
consequentialInterfaces = set(self.implementedInterfaces)
|
|
||||||
|
|
||||||
# And their inherited interfaces
|
|
||||||
for iface in self.implementedInterfaces:
|
|
||||||
consequentialInterfaces |= set(iface.getInheritedInterfaces())
|
|
||||||
|
|
||||||
# And now collect up the consequential interfaces of all of those
|
|
||||||
temp = set()
|
|
||||||
for iface in consequentialInterfaces:
|
|
||||||
temp |= iface.getConsequentialInterfaces()
|
|
||||||
|
|
||||||
return consequentialInterfaces | temp
|
|
||||||
|
|
||||||
def findInterfaceLoopPoint(self, otherInterface):
|
def findInterfaceLoopPoint(self, otherInterface):
|
||||||
"""
|
"""
|
||||||
Finds an interface, amongst our ancestors and consequential interfaces,
|
Finds an interface amongst our ancestors that inherits from otherInterface.
|
||||||
that inherits from otherInterface or implements otherInterface
|
If there is no such interface, returns None.
|
||||||
directly. If there is no such interface, returns None.
|
|
||||||
"""
|
"""
|
||||||
if self.parent:
|
if self.parent:
|
||||||
if self.parent == otherInterface:
|
if self.parent == otherInterface:
|
||||||
|
@ -1631,13 +1568,8 @@ class IDLInterfaceOrNamespace(IDLInterfaceOrInterfaceMixinOrNamespace):
|
||||||
loopPoint = self.parent.findInterfaceLoopPoint(otherInterface)
|
loopPoint = self.parent.findInterfaceLoopPoint(otherInterface)
|
||||||
if loopPoint:
|
if loopPoint:
|
||||||
return loopPoint
|
return loopPoint
|
||||||
if otherInterface in self.implementedInterfaces:
|
|
||||||
return self
|
|
||||||
for iface in self.implementedInterfaces:
|
|
||||||
loopPoint = iface.findInterfaceLoopPoint(otherInterface)
|
|
||||||
if loopPoint:
|
|
||||||
return loopPoint
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def setNonPartial(self, location, parent, members):
|
def setNonPartial(self, location, parent, members):
|
||||||
assert not parent or isinstance(parent, IDLIdentifierPlaceholder)
|
assert not parent or isinstance(parent, IDLIdentifierPlaceholder)
|
||||||
IDLInterfaceOrInterfaceMixinOrNamespace.setNonPartial(self, location, members)
|
IDLInterfaceOrInterfaceMixinOrNamespace.setNonPartial(self, location, members)
|
||||||
|
@ -1671,7 +1603,6 @@ class IDLInterfaceOrNamespace(IDLInterfaceOrInterfaceMixinOrNamespace):
|
||||||
|
|
||||||
def _getDependentObjects(self):
|
def _getDependentObjects(self):
|
||||||
deps = set(self.members)
|
deps = set(self.members)
|
||||||
deps.update(self.implementedInterfaces)
|
|
||||||
deps.update(self.includedMixins)
|
deps.update(self.includedMixins)
|
||||||
if self.parent:
|
if self.parent:
|
||||||
deps.add(self.parent)
|
deps.add(self.parent)
|
||||||
|
@ -1794,20 +1725,6 @@ class IDLInterface(IDLInterfaceOrNamespace):
|
||||||
self.parentScope.addIfaceGlobalNames(self.identifier.name,
|
self.parentScope.addIfaceGlobalNames(self.identifier.name,
|
||||||
self.globalNames)
|
self.globalNames)
|
||||||
self._isOnGlobalProtoChain = True
|
self._isOnGlobalProtoChain = True
|
||||||
elif identifier == "PrimaryGlobal":
|
|
||||||
if not attr.noArguments():
|
|
||||||
raise WebIDLError("[PrimaryGlobal] must take no arguments",
|
|
||||||
[attr.location])
|
|
||||||
if self.parentScope.primaryGlobalAttr is not None:
|
|
||||||
raise WebIDLError(
|
|
||||||
"[PrimaryGlobal] specified twice",
|
|
||||||
[attr.location,
|
|
||||||
self.parentScope.primaryGlobalAttr.location])
|
|
||||||
self.parentScope.primaryGlobalAttr = attr
|
|
||||||
self.parentScope.primaryGlobalName = self.identifier.name
|
|
||||||
self.parentScope.addIfaceGlobalNames(self.identifier.name,
|
|
||||||
[self.identifier.name])
|
|
||||||
self._isOnGlobalProtoChain = True
|
|
||||||
elif identifier == "LegacyWindowAlias":
|
elif identifier == "LegacyWindowAlias":
|
||||||
if attr.hasValue():
|
if attr.hasValue():
|
||||||
self.legacyWindowAliases = [attr.value()]
|
self.legacyWindowAliases = [attr.value()]
|
||||||
|
@ -3081,8 +2998,9 @@ class IDLWrapperType(IDLType):
|
||||||
return True
|
return True
|
||||||
iface = self.inner
|
iface = self.inner
|
||||||
if iface.isExternal():
|
if iface.isExternal():
|
||||||
# Let's say true, though ideally we'd only do this when
|
# Let's say true, so we don't have to implement exposure mixins on
|
||||||
# exposureSet contains the primary global's name.
|
# external interfaces and sprinkle [Exposed=Window] on every single
|
||||||
|
# external interface declaration.
|
||||||
return True
|
return True
|
||||||
return iface.exposureSet.issuperset(exposureSet)
|
return iface.exposureSet.issuperset(exposureSet)
|
||||||
|
|
||||||
|
@ -3865,10 +3783,6 @@ class IDLInterfaceMember(IDLObjectWithIdentifier, IDLExposureMixins):
|
||||||
return self._extendedAttrDict.get(name, None)
|
return self._extendedAttrDict.get(name, None)
|
||||||
|
|
||||||
def finish(self, scope):
|
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)
|
IDLExposureMixins.finish(self, scope)
|
||||||
|
|
||||||
def validate(self):
|
def validate(self):
|
||||||
|
@ -5539,52 +5453,6 @@ class IDLConstructor(IDLMethod):
|
||||||
[IDLExtendedAttribute(self.location, ("NewObject",))])
|
[IDLExtendedAttribute(self.location, ("NewObject",))])
|
||||||
|
|
||||||
|
|
||||||
class IDLImplementsStatement(IDLObject):
|
|
||||||
def __init__(self, location, implementor, implementee):
|
|
||||||
IDLObject.__init__(self, location)
|
|
||||||
self.implementor = implementor
|
|
||||||
self.implementee = implementee
|
|
||||||
self._finished = False
|
|
||||||
|
|
||||||
def finish(self, scope):
|
|
||||||
if self._finished:
|
|
||||||
return
|
|
||||||
assert(isinstance(self.implementor, IDLIdentifierPlaceholder))
|
|
||||||
assert(isinstance(self.implementee, IDLIdentifierPlaceholder))
|
|
||||||
implementor = self.implementor.finish(scope)
|
|
||||||
implementee = self.implementee.finish(scope)
|
|
||||||
# NOTE: we depend on not setting self.implementor and
|
|
||||||
# self.implementee here to keep track of the original
|
|
||||||
# locations.
|
|
||||||
if not isinstance(implementor, IDLInterface):
|
|
||||||
raise WebIDLError("Left-hand side of 'implements' is not an "
|
|
||||||
"interface",
|
|
||||||
[self.implementor.location])
|
|
||||||
if implementor.isCallback():
|
|
||||||
raise WebIDLError("Left-hand side of 'implements' is a callback "
|
|
||||||
"interface",
|
|
||||||
[self.implementor.location])
|
|
||||||
if not isinstance(implementee, IDLInterface):
|
|
||||||
raise WebIDLError("Right-hand side of 'implements' is not an "
|
|
||||||
"interface",
|
|
||||||
[self.implementee.location])
|
|
||||||
if implementee.isCallback():
|
|
||||||
raise WebIDLError("Right-hand side of 'implements' is a callback "
|
|
||||||
"interface",
|
|
||||||
[self.implementee.location])
|
|
||||||
implementor.addImplementedInterface(implementee)
|
|
||||||
self.implementor = implementor
|
|
||||||
self.implementee = implementee
|
|
||||||
|
|
||||||
def validate(self):
|
|
||||||
pass
|
|
||||||
|
|
||||||
def addExtendedAttributes(self, attrs):
|
|
||||||
if len(attrs) != 0:
|
|
||||||
raise WebIDLError("There are no extended attributes that are "
|
|
||||||
"allowed on implements statements",
|
|
||||||
[attrs[0].location, self.location])
|
|
||||||
|
|
||||||
class IDLIncludesStatement(IDLObject):
|
class IDLIncludesStatement(IDLObject):
|
||||||
def __init__(self, location, interface, mixin):
|
def __init__(self, location, interface, mixin):
|
||||||
IDLObject.__init__(self, location)
|
IDLObject.__init__(self, location)
|
||||||
|
@ -5606,16 +5474,18 @@ class IDLIncludesStatement(IDLObject):
|
||||||
if not isinstance(interface, IDLInterface):
|
if not isinstance(interface, IDLInterface):
|
||||||
raise WebIDLError("Left-hand side of 'includes' is not an "
|
raise WebIDLError("Left-hand side of 'includes' is not an "
|
||||||
"interface",
|
"interface",
|
||||||
[self.interface.location])
|
[self.interface.location, interface.location])
|
||||||
if interface.isCallback():
|
if interface.isCallback():
|
||||||
raise WebIDLError("Left-hand side of 'includes' is a callback "
|
raise WebIDLError("Left-hand side of 'includes' is a callback "
|
||||||
"interface",
|
"interface",
|
||||||
[self.interface.location])
|
[self.interface.location, interface.location])
|
||||||
if not isinstance(mixin, IDLInterfaceMixin):
|
if not isinstance(mixin, IDLInterfaceMixin):
|
||||||
raise WebIDLError("Right-hand side of 'includes' is not an "
|
raise WebIDLError("Right-hand side of 'includes' is not an "
|
||||||
"interface mixin",
|
"interface mixin",
|
||||||
[self.mixin.location])
|
[self.mixin.location, mixin.location])
|
||||||
|
|
||||||
mixin.actualExposureGlobalNames.update(interface._exposureGlobalNames)
|
mixin.actualExposureGlobalNames.update(interface._exposureGlobalNames)
|
||||||
|
|
||||||
interface.addIncludedMixin(mixin)
|
interface.addIncludedMixin(mixin)
|
||||||
self.interface = interface
|
self.interface = interface
|
||||||
self.mixin = mixin
|
self.mixin = mixin
|
||||||
|
@ -5721,7 +5591,6 @@ class Tokenizer(object):
|
||||||
return t
|
return t
|
||||||
|
|
||||||
keywords = {
|
keywords = {
|
||||||
"module": "MODULE",
|
|
||||||
"interface": "INTERFACE",
|
"interface": "INTERFACE",
|
||||||
"partial": "PARTIAL",
|
"partial": "PARTIAL",
|
||||||
"mixin": "MIXIN",
|
"mixin": "MIXIN",
|
||||||
|
@ -5730,7 +5599,6 @@ class Tokenizer(object):
|
||||||
"enum": "ENUM",
|
"enum": "ENUM",
|
||||||
"callback": "CALLBACK",
|
"callback": "CALLBACK",
|
||||||
"typedef": "TYPEDEF",
|
"typedef": "TYPEDEF",
|
||||||
"implements": "IMPLEMENTS",
|
|
||||||
"includes": "INCLUDES",
|
"includes": "INCLUDES",
|
||||||
"const": "CONST",
|
"const": "CONST",
|
||||||
"null": "NULL",
|
"null": "NULL",
|
||||||
|
@ -5894,7 +5762,6 @@ class Parser(Tokenizer):
|
||||||
| Exception
|
| Exception
|
||||||
| Enum
|
| Enum
|
||||||
| Typedef
|
| Typedef
|
||||||
| ImplementsStatement
|
|
||||||
| IncludesStatement
|
| IncludesStatement
|
||||||
"""
|
"""
|
||||||
p[0] = p[1]
|
p[0] = p[1]
|
||||||
|
@ -6427,16 +6294,6 @@ class Parser(Tokenizer):
|
||||||
p[2], p[3])
|
p[2], p[3])
|
||||||
p[0] = typedef
|
p[0] = typedef
|
||||||
|
|
||||||
def p_ImplementsStatement(self, p):
|
|
||||||
"""
|
|
||||||
ImplementsStatement : ScopedName IMPLEMENTS ScopedName SEMICOLON
|
|
||||||
"""
|
|
||||||
assert(p[2] == "implements")
|
|
||||||
implementor = IDLIdentifierPlaceholder(self.getLocation(p, 1), p[1])
|
|
||||||
implementee = IDLIdentifierPlaceholder(self.getLocation(p, 3), p[3])
|
|
||||||
p[0] = IDLImplementsStatement(self.getLocation(p, 1), implementor,
|
|
||||||
implementee)
|
|
||||||
|
|
||||||
def p_IncludesStatement(self, p):
|
def p_IncludesStatement(self, p):
|
||||||
"""
|
"""
|
||||||
IncludesStatement : ScopedName INCLUDES ScopedName SEMICOLON
|
IncludesStatement : ScopedName INCLUDES ScopedName SEMICOLON
|
||||||
|
@ -6898,7 +6755,6 @@ class Parser(Tokenizer):
|
||||||
| ENUM
|
| ENUM
|
||||||
| EXCEPTION
|
| EXCEPTION
|
||||||
| GETTER
|
| GETTER
|
||||||
| IMPLEMENTS
|
|
||||||
| INHERIT
|
| INHERIT
|
||||||
| INTERFACE
|
| INTERFACE
|
||||||
| ITERABLE
|
| ITERABLE
|
||||||
|
@ -7025,11 +6881,9 @@ class Parser(Tokenizer):
|
||||||
| FALSE
|
| FALSE
|
||||||
| FLOAT
|
| FLOAT
|
||||||
| GETTER
|
| GETTER
|
||||||
| IMPLEMENTS
|
|
||||||
| INHERIT
|
| INHERIT
|
||||||
| INTERFACE
|
| INTERFACE
|
||||||
| LONG
|
| LONG
|
||||||
| MODULE
|
|
||||||
| NULL
|
| NULL
|
||||||
| OBJECT
|
| OBJECT
|
||||||
| OCTET
|
| OCTET
|
||||||
|
@ -7479,12 +7333,6 @@ class Parser(Tokenizer):
|
||||||
|
|
||||||
self._globalScope = IDLScope(BuiltinLocation("<Global Scope>"), None, None)
|
self._globalScope = IDLScope(BuiltinLocation("<Global Scope>"), None, None)
|
||||||
|
|
||||||
# To make our test harness work, pretend like we have a primary global already.
|
|
||||||
# Note that we _don't_ set _globalScope.primaryGlobalAttr,
|
|
||||||
# so we'll still be able to detect multiple PrimaryGlobal extended attributes.
|
|
||||||
self._globalScope.primaryGlobalName = "FakeTestPrimaryGlobal"
|
|
||||||
self._globalScope.addIfaceGlobalNames("FakeTestPrimaryGlobal", ["FakeTestPrimaryGlobal"])
|
|
||||||
|
|
||||||
self._installBuiltins(self._globalScope)
|
self._installBuiltins(self._globalScope)
|
||||||
self._productions = []
|
self._productions = []
|
||||||
|
|
||||||
|
@ -7568,20 +7416,13 @@ class Parser(Tokenizer):
|
||||||
self._productions.append(itr_iface)
|
self._productions.append(itr_iface)
|
||||||
iterable.iteratorType = IDLWrapperType(iface.location, itr_iface)
|
iterable.iteratorType = IDLWrapperType(iface.location, itr_iface)
|
||||||
|
|
||||||
# Then, finish all the IDLImplementsStatements. In particular, we
|
|
||||||
# have to make sure we do those before we do the IDLInterfaces.
|
|
||||||
# XXX khuey hates this bit and wants to nuke it from orbit.
|
|
||||||
implementsStatements = [p for p in self._productions if
|
|
||||||
isinstance(p, IDLImplementsStatement)]
|
|
||||||
# Make sure we finish IDLIncludesStatements before we finish the
|
# Make sure we finish IDLIncludesStatements before we finish the
|
||||||
# IDLInterfaces.
|
# IDLInterfaces.
|
||||||
|
# XXX khuey hates this bit and wants to nuke it from orbit.
|
||||||
includesStatements = [p for p in self._productions if
|
includesStatements = [p for p in self._productions if
|
||||||
isinstance(p, IDLIncludesStatement)]
|
isinstance(p, IDLIncludesStatement)]
|
||||||
otherStatements = [p for p in self._productions if
|
otherStatements = [p for p in self._productions if
|
||||||
not isinstance(p, (IDLImplementsStatement,
|
not isinstance(p, IDLIncludesStatement)]
|
||||||
IDLIncludesStatement))]
|
|
||||||
for production in implementsStatements:
|
|
||||||
production.finish(self.globalScope())
|
|
||||||
for production in includesStatements:
|
for production in includesStatements:
|
||||||
production.finish(self.globalScope())
|
production.finish(self.globalScope())
|
||||||
for production in otherStatements:
|
for production in otherStatements:
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
|
import traceback
|
||||||
|
|
||||||
def WebIDLTest(parser, harness):
|
def WebIDLTest(parser, harness):
|
||||||
threw = False
|
threw = False
|
||||||
try:
|
try:
|
||||||
parser.parse("""
|
parser.parse("""
|
||||||
[Global]
|
[Global, Exposed=TestConstructorGlobal]
|
||||||
interface TestConstructorGlobal {
|
interface TestConstructorGlobal {
|
||||||
constructor();
|
constructor();
|
||||||
};
|
};
|
||||||
|
@ -18,7 +20,8 @@ def WebIDLTest(parser, harness):
|
||||||
threw = False
|
threw = False
|
||||||
try:
|
try:
|
||||||
parser.parse("""
|
parser.parse("""
|
||||||
[Global, NamedConstructor=FooBar]
|
[Global, Exposed=TestNamedConstructorGlobal,
|
||||||
|
NamedConstructor=FooBar]
|
||||||
interface TestNamedConstructorGlobal {
|
interface TestNamedConstructorGlobal {
|
||||||
};
|
};
|
||||||
""")
|
""")
|
||||||
|
@ -32,7 +35,8 @@ def WebIDLTest(parser, harness):
|
||||||
threw = False
|
threw = False
|
||||||
try:
|
try:
|
||||||
parser.parse("""
|
parser.parse("""
|
||||||
[NamedConstructor=FooBar, Global]
|
[NamedConstructor=FooBar, Global,
|
||||||
|
Exposed=TestNamedConstructorGlobal]
|
||||||
interface TestNamedConstructorGlobal {
|
interface TestNamedConstructorGlobal {
|
||||||
};
|
};
|
||||||
""")
|
""")
|
||||||
|
@ -46,7 +50,7 @@ def WebIDLTest(parser, harness):
|
||||||
threw = False
|
threw = False
|
||||||
try:
|
try:
|
||||||
parser.parse("""
|
parser.parse("""
|
||||||
[Global, HTMLConstructor]
|
[Global, HTMLConstructor, Exposed=TestHTMLConstructorGlobal]
|
||||||
interface TestHTMLConstructorGlobal {
|
interface TestHTMLConstructorGlobal {
|
||||||
};
|
};
|
||||||
""")
|
""")
|
||||||
|
@ -61,7 +65,7 @@ def WebIDLTest(parser, harness):
|
||||||
threw = False
|
threw = False
|
||||||
try:
|
try:
|
||||||
parser.parse("""
|
parser.parse("""
|
||||||
[HTMLConstructor, Global]
|
[HTMLConstructor, Global, Exposed=TestHTMLConstructorGlobal]
|
||||||
interface TestHTMLConstructorGlobal {
|
interface TestHTMLConstructorGlobal {
|
||||||
};
|
};
|
||||||
""")
|
""")
|
||||||
|
|
|
@ -736,3 +736,17 @@ def WebIDLTest(parser, harness):
|
||||||
threw = True
|
threw = True
|
||||||
|
|
||||||
harness.ok(threw, "Only unrestricted values can be initialized to NaN")
|
harness.ok(threw, "Only unrestricted values can be initialized to NaN")
|
||||||
|
|
||||||
|
parser = parser.reset();
|
||||||
|
threw = False
|
||||||
|
try:
|
||||||
|
parser.parse("""
|
||||||
|
dictionary Foo {
|
||||||
|
long module;
|
||||||
|
};
|
||||||
|
""")
|
||||||
|
results = parser.finish()
|
||||||
|
except:
|
||||||
|
threw = True
|
||||||
|
|
||||||
|
harness.ok(not threw, "Should be able to use 'module' as a dictionary member name")
|
||||||
|
|
|
@ -59,8 +59,6 @@ def WebIDLTest(parser, harness):
|
||||||
void passKid(Kid arg);
|
void passKid(Kid arg);
|
||||||
void passParent(Parent arg);
|
void passParent(Parent arg);
|
||||||
void passGrandparent(Grandparent arg);
|
void passGrandparent(Grandparent arg);
|
||||||
void passImplemented(Implemented arg);
|
|
||||||
void passImplementedParent(ImplementedParent arg);
|
|
||||||
void passUnrelated1(Unrelated1 arg);
|
void passUnrelated1(Unrelated1 arg);
|
||||||
void passUnrelated2(Unrelated2 arg);
|
void passUnrelated2(Unrelated2 arg);
|
||||||
void passArrayBuffer(ArrayBuffer arg);
|
void passArrayBuffer(ArrayBuffer arg);
|
||||||
|
@ -70,9 +68,6 @@ def WebIDLTest(parser, harness):
|
||||||
interface Kid : Parent {};
|
interface Kid : Parent {};
|
||||||
interface Parent : Grandparent {};
|
interface Parent : Grandparent {};
|
||||||
interface Grandparent {};
|
interface Grandparent {};
|
||||||
interface Implemented : ImplementedParent {};
|
|
||||||
Parent implements Implemented;
|
|
||||||
interface ImplementedParent {};
|
|
||||||
interface Unrelated1 {};
|
interface Unrelated1 {};
|
||||||
interface Unrelated2 {};
|
interface Unrelated2 {};
|
||||||
""")
|
""")
|
||||||
|
@ -156,8 +151,7 @@ def WebIDLTest(parser, harness):
|
||||||
argTypes = [ "long", "short", "long?", "short?", "boolean",
|
argTypes = [ "long", "short", "long?", "short?", "boolean",
|
||||||
"boolean?", "DOMString", "ByteString", "Enum", "Enum2",
|
"boolean?", "DOMString", "ByteString", "Enum", "Enum2",
|
||||||
"Interface", "Interface?",
|
"Interface", "Interface?",
|
||||||
"AncestorInterface", "UnrelatedInterface",
|
"AncestorInterface", "UnrelatedInterface", "CallbackInterface",
|
||||||
"ImplementedInterface", "CallbackInterface",
|
|
||||||
"CallbackInterface?", "CallbackInterface2",
|
"CallbackInterface?", "CallbackInterface2",
|
||||||
"object", "Callback", "Callback2", "Dict",
|
"object", "Callback", "Callback2", "Dict",
|
||||||
"Dict2", "sequence<long>", "sequence<short>",
|
"Dict2", "sequence<long>", "sequence<short>",
|
||||||
|
@ -190,7 +184,7 @@ def WebIDLTest(parser, harness):
|
||||||
bufferSourceTypes = ["ArrayBuffer", "ArrayBufferView", "Uint8Array", "Uint16Array"]
|
bufferSourceTypes = ["ArrayBuffer", "ArrayBufferView", "Uint8Array", "Uint16Array"]
|
||||||
sharedBufferSourceTypes = ["SharedArrayBuffer"]
|
sharedBufferSourceTypes = ["SharedArrayBuffer"]
|
||||||
interfaces = [ "Interface", "Interface?", "AncestorInterface",
|
interfaces = [ "Interface", "Interface?", "AncestorInterface",
|
||||||
"UnrelatedInterface", "ImplementedInterface" ] + bufferSourceTypes + sharedBufferSourceTypes
|
"UnrelatedInterface" ] + bufferSourceTypes + sharedBufferSourceTypes
|
||||||
nullables = (["long?", "short?", "boolean?", "Interface?",
|
nullables = (["long?", "short?", "boolean?", "Interface?",
|
||||||
"CallbackInterface?", "Dict", "Dict2",
|
"CallbackInterface?", "Dict", "Dict2",
|
||||||
"Date?", "any", "Promise<any>?"] +
|
"Date?", "any", "Promise<any>?"] +
|
||||||
|
@ -230,7 +224,6 @@ def WebIDLTest(parser, harness):
|
||||||
setDistinguishable("AncestorInterface", notRelatedInterfaces)
|
setDistinguishable("AncestorInterface", notRelatedInterfaces)
|
||||||
setDistinguishable("UnrelatedInterface",
|
setDistinguishable("UnrelatedInterface",
|
||||||
allBut(argTypes, ["object", "UnrelatedInterface"]))
|
allBut(argTypes, ["object", "UnrelatedInterface"]))
|
||||||
setDistinguishable("ImplementedInterface", notRelatedInterfaces)
|
|
||||||
setDistinguishable("CallbackInterface", nonUserObjects)
|
setDistinguishable("CallbackInterface", nonUserObjects)
|
||||||
setDistinguishable("CallbackInterface?", allBut(nonUserObjects, nullables))
|
setDistinguishable("CallbackInterface?", allBut(nonUserObjects, nullables))
|
||||||
setDistinguishable("CallbackInterface2", nonUserObjects)
|
setDistinguishable("CallbackInterface2", nonUserObjects)
|
||||||
|
@ -272,8 +265,6 @@ def WebIDLTest(parser, harness):
|
||||||
interface Interface : AncestorInterface {};
|
interface Interface : AncestorInterface {};
|
||||||
interface AncestorInterface {};
|
interface AncestorInterface {};
|
||||||
interface UnrelatedInterface {};
|
interface UnrelatedInterface {};
|
||||||
interface ImplementedInterface {};
|
|
||||||
Interface implements ImplementedInterface;
|
|
||||||
callback interface CallbackInterface {};
|
callback interface CallbackInterface {};
|
||||||
callback interface CallbackInterface2 {};
|
callback interface CallbackInterface2 {};
|
||||||
callback Callback = any();
|
callback Callback = any();
|
||||||
|
|
|
@ -2,9 +2,9 @@ import WebIDL
|
||||||
|
|
||||||
def WebIDLTest(parser, harness):
|
def WebIDLTest(parser, harness):
|
||||||
parser.parse("""
|
parser.parse("""
|
||||||
[PrimaryGlobal] interface Foo {};
|
[Global, Exposed=Foo] interface Foo {};
|
||||||
[Global=(Bar1,Bar2)] interface Bar {};
|
[Global=(Bar, Bar1,Bar2), Exposed=Bar] interface Bar {};
|
||||||
[Global=Baz2] interface Baz {};
|
[Global=(Baz, Baz2), Exposed=Baz] interface Baz {};
|
||||||
|
|
||||||
[Exposed=(Foo,Bar1)]
|
[Exposed=(Foo,Bar1)]
|
||||||
interface Iface {
|
interface Iface {
|
||||||
|
@ -51,10 +51,11 @@ def WebIDLTest(parser, harness):
|
||||||
|
|
||||||
parser = parser.reset()
|
parser = parser.reset()
|
||||||
parser.parse("""
|
parser.parse("""
|
||||||
[PrimaryGlobal] interface Foo {};
|
[Global, Exposed=Foo] interface Foo {};
|
||||||
[Global=(Bar1,Bar2)] interface Bar {};
|
[Global=(Bar, Bar1, Bar2), Exposed=Bar] interface Bar {};
|
||||||
[Global=Baz2] interface Baz {};
|
[Global=(Baz, Baz2), Exposed=Baz] interface Baz {};
|
||||||
|
|
||||||
|
[Exposed=Foo]
|
||||||
interface Iface2 {
|
interface Iface2 {
|
||||||
void method3();
|
void method3();
|
||||||
};
|
};
|
||||||
|
@ -80,9 +81,9 @@ def WebIDLTest(parser, harness):
|
||||||
|
|
||||||
parser = parser.reset()
|
parser = parser.reset()
|
||||||
parser.parse("""
|
parser.parse("""
|
||||||
[PrimaryGlobal] interface Foo {};
|
[Global, Exposed=Foo] interface Foo {};
|
||||||
[Global=(Bar1,Bar2)] interface Bar {};
|
[Global=(Bar, Bar1, Bar2), Exposed=Bar] interface Bar {};
|
||||||
[Global=Baz2] interface Baz {};
|
[Global=(Baz, Baz2), Exposed=Baz] interface Baz {};
|
||||||
|
|
||||||
[Exposed=Foo]
|
[Exposed=Foo]
|
||||||
interface Iface3 {
|
interface Iface3 {
|
||||||
|
@ -90,11 +91,11 @@ def WebIDLTest(parser, harness):
|
||||||
};
|
};
|
||||||
|
|
||||||
[Exposed=(Foo,Bar1)]
|
[Exposed=(Foo,Bar1)]
|
||||||
interface Mixin {
|
interface mixin Mixin {
|
||||||
void method5();
|
void method5();
|
||||||
};
|
};
|
||||||
|
|
||||||
Iface3 implements Mixin;
|
Iface3 includes Mixin;
|
||||||
""")
|
""")
|
||||||
results = parser.finish()
|
results = parser.finish()
|
||||||
harness.check(len(results), 6, "Should know about six things");
|
harness.check(len(results), 6, "Should know about six things");
|
||||||
|
@ -181,8 +182,8 @@ def WebIDLTest(parser, harness):
|
||||||
threw = False
|
threw = False
|
||||||
try:
|
try:
|
||||||
parser.parse("""
|
parser.parse("""
|
||||||
[Global] interface Foo {};
|
[Global, Exposed=Foo] interface Foo {};
|
||||||
[Global] interface Bar {};
|
[Global, Exposed=Bar] interface Bar {};
|
||||||
|
|
||||||
[Exposed=Foo]
|
[Exposed=Foo]
|
||||||
interface Baz {
|
interface Baz {
|
||||||
|
@ -198,25 +199,40 @@ def WebIDLTest(parser, harness):
|
||||||
harness.ok(threw, "Should have thrown on member exposed where its interface is not.")
|
harness.ok(threw, "Should have thrown on member exposed where its interface is not.")
|
||||||
|
|
||||||
parser = parser.reset()
|
parser = parser.reset()
|
||||||
threw = False
|
parser.parse("""
|
||||||
try:
|
[Global, Exposed=Foo] interface Foo {};
|
||||||
parser.parse("""
|
[Global, Exposed=Bar] interface Bar {};
|
||||||
[Global] interface Foo {};
|
|
||||||
[Global] interface Bar {};
|
|
||||||
|
|
||||||
[Exposed=Foo]
|
[Exposed=Foo]
|
||||||
interface Baz {
|
interface Baz {
|
||||||
void method();
|
void method();
|
||||||
};
|
};
|
||||||
|
|
||||||
[Exposed=Bar]
|
[Exposed=Bar]
|
||||||
interface Mixin {};
|
interface mixin Mixin {
|
||||||
|
void otherMethod();
|
||||||
|
};
|
||||||
|
|
||||||
Baz implements Mixin;
|
Baz includes Mixin;
|
||||||
""")
|
""")
|
||||||
|
|
||||||
|
results = parser.finish()
|
||||||
|
|
||||||
|
harness.check(len(results), 5, "Should know about five things");
|
||||||
|
iface = results[2]
|
||||||
|
harness.ok(isinstance(iface, WebIDL.IDLInterface),
|
||||||
|
"Should have an interface here");
|
||||||
|
members = iface.members
|
||||||
|
harness.check(len(members), 2, "Should have two members")
|
||||||
|
|
||||||
|
harness.ok(members[0].exposureSet == set(["Foo"]),
|
||||||
|
"method should have the right exposure set")
|
||||||
|
harness.ok(members[0]._exposureGlobalNames == set(["Foo"]),
|
||||||
|
"method should have the right exposure global names")
|
||||||
|
|
||||||
|
harness.ok(members[1].exposureSet == set(["Bar"]),
|
||||||
|
"otherMethod should have the right exposure set")
|
||||||
|
harness.ok(members[1]._exposureGlobalNames == set(["Bar"]),
|
||||||
|
"otherMethod should have the right exposure global names")
|
||||||
|
|
||||||
results = parser.finish()
|
|
||||||
except Exception as x:
|
|
||||||
threw = True
|
|
||||||
|
|
||||||
harness.ok(threw, "Should have thrown on LHS of implements being exposed where RHS is not.")
|
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
def WebIDLTest(parser, harness):
|
def WebIDLTest(parser, harness):
|
||||||
parser.parse("""
|
parser.parse("""
|
||||||
[Global]
|
[Global, Exposed=Foo]
|
||||||
interface Foo : Bar {
|
interface Foo : Bar {
|
||||||
getter any(DOMString name);
|
getter any(DOMString name);
|
||||||
};
|
};
|
||||||
|
[Exposed=Foo]
|
||||||
interface Bar {};
|
interface Bar {};
|
||||||
""")
|
""")
|
||||||
|
|
||||||
|
@ -18,7 +19,7 @@ def WebIDLTest(parser, harness):
|
||||||
threw = False
|
threw = False
|
||||||
try:
|
try:
|
||||||
parser.parse("""
|
parser.parse("""
|
||||||
[Global]
|
[Global, Exposed=Foo]
|
||||||
interface Foo {
|
interface Foo {
|
||||||
getter any(DOMString name);
|
getter any(DOMString name);
|
||||||
setter void(DOMString name, any arg);
|
setter void(DOMString name, any arg);
|
||||||
|
@ -36,7 +37,7 @@ def WebIDLTest(parser, harness):
|
||||||
threw = False
|
threw = False
|
||||||
try:
|
try:
|
||||||
parser.parse("""
|
parser.parse("""
|
||||||
[Global]
|
[Global, Exposed=Foo]
|
||||||
interface Foo {
|
interface Foo {
|
||||||
getter any(DOMString name);
|
getter any(DOMString name);
|
||||||
deleter void(DOMString name);
|
deleter void(DOMString name);
|
||||||
|
@ -54,7 +55,7 @@ def WebIDLTest(parser, harness):
|
||||||
threw = False
|
threw = False
|
||||||
try:
|
try:
|
||||||
parser.parse("""
|
parser.parse("""
|
||||||
[Global, OverrideBuiltins]
|
[Global, OverrideBuiltins, Exposed=Foo]
|
||||||
interface Foo {
|
interface Foo {
|
||||||
};
|
};
|
||||||
""")
|
""")
|
||||||
|
@ -70,10 +71,10 @@ def WebIDLTest(parser, harness):
|
||||||
threw = False
|
threw = False
|
||||||
try:
|
try:
|
||||||
parser.parse("""
|
parser.parse("""
|
||||||
[Global]
|
[Global, Exposed=Foo]
|
||||||
interface Foo : Bar {
|
interface Foo : Bar {
|
||||||
};
|
};
|
||||||
[OverrideBuiltins]
|
[OverrideBuiltins, Exposed=Foo]
|
||||||
interface Bar {
|
interface Bar {
|
||||||
};
|
};
|
||||||
""")
|
""")
|
||||||
|
@ -89,9 +90,10 @@ def WebIDLTest(parser, harness):
|
||||||
threw = False
|
threw = False
|
||||||
try:
|
try:
|
||||||
parser.parse("""
|
parser.parse("""
|
||||||
[Global]
|
[Global, Exposed=Foo]
|
||||||
interface Foo {
|
interface Foo {
|
||||||
};
|
};
|
||||||
|
[Exposed=Foo]
|
||||||
interface Bar : Foo {
|
interface Bar : Foo {
|
||||||
};
|
};
|
||||||
""")
|
""")
|
||||||
|
|
|
@ -1,216 +0,0 @@
|
||||||
# Import the WebIDL module, so we can do isinstance checks and whatnot
|
|
||||||
import WebIDL
|
|
||||||
|
|
||||||
def WebIDLTest(parser, harness):
|
|
||||||
# Basic functionality
|
|
||||||
threw = False
|
|
||||||
try:
|
|
||||||
parser.parse("""
|
|
||||||
A implements B;
|
|
||||||
interface B {
|
|
||||||
attribute long x;
|
|
||||||
};
|
|
||||||
interface A {
|
|
||||||
attribute long y;
|
|
||||||
};
|
|
||||||
""")
|
|
||||||
results = parser.finish()
|
|
||||||
except:
|
|
||||||
threw = True
|
|
||||||
|
|
||||||
harness.ok(not threw, "Should not have thrown on implements statement "
|
|
||||||
"before interfaces")
|
|
||||||
harness.check(len(results), 3, "We have three statements")
|
|
||||||
harness.ok(isinstance(results[1], WebIDL.IDLInterface), "B is an interface")
|
|
||||||
harness.check(len(results[1].members), 1, "B has one member")
|
|
||||||
A = results[2]
|
|
||||||
harness.ok(isinstance(A, WebIDL.IDLInterface), "A is an interface")
|
|
||||||
harness.check(len(A.members), 2, "A has two members")
|
|
||||||
harness.check(A.members[0].identifier.name, "y", "First member is 'y'")
|
|
||||||
harness.check(A.members[1].identifier.name, "x", "Second member is 'x'")
|
|
||||||
|
|
||||||
# Duplicated member names not allowed
|
|
||||||
threw = False
|
|
||||||
try:
|
|
||||||
parser.parse("""
|
|
||||||
C implements D;
|
|
||||||
interface D {
|
|
||||||
attribute long x;
|
|
||||||
};
|
|
||||||
interface C {
|
|
||||||
attribute long x;
|
|
||||||
};
|
|
||||||
""")
|
|
||||||
parser.finish()
|
|
||||||
except:
|
|
||||||
threw = True
|
|
||||||
|
|
||||||
harness.ok(threw, "Should have thrown on implemented interface duplicating "
|
|
||||||
"a name on base interface")
|
|
||||||
|
|
||||||
# Same, but duplicated across implemented interfaces
|
|
||||||
threw = False
|
|
||||||
try:
|
|
||||||
parser.parse("""
|
|
||||||
E implements F;
|
|
||||||
E implements G;
|
|
||||||
interface F {
|
|
||||||
attribute long x;
|
|
||||||
};
|
|
||||||
interface G {
|
|
||||||
attribute long x;
|
|
||||||
};
|
|
||||||
interface E {};
|
|
||||||
""")
|
|
||||||
parser.finish()
|
|
||||||
except:
|
|
||||||
threw = True
|
|
||||||
|
|
||||||
harness.ok(threw, "Should have thrown on implemented interfaces "
|
|
||||||
"duplicating each other's member names")
|
|
||||||
|
|
||||||
# Same, but duplicated across indirectly implemented interfaces
|
|
||||||
threw = False
|
|
||||||
try:
|
|
||||||
parser.parse("""
|
|
||||||
H implements I;
|
|
||||||
H implements J;
|
|
||||||
I implements K;
|
|
||||||
interface K {
|
|
||||||
attribute long x;
|
|
||||||
};
|
|
||||||
interface L {
|
|
||||||
attribute long x;
|
|
||||||
};
|
|
||||||
interface I {};
|
|
||||||
interface J : L {};
|
|
||||||
interface H {};
|
|
||||||
""")
|
|
||||||
parser.finish()
|
|
||||||
except:
|
|
||||||
threw = True
|
|
||||||
|
|
||||||
harness.ok(threw, "Should have thrown on indirectly implemented interfaces "
|
|
||||||
"duplicating each other's member names")
|
|
||||||
|
|
||||||
# Same, but duplicated across an implemented interface and its parent
|
|
||||||
threw = False
|
|
||||||
try:
|
|
||||||
parser.parse("""
|
|
||||||
M implements N;
|
|
||||||
interface O {
|
|
||||||
attribute long x;
|
|
||||||
};
|
|
||||||
interface N : O {
|
|
||||||
attribute long x;
|
|
||||||
};
|
|
||||||
interface M {};
|
|
||||||
""")
|
|
||||||
parser.finish()
|
|
||||||
except:
|
|
||||||
threw = True
|
|
||||||
|
|
||||||
harness.ok(threw, "Should have thrown on implemented interface and its "
|
|
||||||
"ancestor duplicating member names")
|
|
||||||
|
|
||||||
# Reset the parser so we can actually find things where we expect
|
|
||||||
# them in the list
|
|
||||||
parser = parser.reset()
|
|
||||||
|
|
||||||
# Diamonds should be allowed
|
|
||||||
threw = False
|
|
||||||
try:
|
|
||||||
parser.parse("""
|
|
||||||
P implements Q;
|
|
||||||
P implements R;
|
|
||||||
Q implements S;
|
|
||||||
R implements S;
|
|
||||||
interface Q {};
|
|
||||||
interface R {};
|
|
||||||
interface S {
|
|
||||||
attribute long x;
|
|
||||||
};
|
|
||||||
interface P {};
|
|
||||||
""")
|
|
||||||
results = parser.finish()
|
|
||||||
except:
|
|
||||||
threw = True
|
|
||||||
|
|
||||||
harness.ok(not threw, "Diamond inheritance is fine")
|
|
||||||
harness.check(results[6].identifier.name, "S", "We should be looking at 'S'")
|
|
||||||
harness.check(len(results[6].members), 1, "S should have one member")
|
|
||||||
harness.check(results[6].members[0].identifier.name, "x",
|
|
||||||
"S's member should be 'x'")
|
|
||||||
|
|
||||||
parser = parser.reset()
|
|
||||||
threw = False
|
|
||||||
try:
|
|
||||||
parser.parse("""
|
|
||||||
interface TestInterface {
|
|
||||||
};
|
|
||||||
callback interface TestCallbackInterface {
|
|
||||||
};
|
|
||||||
TestInterface implements TestCallbackInterface;
|
|
||||||
""")
|
|
||||||
results = parser.finish()
|
|
||||||
except:
|
|
||||||
threw = True
|
|
||||||
|
|
||||||
harness.ok(threw,
|
|
||||||
"Should not allow callback interfaces on the right-hand side "
|
|
||||||
"of 'implements'")
|
|
||||||
|
|
||||||
parser = parser.reset()
|
|
||||||
threw = False
|
|
||||||
try:
|
|
||||||
parser.parse("""
|
|
||||||
interface TestInterface {
|
|
||||||
};
|
|
||||||
callback interface TestCallbackInterface {
|
|
||||||
};
|
|
||||||
TestCallbackInterface implements TestInterface;
|
|
||||||
""")
|
|
||||||
results = parser.finish()
|
|
||||||
except:
|
|
||||||
threw = True
|
|
||||||
|
|
||||||
harness.ok(threw,
|
|
||||||
"Should not allow callback interfaces on the left-hand side of "
|
|
||||||
"'implements'")
|
|
||||||
|
|
||||||
parser = parser.reset()
|
|
||||||
threw = False
|
|
||||||
try:
|
|
||||||
parser.parse("""
|
|
||||||
interface TestInterface {
|
|
||||||
};
|
|
||||||
dictionary Dict {
|
|
||||||
};
|
|
||||||
Dict implements TestInterface;
|
|
||||||
""")
|
|
||||||
results = parser.finish()
|
|
||||||
except:
|
|
||||||
threw = True
|
|
||||||
|
|
||||||
harness.ok(threw,
|
|
||||||
"Should not allow non-interfaces on the left-hand side "
|
|
||||||
"of 'implements'")
|
|
||||||
|
|
||||||
parser = parser.reset()
|
|
||||||
threw = False
|
|
||||||
try:
|
|
||||||
parser.parse("""
|
|
||||||
interface TestInterface {
|
|
||||||
};
|
|
||||||
dictionary Dict {
|
|
||||||
};
|
|
||||||
TestInterface implements Dict;
|
|
||||||
""")
|
|
||||||
results = parser.finish()
|
|
||||||
except:
|
|
||||||
threw = True
|
|
||||||
|
|
||||||
harness.ok(threw,
|
|
||||||
"Should not allow non-interfaces on the right-hand side "
|
|
||||||
"of 'implements'")
|
|
||||||
|
|
|
@ -80,100 +80,6 @@ def WebIDLTest(parser, harness):
|
||||||
|
|
||||||
harness.ok(threw, "Should not allow indirect cycles in interface inheritance chains")
|
harness.ok(threw, "Should not allow indirect cycles in interface inheritance chains")
|
||||||
|
|
||||||
parser = parser.reset()
|
|
||||||
threw = False
|
|
||||||
try:
|
|
||||||
parser.parse("""
|
|
||||||
interface A {};
|
|
||||||
interface B {};
|
|
||||||
A implements B;
|
|
||||||
B implements A;
|
|
||||||
""")
|
|
||||||
results = parser.finish()
|
|
||||||
except:
|
|
||||||
threw = True
|
|
||||||
|
|
||||||
harness.ok(threw, "Should not allow cycles via implements")
|
|
||||||
|
|
||||||
parser = parser.reset()
|
|
||||||
threw = False
|
|
||||||
try:
|
|
||||||
parser.parse("""
|
|
||||||
interface A {};
|
|
||||||
interface C {};
|
|
||||||
interface B {};
|
|
||||||
A implements C;
|
|
||||||
C implements B;
|
|
||||||
B implements A;
|
|
||||||
""")
|
|
||||||
results = parser.finish()
|
|
||||||
except:
|
|
||||||
threw = True
|
|
||||||
|
|
||||||
harness.ok(threw, "Should not allow indirect cycles via implements")
|
|
||||||
|
|
||||||
parser = parser.reset()
|
|
||||||
threw = False
|
|
||||||
try:
|
|
||||||
parser.parse("""
|
|
||||||
interface A : B {};
|
|
||||||
interface B {};
|
|
||||||
B implements A;
|
|
||||||
""")
|
|
||||||
results = parser.finish()
|
|
||||||
except:
|
|
||||||
threw = True
|
|
||||||
|
|
||||||
harness.ok(threw, "Should not allow inheriting from an interface that implements us")
|
|
||||||
|
|
||||||
parser = parser.reset()
|
|
||||||
threw = False
|
|
||||||
try:
|
|
||||||
parser.parse("""
|
|
||||||
interface A : B {};
|
|
||||||
interface B {};
|
|
||||||
interface C {};
|
|
||||||
B implements C;
|
|
||||||
C implements A;
|
|
||||||
""")
|
|
||||||
results = parser.finish()
|
|
||||||
except:
|
|
||||||
threw = True
|
|
||||||
|
|
||||||
harness.ok(threw, "Should not allow inheriting from an interface that indirectly implements us")
|
|
||||||
|
|
||||||
parser = parser.reset()
|
|
||||||
threw = False
|
|
||||||
try:
|
|
||||||
parser.parse("""
|
|
||||||
interface A : B {};
|
|
||||||
interface B : C {};
|
|
||||||
interface C {};
|
|
||||||
C implements A;
|
|
||||||
""")
|
|
||||||
results = parser.finish()
|
|
||||||
except:
|
|
||||||
threw = True
|
|
||||||
|
|
||||||
harness.ok(threw, "Should not allow indirectly inheriting from an interface that implements us")
|
|
||||||
|
|
||||||
parser = parser.reset()
|
|
||||||
threw = False
|
|
||||||
try:
|
|
||||||
parser.parse("""
|
|
||||||
interface A : B {};
|
|
||||||
interface B : C {};
|
|
||||||
interface C {};
|
|
||||||
interface D {};
|
|
||||||
C implements D;
|
|
||||||
D implements A;
|
|
||||||
""")
|
|
||||||
results = parser.finish()
|
|
||||||
except:
|
|
||||||
threw = True
|
|
||||||
|
|
||||||
harness.ok(threw, "Should not allow indirectly inheriting from an interface that indirectly implements us")
|
|
||||||
|
|
||||||
parser = parser.reset()
|
parser = parser.reset()
|
||||||
threw = False
|
threw = False
|
||||||
try:
|
try:
|
||||||
|
@ -377,7 +283,7 @@ def WebIDLTest(parser, harness):
|
||||||
|
|
||||||
parser = parser.reset()
|
parser = parser.reset()
|
||||||
parser.parse("""
|
parser.parse("""
|
||||||
[Global] interface Window {};
|
[Global, Exposed=Window] interface Window {};
|
||||||
[Exposed=Window, LegacyWindowAlias=A]
|
[Exposed=Window, LegacyWindowAlias=A]
|
||||||
interface B {};
|
interface B {};
|
||||||
[Exposed=Window, LegacyWindowAlias=(C, D)]
|
[Exposed=Window, LegacyWindowAlias=(C, D)]
|
||||||
|
@ -419,7 +325,8 @@ def WebIDLTest(parser, harness):
|
||||||
threw = False
|
threw = False
|
||||||
try:
|
try:
|
||||||
parser.parse("""
|
parser.parse("""
|
||||||
[Global] interface Window {};
|
[Global, Exposed=Window] interface Window {};
|
||||||
|
[Exposed=Window]
|
||||||
interface A {};
|
interface A {};
|
||||||
[Exposed=Window, LegacyWindowAlias=A]
|
[Exposed=Window, LegacyWindowAlias=A]
|
||||||
interface B {};
|
interface B {};
|
||||||
|
@ -434,9 +341,10 @@ def WebIDLTest(parser, harness):
|
||||||
threw = False
|
threw = False
|
||||||
try:
|
try:
|
||||||
parser.parse("""
|
parser.parse("""
|
||||||
[Global] interface Window {};
|
[Global, Exposed=Window] interface Window {};
|
||||||
[Exposed=Window, LegacyWindowAlias=A]
|
[Exposed=Window, LegacyWindowAlias=A]
|
||||||
interface B {};
|
interface B {};
|
||||||
|
[Exposed=Window]
|
||||||
interface A {};
|
interface A {};
|
||||||
""")
|
""")
|
||||||
results = parser.finish()
|
results = parser.finish()
|
||||||
|
@ -449,7 +357,7 @@ def WebIDLTest(parser, harness):
|
||||||
threw = False
|
threw = False
|
||||||
try:
|
try:
|
||||||
parser.parse("""
|
parser.parse("""
|
||||||
[Global] interface Window {};
|
[Global, Exposed=Window] interface Window {};
|
||||||
[Exposed=Window, LegacyWindowAlias=A]
|
[Exposed=Window, LegacyWindowAlias=A]
|
||||||
interface B {};
|
interface B {};
|
||||||
[Exposed=Window, LegacyWindowAlias=A]
|
[Exposed=Window, LegacyWindowAlias=A]
|
||||||
|
|
|
@ -252,16 +252,6 @@ def WebIDLTest(parser, harness):
|
||||||
};
|
};
|
||||||
""", mapRWMembers, numProductions=2)
|
""", mapRWMembers, numProductions=2)
|
||||||
|
|
||||||
shouldPass("Implements with maplike/setlike",
|
|
||||||
"""
|
|
||||||
interface Foo1 {
|
|
||||||
maplike<long, long>;
|
|
||||||
};
|
|
||||||
interface Foo2 {
|
|
||||||
};
|
|
||||||
Foo2 implements Foo1;
|
|
||||||
""", mapRWMembers, numProductions=3)
|
|
||||||
|
|
||||||
shouldPass("JS Implemented maplike interface",
|
shouldPass("JS Implemented maplike interface",
|
||||||
"""
|
"""
|
||||||
[JSImplementation="@mozilla.org/dom/test-interface-js-maplike;1"]
|
[JSImplementation="@mozilla.org/dom/test-interface-js-maplike;1"]
|
||||||
|
@ -350,31 +340,6 @@ def WebIDLTest(parser, harness):
|
||||||
};
|
};
|
||||||
""")
|
""")
|
||||||
|
|
||||||
shouldFail("Consequential interface with conflicting maplike/setlike",
|
|
||||||
"""
|
|
||||||
interface Foo1 {
|
|
||||||
maplike<long, long>;
|
|
||||||
};
|
|
||||||
interface Foo2 {
|
|
||||||
setlike<long>;
|
|
||||||
};
|
|
||||||
Foo2 implements Foo1;
|
|
||||||
""")
|
|
||||||
|
|
||||||
shouldFail("Consequential interfaces with conflicting maplike/setlike",
|
|
||||||
"""
|
|
||||||
interface Foo1 {
|
|
||||||
maplike<long, long>;
|
|
||||||
};
|
|
||||||
interface Foo2 {
|
|
||||||
setlike<long>;
|
|
||||||
};
|
|
||||||
interface Foo3 {
|
|
||||||
};
|
|
||||||
Foo3 implements Foo1;
|
|
||||||
Foo3 implements Foo2;
|
|
||||||
""")
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Member name collision tests
|
# Member name collision tests
|
||||||
#
|
#
|
||||||
|
@ -477,52 +442,28 @@ def WebIDLTest(parser, harness):
|
||||||
};
|
};
|
||||||
""", mapRWMembers, numProductions=3)
|
""", mapRWMembers, numProductions=3)
|
||||||
|
|
||||||
shouldFail("Interface with consequential maplike/setlike interface member collision",
|
shouldFail("Maplike interface with mixin member collision",
|
||||||
"""
|
"""
|
||||||
interface Foo1 {
|
interface Foo1 {
|
||||||
void entries();
|
|
||||||
};
|
|
||||||
interface Foo2 {
|
|
||||||
maplike<long, long>;
|
maplike<long, long>;
|
||||||
};
|
};
|
||||||
Foo1 implements Foo2;
|
interface mixin Foo2 {
|
||||||
|
void entries();
|
||||||
|
};
|
||||||
|
Foo1 includes Foo2;
|
||||||
""")
|
""")
|
||||||
|
|
||||||
shouldFail("Maplike interface with consequential interface member collision",
|
|
||||||
"""
|
|
||||||
interface Foo1 {
|
|
||||||
maplike<long, long>;
|
|
||||||
};
|
|
||||||
interface Foo2 {
|
|
||||||
void entries();
|
|
||||||
};
|
|
||||||
Foo1 implements Foo2;
|
|
||||||
""")
|
|
||||||
|
|
||||||
shouldPass("Consequential Maplike interface with inherited interface member collision",
|
|
||||||
"""
|
|
||||||
interface Foo1 {
|
|
||||||
maplike<long, long>;
|
|
||||||
};
|
|
||||||
interface Foo2 {
|
|
||||||
void entries();
|
|
||||||
};
|
|
||||||
interface Foo3 : Foo2 {
|
|
||||||
};
|
|
||||||
Foo3 implements Foo1;
|
|
||||||
""", mapRWMembers, numProductions=4)
|
|
||||||
|
|
||||||
shouldPass("Inherited Maplike interface with consequential interface member collision",
|
shouldPass("Inherited Maplike interface with consequential interface member collision",
|
||||||
"""
|
"""
|
||||||
interface Foo1 {
|
interface Foo1 {
|
||||||
maplike<long, long>;
|
maplike<long, long>;
|
||||||
};
|
};
|
||||||
interface Foo2 {
|
interface mixin Foo2 {
|
||||||
void entries();
|
void entries();
|
||||||
};
|
};
|
||||||
interface Foo3 : Foo1 {
|
interface Foo3 : Foo1 {
|
||||||
};
|
};
|
||||||
Foo3 implements Foo2;
|
Foo3 includes Foo2;
|
||||||
""", mapRWMembers, numProductions=4)
|
""", mapRWMembers, numProductions=4)
|
||||||
|
|
||||||
shouldFail("Inheritance of name collision with child maplike/setlike",
|
shouldFail("Inheritance of name collision with child maplike/setlike",
|
||||||
|
@ -645,7 +586,7 @@ def WebIDLTest(parser, harness):
|
||||||
};
|
};
|
||||||
""")
|
""")
|
||||||
|
|
||||||
shouldPass("Implemented interface with readonly allowable overrides",
|
shouldPass("Interface with readonly allowable overrides",
|
||||||
"""
|
"""
|
||||||
interface Foo1 {
|
interface Foo1 {
|
||||||
readonly setlike<long>;
|
readonly setlike<long>;
|
||||||
|
|
|
@ -337,10 +337,48 @@ def WebIDLTest(parser, harness):
|
||||||
harness.ok(threw,
|
harness.ok(threw,
|
||||||
"Should fail if an interface mixin includes maplike")
|
"Should fail if an interface mixin includes maplike")
|
||||||
|
|
||||||
|
parser = parser.reset()
|
||||||
|
threw = False
|
||||||
|
try:
|
||||||
|
parser.parse("""
|
||||||
|
interface Interface {
|
||||||
|
attribute short attr;
|
||||||
|
};
|
||||||
|
interface mixin Mixin {
|
||||||
|
attribute short attr;
|
||||||
|
};
|
||||||
|
Interface includes Mixin;
|
||||||
|
""")
|
||||||
|
results = parser.finish()
|
||||||
|
except:
|
||||||
|
threw = True
|
||||||
|
harness.ok(threw,
|
||||||
|
"Should fail if the included mixin interface has duplicated member")
|
||||||
|
|
||||||
|
parser = parser.reset()
|
||||||
|
threw = False
|
||||||
|
try:
|
||||||
|
parser.parse("""
|
||||||
|
interface Interface {};
|
||||||
|
interface mixin Mixin1 {
|
||||||
|
attribute short attr;
|
||||||
|
};
|
||||||
|
interface mixin Mixin2 {
|
||||||
|
attribute short attr;
|
||||||
|
};
|
||||||
|
Interface includes Mixin1;
|
||||||
|
Interface includes Mixin2;
|
||||||
|
""")
|
||||||
|
results = parser.finish()
|
||||||
|
except:
|
||||||
|
threw = True
|
||||||
|
harness.ok(threw,
|
||||||
|
"Should fail if the included mixin interfaces have duplicated member")
|
||||||
|
|
||||||
parser = parser.reset()
|
parser = parser.reset()
|
||||||
parser.parse("""
|
parser.parse("""
|
||||||
[Global] interface Window {};
|
[Global, Exposed=Window] interface Window {};
|
||||||
[Global] interface Worker {};
|
[Global, Exposed=Worker] interface Worker {};
|
||||||
[Exposed=Window]
|
[Exposed=Window]
|
||||||
interface Base {};
|
interface Base {};
|
||||||
interface mixin Mixin {
|
interface mixin Mixin {
|
||||||
|
@ -356,8 +394,8 @@ def WebIDLTest(parser, harness):
|
||||||
|
|
||||||
parser = parser.reset()
|
parser = parser.reset()
|
||||||
parser.parse("""
|
parser.parse("""
|
||||||
[Global] interface Window {};
|
[Global, Exposed=Window] interface Window {};
|
||||||
[Global] interface Worker {};
|
[Global, Exposed=Worker] interface Worker {};
|
||||||
[Exposed=Window]
|
[Exposed=Window]
|
||||||
interface Base {};
|
interface Base {};
|
||||||
[Exposed=Window]
|
[Exposed=Window]
|
||||||
|
@ -371,3 +409,29 @@ def WebIDLTest(parser, harness):
|
||||||
attr = base.members[0]
|
attr = base.members[0]
|
||||||
harness.check(attr.exposureSet, set(["Window"]),
|
harness.check(attr.exposureSet, set(["Window"]),
|
||||||
"Should follow [Exposed] on interface mixin")
|
"Should follow [Exposed] on interface mixin")
|
||||||
|
|
||||||
|
parser = parser.reset()
|
||||||
|
parser.parse("""
|
||||||
|
[Global, Exposed=Window] interface Window {};
|
||||||
|
[Global, Exposed=Worker] interface Worker {};
|
||||||
|
[Exposed=Window]
|
||||||
|
interface Base1 {};
|
||||||
|
[Exposed=Worker]
|
||||||
|
interface Base2 {};
|
||||||
|
interface mixin Mixin {
|
||||||
|
attribute short a;
|
||||||
|
};
|
||||||
|
Base1 includes Mixin;
|
||||||
|
Base2 includes Mixin;
|
||||||
|
""")
|
||||||
|
results = parser.finish()
|
||||||
|
base = results[2]
|
||||||
|
attr = base.members[0]
|
||||||
|
harness.check(attr.exposureSet, set(["Window", "Worker"]),
|
||||||
|
"Should expose on all globals where including interfaces are "
|
||||||
|
"exposed")
|
||||||
|
base = results[3]
|
||||||
|
attr = base.members[0]
|
||||||
|
harness.check(attr.exposureSet, set(["Window", "Worker"]),
|
||||||
|
"Should expose on all globals where including interfaces are "
|
||||||
|
"exposed")
|
||||||
|
|
|
@ -288,33 +288,32 @@ def WebIDLTest(parser, harness):
|
||||||
threw = True
|
threw = True
|
||||||
harness.ok(threw, "[SecureContext] must appear on interfaces that inherit from another [SecureContext] interface")
|
harness.ok(threw, "[SecureContext] must appear on interfaces that inherit from another [SecureContext] interface")
|
||||||
|
|
||||||
# Test 'implements'. The behavior tested here may have to change depending
|
# Test 'includes'.
|
||||||
# on the resolution of https://github.com/heycam/webidl/issues/118
|
|
||||||
parser = parser.reset()
|
parser = parser.reset()
|
||||||
parser.parse("""
|
parser.parse("""
|
||||||
[SecureContext]
|
[SecureContext]
|
||||||
interface TestSecureContextInterfaceThatImplementsNonSecureContextInterface {
|
interface TestSecureContextInterfaceThatIncludesNonSecureContextMixin {
|
||||||
const octet TEST_CONSTANT = 0;
|
const octet TEST_CONSTANT = 0;
|
||||||
};
|
};
|
||||||
interface TestNonSecureContextInterface {
|
interface mixin TestNonSecureContextMixin {
|
||||||
const octet TEST_CONSTANT_2 = 0;
|
const octet TEST_CONSTANT_2 = 0;
|
||||||
readonly attribute byte testAttribute2;
|
readonly attribute byte testAttribute2;
|
||||||
void testMethod2(byte foo);
|
void testMethod2(byte foo);
|
||||||
};
|
};
|
||||||
TestSecureContextInterfaceThatImplementsNonSecureContextInterface implements TestNonSecureContextInterface;
|
TestSecureContextInterfaceThatIncludesNonSecureContextMixin includes TestNonSecureContextMixin;
|
||||||
""")
|
""")
|
||||||
results = parser.finish()
|
results = parser.finish()
|
||||||
harness.check(len(results[0].members), 4, "TestSecureContextInterfaceThatImplementsNonSecureContextInterface should have two members")
|
harness.check(len(results[0].members), 4, "TestSecureContextInterfaceThatImplementsNonSecureContextInterface should have four members")
|
||||||
harness.ok(results[0].getExtendedAttribute("SecureContext"),
|
harness.ok(results[0].getExtendedAttribute("SecureContext"),
|
||||||
"Interface should have [SecureContext] extended attribute")
|
"Interface should have [SecureContext] extended attribute")
|
||||||
harness.ok(results[0].members[0].getExtendedAttribute("SecureContext"),
|
harness.ok(results[0].members[0].getExtendedAttribute("SecureContext"),
|
||||||
"[SecureContext] should propagate from interface to constant members even when other members are copied from a non-[SecureContext] interface")
|
"[SecureContext] should propagate from interface to constant members even when other members are copied from a non-[SecureContext] interface")
|
||||||
harness.ok(results[0].members[1].getExtendedAttribute("SecureContext") is None,
|
harness.ok(results[0].members[1].getExtendedAttribute("SecureContext") is None,
|
||||||
"Constants copied from non-[SecureContext] interface should not be [SecureContext]")
|
"Constants copied from non-[SecureContext] mixin should not be [SecureContext]")
|
||||||
harness.ok(results[0].members[2].getExtendedAttribute("SecureContext") is None,
|
harness.ok(results[0].members[2].getExtendedAttribute("SecureContext") is None,
|
||||||
"Attributes copied from non-[SecureContext] interface should not be [SecureContext]")
|
"Attributes copied from non-[SecureContext] mixin should not be [SecureContext]")
|
||||||
harness.ok(results[0].members[3].getExtendedAttribute("SecureContext") is None,
|
harness.ok(results[0].members[3].getExtendedAttribute("SecureContext") is None,
|
||||||
"Methods copied from non-[SecureContext] interface should not be [SecureContext]")
|
"Methods copied from non-[SecureContext] mixin should not be [SecureContext]")
|
||||||
|
|
||||||
# Test SecureContext and NoInterfaceObject
|
# Test SecureContext and NoInterfaceObject
|
||||||
parser = parser.reset()
|
parser = parser.reset()
|
||||||
|
|
|
@ -141,16 +141,16 @@ def WebIDLTest(parser, harness):
|
||||||
interface Child : Parent {
|
interface Child : Parent {
|
||||||
};
|
};
|
||||||
interface Parent {};
|
interface Parent {};
|
||||||
interface Consequential {
|
interface mixin Mixin {
|
||||||
[Unforgeable] readonly attribute long foo;
|
[Unforgeable] readonly attribute long foo;
|
||||||
};
|
};
|
||||||
Parent implements Consequential;
|
Parent includes Mixin;
|
||||||
""")
|
""")
|
||||||
|
|
||||||
results = parser.finish()
|
results = parser.finish()
|
||||||
harness.check(len(results), 4,
|
harness.check(len(results), 4,
|
||||||
"Should be able to inherit from an interface with a "
|
"Should be able to inherit from an interface with a "
|
||||||
"consequential interface with [Unforgeable] properties.")
|
"mixin with [Unforgeable] properties.")
|
||||||
|
|
||||||
parser = parser.reset();
|
parser = parser.reset();
|
||||||
threw = False
|
threw = False
|
||||||
|
@ -160,10 +160,10 @@ def WebIDLTest(parser, harness):
|
||||||
void foo();
|
void foo();
|
||||||
};
|
};
|
||||||
interface Parent {};
|
interface Parent {};
|
||||||
interface Consequential {
|
interface mixin Mixin {
|
||||||
[Unforgeable] readonly attribute long foo;
|
[Unforgeable] readonly attribute long foo;
|
||||||
};
|
};
|
||||||
Parent implements Consequential;
|
Parent includes Mixin;
|
||||||
""")
|
""")
|
||||||
|
|
||||||
results = parser.finish()
|
results = parser.finish()
|
||||||
|
@ -182,14 +182,14 @@ def WebIDLTest(parser, harness):
|
||||||
};
|
};
|
||||||
interface Parent : GrandParent {};
|
interface Parent : GrandParent {};
|
||||||
interface GrandParent {};
|
interface GrandParent {};
|
||||||
interface Consequential {
|
interface mixin Mixin {
|
||||||
[Unforgeable] readonly attribute long foo;
|
[Unforgeable] readonly attribute long foo;
|
||||||
};
|
};
|
||||||
GrandParent implements Consequential;
|
GrandParent includes Mixin;
|
||||||
interface ChildConsequential {
|
interface mixin ChildMixin {
|
||||||
void foo();
|
void foo();
|
||||||
};
|
};
|
||||||
Child implements ChildConsequential;
|
Child includes ChildMixin;
|
||||||
""")
|
""")
|
||||||
|
|
||||||
results = parser.finish()
|
results = parser.finish()
|
||||||
|
@ -208,14 +208,14 @@ def WebIDLTest(parser, harness):
|
||||||
};
|
};
|
||||||
interface Parent : GrandParent {};
|
interface Parent : GrandParent {};
|
||||||
interface GrandParent {};
|
interface GrandParent {};
|
||||||
interface Consequential {
|
interface mixin Mixin {
|
||||||
[Unforgeable] void foo();
|
[Unforgeable] void foo();
|
||||||
};
|
};
|
||||||
GrandParent implements Consequential;
|
GrandParent includes Mixin;
|
||||||
interface ChildConsequential {
|
interface mixin ChildMixin {
|
||||||
void foo();
|
void foo();
|
||||||
};
|
};
|
||||||
Child implements ChildConsequential;
|
Child includes ChildMixin;
|
||||||
""")
|
""")
|
||||||
|
|
||||||
results = parser.finish()
|
results = parser.finish()
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
wget https://hg.mozilla.org/mozilla-central/raw-file/e447e3d69684cf04a95a35b9708174a6538eb042/dom/bindings/parser/WebIDL.py -O WebIDL.py
|
wget https://hg.mozilla.org/mozilla-central/raw-file/tip/dom/bindings/parser/WebIDL.py -O WebIDL.py
|
||||||
patch < abstract.patch
|
patch < abstract.patch
|
||||||
patch < debug.patch
|
patch < debug.patch
|
||||||
patch < callback-location.patch
|
patch < callback-location.patch
|
||||||
patch < union-typedef.patch
|
patch < union-typedef.patch
|
||||||
patch < inline.patch
|
patch < inline.patch
|
||||||
|
|
||||||
wget https://hg.mozilla.org/mozilla-central/archive/e447e3d69684cf04a95a35b9708174a6538eb042.tar.gz/dom/bindings/parser/tests/ -O tests.tar.gz
|
wget https://hg.mozilla.org/mozilla-central/archive/tip.tar.gz/dom/bindings/parser/tests/ -O tests.tar.gz
|
||||||
rm -r tests
|
rm -r tests
|
||||||
mkdir tests
|
mkdir tests
|
||||||
tar xvpf tests.tar.gz -C tests --strip-components=5
|
tar xvpf tests.tar.gz -C tests --strip-components=5
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* https://www.khronos.org/registry/webgl/extensions/ANGLE_instanced_arrays/
|
* https://www.khronos.org/registry/webgl/extensions/ANGLE_instanced_arrays/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
[NoInterfaceObject]
|
[NoInterfaceObject, Exposed=Window]
|
||||||
interface ANGLEInstancedArrays {
|
interface ANGLEInstancedArrays {
|
||||||
const GLenum VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE = 0x88FE;
|
const GLenum VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE = 0x88FE;
|
||||||
void drawArraysInstancedANGLE(GLenum mode, GLint first, GLsizei count, GLsizei primcount);
|
void drawArraysInstancedANGLE(GLenum mode, GLint first, GLsizei count, GLsizei primcount);
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
[Exposed=Window]
|
||||||
interface Attr {
|
interface Attr {
|
||||||
[Constant]
|
[Constant]
|
||||||
readonly attribute DOMString? namespaceURI;
|
readonly attribute DOMString? namespaceURI;
|
||||||
|
|
|
@ -25,7 +25,7 @@ dictionary RequestDeviceOptions {
|
||||||
boolean acceptAllDevices = false;
|
boolean acceptAllDevices = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
[Pref="dom.bluetooth.enabled"]
|
[Exposed=Window, Pref="dom.bluetooth.enabled"]
|
||||||
interface Bluetooth : EventTarget {
|
interface Bluetooth : EventTarget {
|
||||||
[SecureContext]
|
[SecureContext]
|
||||||
Promise<boolean> getAvailability();
|
Promise<boolean> getAvailability();
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
interface BluetoothServiceDataMap {
|
interface BluetoothServiceDataMap {
|
||||||
readonly maplike<UUID, DataView>;
|
readonly maplike<UUID, DataView>;
|
||||||
};*/
|
};*/
|
||||||
[Pref="dom.bluetooth.enabled"]
|
[Exposed=Window, Pref="dom.bluetooth.enabled"]
|
||||||
interface BluetoothAdvertisingEvent : Event {
|
interface BluetoothAdvertisingEvent : Event {
|
||||||
[Throws] constructor(DOMString type, BluetoothAdvertisingEventInit init);
|
[Throws] constructor(DOMString type, BluetoothAdvertisingEventInit init);
|
||||||
[SameObject]
|
[SameObject]
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
// https://webbluetoothcg.github.io/web-bluetooth/#characteristicproperties
|
// https://webbluetoothcg.github.io/web-bluetooth/#characteristicproperties
|
||||||
|
|
||||||
[Pref="dom.bluetooth.enabled"]
|
[Exposed=Window, Pref="dom.bluetooth.enabled"]
|
||||||
interface BluetoothCharacteristicProperties {
|
interface BluetoothCharacteristicProperties {
|
||||||
readonly attribute boolean broadcast;
|
readonly attribute boolean broadcast;
|
||||||
readonly attribute boolean read;
|
readonly attribute boolean read;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
// https://webbluetoothcg.github.io/web-bluetooth/#bluetoothdevice
|
// https://webbluetoothcg.github.io/web-bluetooth/#bluetoothdevice
|
||||||
|
|
||||||
[Pref="dom.bluetooth.enabled"]
|
[Exposed=Window, Pref="dom.bluetooth.enabled"]
|
||||||
interface BluetoothDevice : EventTarget {
|
interface BluetoothDevice : EventTarget {
|
||||||
readonly attribute DOMString id;
|
readonly attribute DOMString id;
|
||||||
readonly attribute DOMString? name;
|
readonly attribute DOMString? name;
|
||||||
|
|
|
@ -12,7 +12,7 @@ dictionary BluetoothPermissionDescriptor : PermissionDescriptor {
|
||||||
boolean acceptAllDevices = false;
|
boolean acceptAllDevices = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
[Pref="dom.bluetooth.enabled"]
|
[Exposed=Window, Pref="dom.bluetooth.enabled"]
|
||||||
interface BluetoothPermissionResult : PermissionStatus {
|
interface BluetoothPermissionResult : PermissionStatus {
|
||||||
// attribute FrozenArray<BluetoothDevice> devices;
|
// attribute FrozenArray<BluetoothDevice> devices;
|
||||||
// Workaround until FrozenArray get implemented.
|
// Workaround until FrozenArray get implemented.
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
// https://webbluetoothcg.github.io/web-bluetooth/#bluetoothremotegattcharacteristic
|
// https://webbluetoothcg.github.io/web-bluetooth/#bluetoothremotegattcharacteristic
|
||||||
|
|
||||||
[Pref="dom.bluetooth.enabled"]
|
[Exposed=Window, Pref="dom.bluetooth.enabled"]
|
||||||
interface BluetoothRemoteGATTCharacteristic : EventTarget {
|
interface BluetoothRemoteGATTCharacteristic : EventTarget {
|
||||||
[SameObject]
|
[SameObject]
|
||||||
readonly attribute BluetoothRemoteGATTService service;
|
readonly attribute BluetoothRemoteGATTService service;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
// http://webbluetoothcg.github.io/web-bluetooth/#bluetoothremotegattdescriptor
|
// http://webbluetoothcg.github.io/web-bluetooth/#bluetoothremotegattdescriptor
|
||||||
|
|
||||||
[Pref="dom.bluetooth.enabled"]
|
[Exposed=Window, Pref="dom.bluetooth.enabled"]
|
||||||
interface BluetoothRemoteGATTDescriptor {
|
interface BluetoothRemoteGATTDescriptor {
|
||||||
[SameObject]
|
[SameObject]
|
||||||
readonly attribute BluetoothRemoteGATTCharacteristic characteristic;
|
readonly attribute BluetoothRemoteGATTCharacteristic characteristic;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
//https://webbluetoothcg.github.io/web-bluetooth/#bluetoothremotegattserver
|
//https://webbluetoothcg.github.io/web-bluetooth/#bluetoothremotegattserver
|
||||||
|
|
||||||
[Pref="dom.bluetooth.enabled"]
|
[Exposed=Window, Pref="dom.bluetooth.enabled"]
|
||||||
interface BluetoothRemoteGATTServer {
|
interface BluetoothRemoteGATTServer {
|
||||||
[SameObject]
|
[SameObject]
|
||||||
readonly attribute BluetoothDevice device;
|
readonly attribute BluetoothDevice device;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
// https://webbluetoothcg.github.io/web-bluetooth/#bluetoothremotegattservice
|
// https://webbluetoothcg.github.io/web-bluetooth/#bluetoothremotegattservice
|
||||||
|
|
||||||
[Pref="dom.bluetooth.enabled"]
|
[Exposed=Window, Pref="dom.bluetooth.enabled"]
|
||||||
interface BluetoothRemoteGATTService : EventTarget {
|
interface BluetoothRemoteGATTService : EventTarget {
|
||||||
[SameObject]
|
[SameObject]
|
||||||
readonly attribute BluetoothDevice device;
|
readonly attribute BluetoothDevice device;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
// https://webbluetoothcg.github.io/web-bluetooth/#bluetoothuuid
|
// https://webbluetoothcg.github.io/web-bluetooth/#bluetoothuuid
|
||||||
|
|
||||||
[Pref="dom.bluetooth.enabled"]
|
[Exposed=Window, Pref="dom.bluetooth.enabled"]
|
||||||
interface BluetoothUUID {
|
interface BluetoothUUID {
|
||||||
[Throws]
|
[Throws]
|
||||||
static UUID getService(BluetoothServiceUUID name);
|
static UUID getService(BluetoothServiceUUID name);
|
||||||
|
|
|
@ -6,5 +6,6 @@
|
||||||
* https://dom.spec.whatwg.org/#interface-cdatasection
|
* https://dom.spec.whatwg.org/#interface-cdatasection
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
[Exposed=Window]
|
||||||
interface CDATASection : Text {
|
interface CDATASection : Text {
|
||||||
};
|
};
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
* liability, trademark and document use rules apply.
|
* liability, trademark and document use rules apply.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
[Abstract]
|
[Exposed=Window, Abstract]
|
||||||
interface CharacterData : Node {
|
interface CharacterData : Node {
|
||||||
[Pure] attribute [TreatNullAs=EmptyString] DOMString data;
|
[Pure] attribute [TreatNullAs=EmptyString] DOMString data;
|
||||||
[Pure] readonly attribute unsigned long length;
|
[Pure] readonly attribute unsigned long length;
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
* liability, trademark and document use rules apply.
|
* liability, trademark and document use rules apply.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
[Exposed=Window]
|
||||||
interface Comment : CharacterData {
|
interface Comment : CharacterData {
|
||||||
[Throws] constructor(optional DOMString data = "");
|
[Throws] constructor(optional DOMString data = "");
|
||||||
};
|
};
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// https://w3c.github.io/uievents/#idl-compositionevent
|
// https://w3c.github.io/uievents/#idl-compositionevent
|
||||||
[Pref="dom.compositionevent.enabled"]
|
[Exposed=Window, Pref="dom.compositionevent.enabled"]
|
||||||
interface CompositionEvent : UIEvent {
|
interface CompositionEvent : UIEvent {
|
||||||
[Throws] constructor(DOMString type, optional CompositionEventInit eventInitDict = {});
|
[Throws] constructor(DOMString type, optional CompositionEventInit eventInitDict = {});
|
||||||
readonly attribute DOMString data;
|
readonly attribute DOMString data;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#customelementregistry
|
// https://html.spec.whatwg.org/multipage/#customelementregistry
|
||||||
[Pref="dom.customelements.enabled"]
|
[Exposed=Window, Pref="dom.customelements.enabled"]
|
||||||
interface CustomElementRegistry {
|
interface CustomElementRegistry {
|
||||||
[Throws, CEReactions]
|
[Throws, CEReactions]
|
||||||
void define(DOMString name, CustomElementConstructor constructor_, optional ElementDefinitionOptions options = {});
|
void define(DOMString name, CustomElementConstructor constructor_, optional ElementDefinitionOptions options = {});
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
* related or neighboring rights to this work.
|
* related or neighboring rights to this work.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
[Exposed=Window]
|
||||||
interface DOMImplementation {
|
interface DOMImplementation {
|
||||||
[NewObject, Throws]
|
[NewObject, Throws]
|
||||||
DocumentType createDocumentType(DOMString qualifiedName, DOMString publicId,
|
DocumentType createDocumentType(DOMString qualifiedName, DOMString publicId,
|
||||||
|
|
|
@ -14,6 +14,7 @@ enum SupportedType {
|
||||||
"image/svg+xml"*/
|
"image/svg+xml"*/
|
||||||
};
|
};
|
||||||
|
|
||||||
|
[Exposed=Window]
|
||||||
interface DOMParser {
|
interface DOMParser {
|
||||||
[Throws] constructor();
|
[Throws] constructor();
|
||||||
[Throws]
|
[Throws]
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#the-domstringmap-interface
|
// https://html.spec.whatwg.org/multipage/#the-domstringmap-interface
|
||||||
[OverrideBuiltins]
|
[Exposed=Window, OverrideBuiltins]
|
||||||
interface DOMStringMap {
|
interface DOMStringMap {
|
||||||
getter DOMString (DOMString name);
|
getter DOMString (DOMString name);
|
||||||
[CEReactions, Throws]
|
[CEReactions, Throws]
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://dom.spec.whatwg.org/#domtokenlist
|
// https://dom.spec.whatwg.org/#domtokenlist
|
||||||
|
[Exposed=Window]
|
||||||
interface DOMTokenList {
|
interface DOMTokenList {
|
||||||
[Pure]
|
[Pure]
|
||||||
readonly attribute unsigned long length;
|
readonly attribute unsigned long length;
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// https://dom.spec.whatwg.org/#interface-document
|
// https://dom.spec.whatwg.org/#interface-document
|
||||||
|
[Exposed=Window]
|
||||||
interface Document : Node {
|
interface Document : Node {
|
||||||
[Throws] constructor();
|
[Throws] constructor();
|
||||||
[SameObject]
|
[SameObject]
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://dom.spec.whatwg.org/#interface-documentfragment
|
// https://dom.spec.whatwg.org/#interface-documentfragment
|
||||||
|
[Exposed=Window]
|
||||||
interface DocumentFragment : Node {
|
interface DocumentFragment : Node {
|
||||||
[Throws] constructor();
|
[Throws] constructor();
|
||||||
};
|
};
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
* liability, trademark and document use rules apply.
|
* liability, trademark and document use rules apply.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
[Exposed=Window]
|
||||||
interface DocumentType : Node {
|
interface DocumentType : Node {
|
||||||
[Constant]
|
[Constant]
|
||||||
readonly attribute DOMString name;
|
readonly attribute DOMString name;
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* https://www.khronos.org/registry/webgl/extensions/EXT_blend_minmax/
|
* https://www.khronos.org/registry/webgl/extensions/EXT_blend_minmax/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
[NoInterfaceObject]
|
[NoInterfaceObject, Exposed=Window]
|
||||||
interface EXTBlendMinmax {
|
interface EXTBlendMinmax {
|
||||||
const GLenum MIN_EXT = 0x8007;
|
const GLenum MIN_EXT = 0x8007;
|
||||||
const GLenum MAX_EXT = 0x8008;
|
const GLenum MAX_EXT = 0x8008;
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* https://www.khronos.org/registry/webgl/extensions/EXT_color_buffer_half_float/
|
* https://www.khronos.org/registry/webgl/extensions/EXT_color_buffer_half_float/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
[NoInterfaceObject]
|
[NoInterfaceObject, Exposed=Window]
|
||||||
interface EXTColorBufferHalfFloat {
|
interface EXTColorBufferHalfFloat {
|
||||||
const GLenum RGBA16F_EXT = 0x881A;
|
const GLenum RGBA16F_EXT = 0x881A;
|
||||||
const GLenum RGB16F_EXT = 0x881B;
|
const GLenum RGB16F_EXT = 0x881B;
|
||||||
|
|
|
@ -6,6 +6,6 @@
|
||||||
* https://www.khronos.org/registry/webgl/extensions/EXT_shader_texture_lod/
|
* https://www.khronos.org/registry/webgl/extensions/EXT_shader_texture_lod/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
[NoInterfaceObject]
|
[NoInterfaceObject, Exposed=Window]
|
||||||
interface EXTShaderTextureLod {
|
interface EXTShaderTextureLod {
|
||||||
};
|
};
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* https://www.khronos.org/registry/webgl/extensions/EXT_texture_filter_anisotropic/
|
* https://www.khronos.org/registry/webgl/extensions/EXT_texture_filter_anisotropic/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
[NoInterfaceObject]
|
[NoInterfaceObject, Exposed=Window]
|
||||||
interface EXTTextureFilterAnisotropic {
|
interface EXTTextureFilterAnisotropic {
|
||||||
const GLenum TEXTURE_MAX_ANISOTROPY_EXT = 0x84FE;
|
const GLenum TEXTURE_MAX_ANISOTROPY_EXT = 0x84FE;
|
||||||
const GLenum MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FF;
|
const GLenum MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FF;
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
* liability, trademark and document use rules apply.
|
* liability, trademark and document use rules apply.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
[Exposed=Window]
|
||||||
interface Element : Node {
|
interface Element : Node {
|
||||||
[Constant]
|
[Constant]
|
||||||
readonly attribute DOMString? namespaceURI;
|
readonly attribute DOMString? namespaceURI;
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
* https://dom.spec.whatwg.org/#callbackdef-eventlistener
|
* https://dom.spec.whatwg.org/#callbackdef-eventlistener
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
[Exposed=Window]
|
||||||
callback interface EventListener {
|
callback interface EventListener {
|
||||||
void handleEvent(Event event);
|
void handleEvent(Event event);
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://w3c.github.io/gamepad/#gamepad-interface
|
// https://w3c.github.io/gamepad/#gamepad-interface
|
||||||
[Pref="dom.gamepad.enabled"]
|
[Exposed=Window, Pref="dom.gamepad.enabled"]
|
||||||
interface Gamepad {
|
interface Gamepad {
|
||||||
readonly attribute DOMString id;
|
readonly attribute DOMString id;
|
||||||
readonly attribute long index;
|
readonly attribute long index;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://w3c.github.io/gamepad/#gamepadbutton-interface
|
// https://w3c.github.io/gamepad/#gamepadbutton-interface
|
||||||
[Pref="dom.gamepad.enabled"]
|
[Exposed=Window, Pref="dom.gamepad.enabled"]
|
||||||
interface GamepadButton {
|
interface GamepadButton {
|
||||||
readonly attribute boolean pressed;
|
readonly attribute boolean pressed;
|
||||||
readonly attribute boolean touched;
|
readonly attribute boolean touched;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://w3c.github.io/gamepad/#dom-gamepad-buttons
|
// https://w3c.github.io/gamepad/#dom-gamepad-buttons
|
||||||
[Pref="dom.gamepad.enabled"]
|
[Exposed=Window, Pref="dom.gamepad.enabled"]
|
||||||
interface GamepadButtonList {
|
interface GamepadButtonList {
|
||||||
getter GamepadButton? item(unsigned long index);
|
getter GamepadButton? item(unsigned long index);
|
||||||
readonly attribute unsigned long length;
|
readonly attribute unsigned long length;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://w3c.github.io/gamepad/#gamepadevent-interface
|
// https://w3c.github.io/gamepad/#gamepadevent-interface
|
||||||
[Pref="dom.gamepad.enabled"]
|
[Exposed=Window, Pref="dom.gamepad.enabled"]
|
||||||
interface GamepadEvent : Event {
|
interface GamepadEvent : Event {
|
||||||
[Throws] constructor(DOMString type, GamepadEventInit eventInitDict);
|
[Throws] constructor(DOMString type, GamepadEventInit eventInitDict);
|
||||||
readonly attribute Gamepad gamepad;
|
readonly attribute Gamepad gamepad;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://w3c.github.io/gamepad/#navigator-interface-extension
|
// https://w3c.github.io/gamepad/#navigator-interface-extension
|
||||||
[Pref="dom.gamepad.enabled"]
|
[Exposed=Window, Pref="dom.gamepad.enabled"]
|
||||||
interface GamepadList {
|
interface GamepadList {
|
||||||
getter Gamepad? item(unsigned long index);
|
getter Gamepad? item(unsigned long index);
|
||||||
readonly attribute unsigned long length;
|
readonly attribute unsigned long length;
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlanchorelement
|
// https://html.spec.whatwg.org/multipage/#htmlanchorelement
|
||||||
[HTMLConstructor]
|
[Exposed=Window, HTMLConstructor]
|
||||||
interface HTMLAnchorElement : HTMLElement {
|
interface HTMLAnchorElement : HTMLElement {
|
||||||
[CEReactions]
|
[CEReactions]
|
||||||
attribute DOMString target;
|
attribute DOMString target;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlareaelement
|
// https://html.spec.whatwg.org/multipage/#htmlareaelement
|
||||||
[HTMLConstructor]
|
[Exposed=Window, HTMLConstructor]
|
||||||
interface HTMLAreaElement : HTMLElement {
|
interface HTMLAreaElement : HTMLElement {
|
||||||
// [CEReactions]
|
// [CEReactions]
|
||||||
// attribute DOMString alt;
|
// attribute DOMString alt;
|
||||||
|
|
|
@ -3,5 +3,5 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlaudioelement
|
// https://html.spec.whatwg.org/multipage/#htmlaudioelement
|
||||||
[HTMLConstructor, NamedConstructor=Audio(optional DOMString src)]
|
[Exposed=Window, HTMLConstructor, NamedConstructor=Audio(optional DOMString src)]
|
||||||
interface HTMLAudioElement : HTMLMediaElement {};
|
interface HTMLAudioElement : HTMLMediaElement {};
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlbrelement
|
// https://html.spec.whatwg.org/multipage/#htmlbrelement
|
||||||
[HTMLConstructor]
|
[Exposed=Window, HTMLConstructor]
|
||||||
interface HTMLBRElement : HTMLElement {
|
interface HTMLBRElement : HTMLElement {
|
||||||
// also has obsolete members
|
// also has obsolete members
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlbaseelement
|
// https://html.spec.whatwg.org/multipage/#htmlbaseelement
|
||||||
[HTMLConstructor]
|
[Exposed=Window, HTMLConstructor]
|
||||||
interface HTMLBaseElement : HTMLElement {
|
interface HTMLBaseElement : HTMLElement {
|
||||||
[CEReactions]
|
[CEReactions]
|
||||||
attribute DOMString href;
|
attribute DOMString href;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#the-body-element
|
// https://html.spec.whatwg.org/multipage/#the-body-element
|
||||||
[HTMLConstructor]
|
[Exposed=Window, HTMLConstructor]
|
||||||
interface HTMLBodyElement : HTMLElement {
|
interface HTMLBodyElement : HTMLElement {
|
||||||
// also has obsolete members
|
// also has obsolete members
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlbuttonelement
|
// https://html.spec.whatwg.org/multipage/#htmlbuttonelement
|
||||||
[HTMLConstructor]
|
[Exposed=Window, HTMLConstructor]
|
||||||
interface HTMLButtonElement : HTMLElement {
|
interface HTMLButtonElement : HTMLElement {
|
||||||
// [CEReactions]
|
// [CEReactions]
|
||||||
// attribute boolean autofocus;
|
// attribute boolean autofocus;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
// https://dom.spec.whatwg.org/#interface-htmlcollection
|
// https://dom.spec.whatwg.org/#interface-htmlcollection
|
||||||
|
|
||||||
[LegacyUnenumerableNamedProperties]
|
[Exposed=Window, LegacyUnenumerableNamedProperties]
|
||||||
interface HTMLCollection {
|
interface HTMLCollection {
|
||||||
[Pure]
|
[Pure]
|
||||||
readonly attribute unsigned long length;
|
readonly attribute unsigned long length;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmldlistelement
|
// https://html.spec.whatwg.org/multipage/#htmldlistelement
|
||||||
[HTMLConstructor]
|
[Exposed=Window, HTMLConstructor]
|
||||||
interface HTMLDListElement : HTMLElement {
|
interface HTMLDListElement : HTMLElement {
|
||||||
// also has obsolete members
|
// also has obsolete members
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmldataelement
|
// https://html.spec.whatwg.org/multipage/#htmldataelement
|
||||||
[HTMLConstructor]
|
[Exposed=Window, HTMLConstructor]
|
||||||
interface HTMLDataElement : HTMLElement {
|
interface HTMLDataElement : HTMLElement {
|
||||||
[CEReactions]
|
[CEReactions]
|
||||||
attribute DOMString value;
|
attribute DOMString value;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmldatalistelement
|
// https://html.spec.whatwg.org/multipage/#htmldatalistelement
|
||||||
[HTMLConstructor]
|
[Exposed=Window, HTMLConstructor]
|
||||||
interface HTMLDataListElement : HTMLElement {
|
interface HTMLDataListElement : HTMLElement {
|
||||||
readonly attribute HTMLCollection options;
|
readonly attribute HTMLCollection options;
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmldetailselement
|
// https://html.spec.whatwg.org/multipage/#htmldetailselement
|
||||||
[HTMLConstructor]
|
[Exposed=Window, HTMLConstructor]
|
||||||
interface HTMLDetailsElement : HTMLElement {
|
interface HTMLDetailsElement : HTMLElement {
|
||||||
[CEReactions]
|
[CEReactions]
|
||||||
attribute boolean open;
|
attribute boolean open;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmldialogelement
|
// https://html.spec.whatwg.org/multipage/#htmldialogelement
|
||||||
[HTMLConstructor]
|
[Exposed=Window, HTMLConstructor]
|
||||||
interface HTMLDialogElement : HTMLElement {
|
interface HTMLDialogElement : HTMLElement {
|
||||||
[CEReactions]
|
[CEReactions]
|
||||||
attribute boolean open;
|
attribute boolean open;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmldirectoryelement
|
// https://html.spec.whatwg.org/multipage/#htmldirectoryelement
|
||||||
[HTMLConstructor]
|
[Exposed=Window, HTMLConstructor]
|
||||||
interface HTMLDirectoryElement : HTMLElement {
|
interface HTMLDirectoryElement : HTMLElement {
|
||||||
// [CEReactions]
|
// [CEReactions]
|
||||||
// attribute boolean compact;
|
// attribute boolean compact;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmldivelement
|
// https://html.spec.whatwg.org/multipage/#htmldivelement
|
||||||
[HTMLConstructor]
|
[Exposed=Window, HTMLConstructor]
|
||||||
interface HTMLDivElement : HTMLElement {
|
interface HTMLDivElement : HTMLElement {
|
||||||
// also has obsolete members
|
// also has obsolete members
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlelement
|
// https://html.spec.whatwg.org/multipage/#htmlelement
|
||||||
[HTMLConstructor]
|
[Exposed=Window, HTMLConstructor]
|
||||||
interface HTMLElement : Element {
|
interface HTMLElement : Element {
|
||||||
// metadata attributes
|
// metadata attributes
|
||||||
[CEReactions]
|
[CEReactions]
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlembedelement
|
// https://html.spec.whatwg.org/multipage/#htmlembedelement
|
||||||
[HTMLConstructor]
|
[Exposed=Window, HTMLConstructor]
|
||||||
interface HTMLEmbedElement : HTMLElement {
|
interface HTMLEmbedElement : HTMLElement {
|
||||||
// [CEReactions]
|
// [CEReactions]
|
||||||
// attribute DOMString src;
|
// attribute DOMString src;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlfieldsetelement
|
// https://html.spec.whatwg.org/multipage/#htmlfieldsetelement
|
||||||
[HTMLConstructor]
|
[Exposed=Window, HTMLConstructor]
|
||||||
interface HTMLFieldSetElement : HTMLElement {
|
interface HTMLFieldSetElement : HTMLElement {
|
||||||
[CEReactions]
|
[CEReactions]
|
||||||
attribute boolean disabled;
|
attribute boolean disabled;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlfontelement
|
// https://html.spec.whatwg.org/multipage/#htmlfontelement
|
||||||
[HTMLConstructor]
|
[Exposed=Window, HTMLConstructor]
|
||||||
interface HTMLFontElement : HTMLElement {
|
interface HTMLFontElement : HTMLElement {
|
||||||
[CEReactions]
|
[CEReactions]
|
||||||
attribute [TreatNullAs=EmptyString] DOMString color;
|
attribute [TreatNullAs=EmptyString] DOMString color;
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlformcontrolscollection
|
// https://html.spec.whatwg.org/multipage/#htmlformcontrolscollection
|
||||||
|
[Exposed=Window]
|
||||||
interface HTMLFormControlsCollection : HTMLCollection {
|
interface HTMLFormControlsCollection : HTMLCollection {
|
||||||
// inherits length and item()
|
// inherits length and item()
|
||||||
getter (RadioNodeList or Element)? namedItem(DOMString name); // shadows inherited namedItem()
|
getter (RadioNodeList or Element)? namedItem(DOMString name); // shadows inherited namedItem()
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlformelement
|
// https://html.spec.whatwg.org/multipage/#htmlformelement
|
||||||
[/*OverrideBuiltins, */HTMLConstructor]
|
[Exposed=Window, /*OverrideBuiltins, */HTMLConstructor]
|
||||||
interface HTMLFormElement : HTMLElement {
|
interface HTMLFormElement : HTMLElement {
|
||||||
[CEReactions]
|
[CEReactions]
|
||||||
attribute DOMString acceptCharset;
|
attribute DOMString acceptCharset;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlframeelement
|
// https://html.spec.whatwg.org/multipage/#htmlframeelement
|
||||||
[HTMLConstructor]
|
[Exposed=Window, HTMLConstructor]
|
||||||
interface HTMLFrameElement : HTMLElement {
|
interface HTMLFrameElement : HTMLElement {
|
||||||
// [CEReactions]
|
// [CEReactions]
|
||||||
// attribute DOMString name;
|
// attribute DOMString name;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlframesetelement
|
// https://html.spec.whatwg.org/multipage/#htmlframesetelement
|
||||||
[HTMLConstructor]
|
[Exposed=Window, HTMLConstructor]
|
||||||
interface HTMLFrameSetElement : HTMLElement {
|
interface HTMLFrameSetElement : HTMLElement {
|
||||||
// [CEReactions]
|
// [CEReactions]
|
||||||
// attribute DOMString cols;
|
// attribute DOMString cols;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlhrelement
|
// https://html.spec.whatwg.org/multipage/#htmlhrelement
|
||||||
[HTMLConstructor]
|
[Exposed=Window, HTMLConstructor]
|
||||||
interface HTMLHRElement : HTMLElement {
|
interface HTMLHRElement : HTMLElement {
|
||||||
// also has obsolete members
|
// also has obsolete members
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,5 +3,5 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlheadelement
|
// https://html.spec.whatwg.org/multipage/#htmlheadelement
|
||||||
[HTMLConstructor]
|
[Exposed=Window, HTMLConstructor]
|
||||||
interface HTMLHeadElement : HTMLElement {};
|
interface HTMLHeadElement : HTMLElement {};
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlheadingelement
|
// https://html.spec.whatwg.org/multipage/#htmlheadingelement
|
||||||
[HTMLConstructor]
|
[Exposed=Window, HTMLConstructor]
|
||||||
interface HTMLHeadingElement : HTMLElement {
|
interface HTMLHeadingElement : HTMLElement {
|
||||||
// also has obsolete members
|
// also has obsolete members
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlhtmlelement
|
// https://html.spec.whatwg.org/multipage/#htmlhtmlelement
|
||||||
[HTMLConstructor]
|
[Exposed=Window, HTMLConstructor]
|
||||||
interface HTMLHtmlElement : HTMLElement {
|
interface HTMLHtmlElement : HTMLElement {
|
||||||
// also has obsolete members
|
// also has obsolete members
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmliframeelement
|
// https://html.spec.whatwg.org/multipage/#htmliframeelement
|
||||||
[HTMLConstructor]
|
[Exposed=Window, HTMLConstructor]
|
||||||
interface HTMLIFrameElement : HTMLElement {
|
interface HTMLIFrameElement : HTMLElement {
|
||||||
[CEReactions]
|
[CEReactions]
|
||||||
attribute USVString src;
|
attribute USVString src;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlimageelement
|
// https://html.spec.whatwg.org/multipage/#htmlimageelement
|
||||||
[HTMLConstructor, NamedConstructor=Image(optional unsigned long width, optional unsigned long height)]
|
[Exposed=Window, HTMLConstructor, NamedConstructor=Image(optional unsigned long width, optional unsigned long height)]
|
||||||
interface HTMLImageElement : HTMLElement {
|
interface HTMLImageElement : HTMLElement {
|
||||||
[CEReactions]
|
[CEReactions]
|
||||||
attribute DOMString alt;
|
attribute DOMString alt;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlinputelement
|
// https://html.spec.whatwg.org/multipage/#htmlinputelement
|
||||||
[HTMLConstructor]
|
[Exposed=Window, HTMLConstructor]
|
||||||
interface HTMLInputElement : HTMLElement {
|
interface HTMLInputElement : HTMLElement {
|
||||||
[CEReactions]
|
[CEReactions]
|
||||||
attribute DOMString accept;
|
attribute DOMString accept;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmllielement
|
// https://html.spec.whatwg.org/multipage/#htmllielement
|
||||||
[HTMLConstructor]
|
[Exposed=Window, HTMLConstructor]
|
||||||
interface HTMLLIElement : HTMLElement {
|
interface HTMLLIElement : HTMLElement {
|
||||||
[CEReactions]
|
[CEReactions]
|
||||||
attribute long value;
|
attribute long value;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmllabelelement
|
// https://html.spec.whatwg.org/multipage/#htmllabelelement
|
||||||
[HTMLConstructor]
|
[Exposed=Window, HTMLConstructor]
|
||||||
interface HTMLLabelElement : HTMLElement {
|
interface HTMLLabelElement : HTMLElement {
|
||||||
readonly attribute HTMLFormElement? form;
|
readonly attribute HTMLFormElement? form;
|
||||||
[CEReactions]
|
[CEReactions]
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmllegendelement
|
// https://html.spec.whatwg.org/multipage/#htmllegendelement
|
||||||
[HTMLConstructor]
|
[Exposed=Window, HTMLConstructor]
|
||||||
interface HTMLLegendElement : HTMLElement {
|
interface HTMLLegendElement : HTMLElement {
|
||||||
readonly attribute HTMLFormElement? form;
|
readonly attribute HTMLFormElement? form;
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmllinkelement
|
// https://html.spec.whatwg.org/multipage/#htmllinkelement
|
||||||
[HTMLConstructor]
|
[Exposed=Window, HTMLConstructor]
|
||||||
interface HTMLLinkElement : HTMLElement {
|
interface HTMLLinkElement : HTMLElement {
|
||||||
[CEReactions]
|
[CEReactions]
|
||||||
attribute USVString href;
|
attribute USVString href;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlmapelement
|
// https://html.spec.whatwg.org/multipage/#htmlmapelement
|
||||||
[HTMLConstructor]
|
[Exposed=Window, HTMLConstructor]
|
||||||
interface HTMLMapElement : HTMLElement {
|
interface HTMLMapElement : HTMLElement {
|
||||||
// [CEReactions]
|
// [CEReactions]
|
||||||
// attribute DOMString name;
|
// attribute DOMString name;
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
enum CanPlayTypeResult { "" /* empty string */, "maybe", "probably" };
|
enum CanPlayTypeResult { "" /* empty string */, "maybe", "probably" };
|
||||||
typedef (MediaStream /*or MediaSource */ or Blob) MediaProvider;
|
typedef (MediaStream /*or MediaSource */ or Blob) MediaProvider;
|
||||||
|
|
||||||
[Abstract]
|
[Exposed=Window, Abstract]
|
||||||
interface HTMLMediaElement : HTMLElement {
|
interface HTMLMediaElement : HTMLElement {
|
||||||
// error state
|
// error state
|
||||||
readonly attribute MediaError? error;
|
readonly attribute MediaError? error;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlmetaelement
|
// https://html.spec.whatwg.org/multipage/#htmlmetaelement
|
||||||
[HTMLConstructor]
|
[Exposed=Window, HTMLConstructor]
|
||||||
interface HTMLMetaElement : HTMLElement {
|
interface HTMLMetaElement : HTMLElement {
|
||||||
[CEReactions]
|
[CEReactions]
|
||||||
attribute DOMString name;
|
attribute DOMString name;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlmeterelement
|
// https://html.spec.whatwg.org/multipage/#htmlmeterelement
|
||||||
[HTMLConstructor]
|
[Exposed=Window, HTMLConstructor]
|
||||||
interface HTMLMeterElement : HTMLElement {
|
interface HTMLMeterElement : HTMLElement {
|
||||||
// [CEReactions]
|
// [CEReactions]
|
||||||
// attribute double value;
|
// attribute double value;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlmodelement
|
// https://html.spec.whatwg.org/multipage/#htmlmodelement
|
||||||
[HTMLConstructor]
|
[Exposed=Window, HTMLConstructor]
|
||||||
interface HTMLModElement : HTMLElement {
|
interface HTMLModElement : HTMLElement {
|
||||||
// [CEReactions]
|
// [CEReactions]
|
||||||
// attribute DOMString cite;
|
// attribute DOMString cite;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlolistelement
|
// https://html.spec.whatwg.org/multipage/#htmlolistelement
|
||||||
[HTMLConstructor]
|
[Exposed=Window, HTMLConstructor]
|
||||||
interface HTMLOListElement : HTMLElement {
|
interface HTMLOListElement : HTMLElement {
|
||||||
// [CEReactions]
|
// [CEReactions]
|
||||||
// attribute boolean reversed;
|
// attribute boolean reversed;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlobjectelement
|
// https://html.spec.whatwg.org/multipage/#htmlobjectelement
|
||||||
[HTMLConstructor]
|
[Exposed=Window, HTMLConstructor]
|
||||||
interface HTMLObjectElement : HTMLElement {
|
interface HTMLObjectElement : HTMLElement {
|
||||||
// [CEReactions]
|
// [CEReactions]
|
||||||
// attribute DOMString data;
|
// attribute DOMString data;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmloptgroupelement
|
// https://html.spec.whatwg.org/multipage/#htmloptgroupelement
|
||||||
[HTMLConstructor]
|
[Exposed=Window, HTMLConstructor]
|
||||||
interface HTMLOptGroupElement : HTMLElement {
|
interface HTMLOptGroupElement : HTMLElement {
|
||||||
[CEReactions]
|
[CEReactions]
|
||||||
attribute boolean disabled;
|
attribute boolean disabled;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmloptionelement
|
// https://html.spec.whatwg.org/multipage/#htmloptionelement
|
||||||
[HTMLConstructor/*, NamedConstructor=Option(optional DOMString text = "", optional DOMString value,
|
[Exposed=Window, HTMLConstructor/*, NamedConstructor=Option(optional DOMString text = "", optional DOMString value,
|
||||||
optional boolean defaultSelected = false,
|
optional boolean defaultSelected = false,
|
||||||
optional boolean selected = false)*/]
|
optional boolean selected = false)*/]
|
||||||
interface HTMLOptionElement : HTMLElement {
|
interface HTMLOptionElement : HTMLElement {
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmloptionscollection
|
// https://html.spec.whatwg.org/multipage/#htmloptionscollection
|
||||||
|
[Exposed=Window]
|
||||||
interface HTMLOptionsCollection : HTMLCollection {
|
interface HTMLOptionsCollection : HTMLCollection {
|
||||||
// inherits item(), namedItem()
|
// inherits item(), namedItem()
|
||||||
[CEReactions]
|
[CEReactions]
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmloutputelement
|
// https://html.spec.whatwg.org/multipage/#htmloutputelement
|
||||||
[HTMLConstructor]
|
[Exposed=Window, HTMLConstructor]
|
||||||
interface HTMLOutputElement : HTMLElement {
|
interface HTMLOutputElement : HTMLElement {
|
||||||
// [SameObject, PutForwards=value] readonly attribute DOMTokenList htmlFor;
|
// [SameObject, PutForwards=value] readonly attribute DOMTokenList htmlFor;
|
||||||
readonly attribute HTMLFormElement? form;
|
readonly attribute HTMLFormElement? form;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlparagraphelement
|
// https://html.spec.whatwg.org/multipage/#htmlparagraphelement
|
||||||
[HTMLConstructor]
|
[Exposed=Window, HTMLConstructor]
|
||||||
interface HTMLParagraphElement : HTMLElement {
|
interface HTMLParagraphElement : HTMLElement {
|
||||||
// also has obsolete members
|
// also has obsolete members
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlparamelement
|
// https://html.spec.whatwg.org/multipage/#htmlparamelement
|
||||||
[HTMLConstructor]
|
[Exposed=Window, HTMLConstructor]
|
||||||
interface HTMLParamElement : HTMLElement {
|
interface HTMLParamElement : HTMLElement {
|
||||||
// [CEReactions]
|
// [CEReactions]
|
||||||
// attribute DOMString name;
|
// attribute DOMString name;
|
||||||
|
|
|
@ -3,5 +3,5 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlpictureelement
|
// https://html.spec.whatwg.org/multipage/#htmlpictureelement
|
||||||
[HTMLConstructor]
|
[Exposed=Window, HTMLConstructor]
|
||||||
interface HTMLPictureElement : HTMLElement {};
|
interface HTMLPictureElement : HTMLElement {};
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlpreelement
|
// https://html.spec.whatwg.org/multipage/#htmlpreelement
|
||||||
[HTMLConstructor]
|
[Exposed=Window, HTMLConstructor]
|
||||||
interface HTMLPreElement : HTMLElement {
|
interface HTMLPreElement : HTMLElement {
|
||||||
// also has obsolete members
|
// also has obsolete members
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#htmlprogresselement
|
// https://html.spec.whatwg.org/multipage/#htmlprogresselement
|
||||||
[HTMLConstructor]
|
[Exposed=Window, HTMLConstructor]
|
||||||
interface HTMLProgressElement : HTMLElement {
|
interface HTMLProgressElement : HTMLElement {
|
||||||
// [CEReactions]
|
// [CEReactions]
|
||||||
// attribute double value;
|
// attribute double value;
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue