diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py index c02499f222ff..103450f78f37 100644 --- a/components/script/dom/bindings/codegen/CodegenRust.py +++ b/components/script/dom/bindings/codegen/CodegenRust.py @@ -827,10 +827,6 @@ def wrapObjectTemplate(templateBody, nullValue, isDefinitelyObject, type, elif isArgument: 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: substitutions = { "sourceDescription": sourceDescription, diff --git a/components/script/dom/bindings/codegen/Configuration.py b/components/script/dom/bindings/codegen/Configuration.py index bde6e71bcfb3..1d50c3ed4f73 100644 --- a/components/script/dom/bindings/codegen/Configuration.py +++ b/components/script/dom/bindings/codegen/Configuration.py @@ -38,11 +38,6 @@ def __init__(self, filename, parseData): iface = thing self.interfaces[iface.identifier.name] = iface 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 = {} else: entry = config[iface.identifier.name] diff --git a/components/script/dom/bindings/codegen/parser/WebIDL.py b/components/script/dom/bindings/codegen/parser/WebIDL.py index 5e8b958e3de2..a36b1b3ecfe5 100644 --- a/components/script/dom/bindings/codegen/parser/WebIDL.py +++ b/components/script/dom/bindings/codegen/parser/WebIDL.py @@ -154,6 +154,9 @@ def isInterface(self): def isNamespace(self): return False + def isInterfaceMixin(self): + return False + def isEnum(self): return False @@ -233,8 +236,6 @@ def __init__(self, location, parentScope, identifier): # A mapping from global name to the set of global interfaces # that have that global name. self.globalNameMapping = defaultdict(set) - self.primaryGlobalAttr = None - self.primaryGlobalName = None def __str__(self): return self.QName() @@ -462,8 +463,17 @@ def finish(self, scope): raise WebIDLError("Unknown [Exposed] value %s" % globalName, [self._location]) - if len(self._exposureGlobalNames) == 0: - self._exposureGlobalNames.add(scope.primaryGlobalName) + # Verify that we are exposed _somwhere_ if we have some place to be + # 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, self.exposureSet) @@ -508,17 +518,15 @@ def getWorkerDebuggerExposureSet(self): return workerDebuggerScopes.intersection(self.exposureSet) -class IDLExternalInterface(IDLObjectWithIdentifier, IDLExposureMixins): +class IDLExternalInterface(IDLObjectWithIdentifier): def __init__(self, location, parentScope, identifier): assert isinstance(identifier, IDLUnresolvedIdentifier) assert isinstance(parentScope, IDLScope) self.parent = None IDLObjectWithIdentifier.__init__(self, location, parentScope, identifier) - IDLExposureMixins.__init__(self, location) IDLObjectWithIdentifier.resolve(self, parentScope) def finish(self, scope): - IDLExposureMixins.finish(self, scope) pass def validate(self): @@ -533,9 +541,6 @@ def isExternal(self): def isInterface(self): return True - def isConsequential(self): - return False - def addExtendedAttributes(self, attrs): if len(attrs) != 0: raise WebIDLError("There are no extended attributes that are " @@ -554,9 +559,6 @@ def isJSImplemented(self): def hasProbablyShortLivingWrapper(self): return False - def isSerializable(self): - return False - def _getDependentObjects(self): return set() @@ -718,6 +720,7 @@ def typeName(self): return "interface" if self.isNamespace(): return "namespace" + assert self.isInterfaceMixin() return "interface mixin" def getExtendedAttribute(self, name): @@ -770,10 +773,13 @@ def finishMembers(self, scope): # sets, make sure they aren't exposed in places where we are not. for member in self.members: 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", [member.location, self.location]) + def isExternal(self): + return False + class IDLInterfaceMixin(IDLInterfaceOrInterfaceMixinOrNamespace): def __init__(self, location, parentScope, name, members, isKnownNonPartial): @@ -788,6 +794,9 @@ def __init__(self, location, parentScope, name, members, isKnownNonPartial): def __str__(self): return "Interface mixin '%s'" % self.identifier.name + def isInterfaceMixin(self): + return True + def finish(self, scope): if self._finished: return @@ -796,8 +805,10 @@ def finish(self, scope): # Expose to the globals of interfaces that includes this mixin if this # mixin has no explicit [Exposed] so that its members can be exposed # 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 if hasImplicitExposure: self._exposureGlobalNames.update(self.actualExposureGlobalNames) @@ -876,16 +887,11 @@ def __init__(self, location, parentScope, name, parent, members, # them. self.namedConstructors = list() self.legacyWindowAliases = [] - self.implementedInterfaces = set() self.includedMixins = set() - self._consequential = False # 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. 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._isOnGlobalProtoChain = False # Tracking of the number of reserved slots we need for our @@ -896,6 +902,10 @@ def __init__(self, location, parentScope, name, parent, members, # If this is an iterator interface, we need to know what iterable # interface we're iterating for in order to get its nativeType. 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 @@ -996,10 +1006,8 @@ def finish(self, scope): self.totalMembersInSlots = self.parent.totalMembersInSlots - # Interfaces with [Global] or [PrimaryGlobal] must not - # have anything inherit from them - if (self.parent.getExtendedAttribute("Global") or - self.parent.getExtendedAttribute("PrimaryGlobal")): + # Interfaces with [Global] must not have anything inherit from them + if self.parent.getExtendedAttribute("Global"): # Note: This is not a self.parent.isOnGlobalProtoChain() check # because ancestors of a [Global] interface can have other # descendants. @@ -1015,10 +1023,8 @@ def finish(self, scope): self.parent.identifier.name), [self.location, self.parent.location]) - # Callbacks must not inherit from non-callbacks or inherit from - # anything that has consequential interfaces. + # Callbacks must not inherit from non-callbacks. # XXXbz Can non-callbacks inherit from callbacks? Spec issue pending. - # XXXbz Can callbacks have consequential interfaces? Spec issue pending if self.isCallback(): if not self.parent.isCallback(): raise WebIDLError("Callback interface %s inheriting from " @@ -1055,23 +1061,14 @@ def finish(self, scope): self.parent.identifier.name), [self.location, self.parent.location]) - for iface in self.implementedInterfaces: - iface.finish(scope) for mixin in self.includedMixins: mixin.finish(scope) cycleInGraph = self.findInterfaceLoopPoint(self) if cycleInGraph: - raise WebIDLError("Interface %s has itself as ancestor or " - "implemented interface" % self.identifier.name, - [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() + raise WebIDLError( + "Interface %s has itself as ancestor" % self.identifier.name, + [self.location, cycleInGraph.location]) self.finishMembers(scope) @@ -1104,7 +1101,7 @@ def finish(self, scope): if self.globalNames: raise WebIDLError( "Can't have both a named constructor and [Global]", - [self.location, self.namedConstructors.location]) + [self.location, ctor.location]) assert len(ctor._exposureGlobalNames) == 0 ctor._exposureGlobalNames.update(self._exposureGlobalNames) ctor.finish(scope) @@ -1114,43 +1111,15 @@ def finish(self, scope): # admixed. 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(), + for mixin in sorted(self.includedMixins, 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 mixinMember in mixin.members: for member in self.members: - if additionalMember.identifier.name == member.identifier.name: + if mixinMember.identifier.name == member.identifier.name: raise WebIDLError( - "Multiple definitions of %s on %s coming from 'implements' statements" % + "Multiple definitions of %s on %s coming from 'includes' statements" % (member.identifier.name, self), - [additionalMember.location, member.location]) - self.members.extend(additionalMembers) - iface.interfacesImplementingSelf.add(self) - - for mixin in sorted(self.includedMixins, - key=lambda x: x.identifier.name): + [mixinMember.location, member.location]) self.members.extend(mixin.members) for ancestor in self.getInheritedInterfaces(): @@ -1164,8 +1133,6 @@ def finish(self, scope): ancestor.identifier.name), [self.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 # member list, except unforgeables pulled in from parents. We want to @@ -1199,6 +1166,21 @@ def finish(self, scope): not hasattr(member, "originatingInterface")): 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 # members from our parent. Also, maplike/setlike declarations get a # slot to hold their backing object. @@ -1221,13 +1203,12 @@ def finish(self, scope): self._ownMembersInSlots += 1 if self.parent: - # Make sure we don't shadow any of the [Unforgeable] attributes on - # our ancestor interfaces. We don't have to worry about - # consequential interfaces here, because those have already been - # imported into the relevant .members lists. And we don't have to - # worry about anything other than our parent, because it has already - # imported its ancestors unforgeable attributes into its member - # list. + # Make sure we don't shadow any of the [Unforgeable] attributes on our + # ancestor interfaces. We don't have to worry about mixins here, because + # those have already been imported into the relevant .members lists. And + # we don't have to worry about anything other than our parent, because it + # has already imported its ancestors' unforgeable attributes into its + # member list. for unforgeableMember in (member for member in self.parent.members if (member.isAttr() or member.isMethod()) and member.isUnforgeable()): @@ -1363,17 +1344,6 @@ def checkDuplicateNames(member, name, attributeName): (attributeName, name), [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. if self.getExtendedAttribute("Unforgeable") and self.hasChildInterfaces(): locations = ([self.location] + @@ -1529,16 +1499,6 @@ def checkDuplicateNames(member, name, attributeName): 'an integer-typed "length" attribute', [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): self._callback = value @@ -1553,8 +1513,6 @@ def isSingleOperationInterface(self): not self.isJSImplemented() and # Not inheriting from another interface not self.parent and - # No consequential interfaces - len(self.getConsequentialInterfaces()) == 0 and # No attributes of any kinds not any(m.isAttr() for m in self.members) and # There is at least one regular operation, and all regular @@ -1582,10 +1540,6 @@ def hasInterfacePrototypeObject(self): return (not self.isCallback() and not self.isNamespace() and self.getUserData('hasConcreteDescendant', False)) - def addImplementedInterface(self, implementedInterface): - assert(isinstance(implementedInterface, IDLInterface)) - self.implementedInterfaces.add(implementedInterface) - def addIncludedMixin(self, includedMixin): assert(isinstance(includedMixin, IDLInterfaceMixin)) self.includedMixins.add(includedMixin) @@ -1603,27 +1557,10 @@ def getInheritedInterfaces(self): parentInterfaces.insert(0, self.parent) 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): """ - Finds an interface, amongst our ancestors and consequential interfaces, - that inherits from otherInterface or implements otherInterface - directly. If there is no such interface, returns None. + Finds an interface amongst our ancestors that inherits from otherInterface. + If there is no such interface, returns None. """ if self.parent: if self.parent == otherInterface: @@ -1631,13 +1568,8 @@ def findInterfaceLoopPoint(self, otherInterface): loopPoint = self.parent.findInterfaceLoopPoint(otherInterface) if 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 + def setNonPartial(self, location, parent, members): assert not parent or isinstance(parent, IDLIdentifierPlaceholder) IDLInterfaceOrInterfaceMixinOrNamespace.setNonPartial(self, location, members) @@ -1671,7 +1603,6 @@ def isOnGlobalProtoChain(self): def _getDependentObjects(self): deps = set(self.members) - deps.update(self.implementedInterfaces) deps.update(self.includedMixins) if self.parent: deps.add(self.parent) @@ -1794,20 +1725,6 @@ def addExtendedAttributes(self, attrs): self.parentScope.addIfaceGlobalNames(self.identifier.name, self.globalNames) 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": if attr.hasValue(): self.legacyWindowAliases = [attr.value()] @@ -3081,8 +2998,9 @@ def isExposedInAllOf(self, exposureSet): return True iface = self.inner if iface.isExternal(): - # Let's say true, though ideally we'd only do this when - # exposureSet contains the primary global's name. + # Let's say true, so we don't have to implement exposure mixins on + # external interfaces and sprinkle [Exposed=Window] on every single + # external interface declaration. return True return iface.exposureSet.issuperset(exposureSet) @@ -3865,10 +3783,6 @@ def getExtendedAttribute(self, name): return self._extendedAttrDict.get(name, None) 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) def validate(self): @@ -5539,52 +5453,6 @@ def reallyInit(self, parentInterface): [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): def __init__(self, location, interface, mixin): IDLObject.__init__(self, location) @@ -5606,16 +5474,18 @@ def finish(self, scope): if not isinstance(interface, IDLInterface): raise WebIDLError("Left-hand side of 'includes' is not an " "interface", - [self.interface.location]) + [self.interface.location, interface.location]) if interface.isCallback(): raise WebIDLError("Left-hand side of 'includes' is a callback " "interface", - [self.interface.location]) + [self.interface.location, interface.location]) if not isinstance(mixin, IDLInterfaceMixin): raise WebIDLError("Right-hand side of 'includes' is not an " "interface mixin", - [self.mixin.location]) + [self.mixin.location, mixin.location]) + mixin.actualExposureGlobalNames.update(interface._exposureGlobalNames) + interface.addIncludedMixin(mixin) self.interface = interface self.mixin = mixin @@ -5721,7 +5591,6 @@ def t_OTHER(self, t): return t keywords = { - "module": "MODULE", "interface": "INTERFACE", "partial": "PARTIAL", "mixin": "MIXIN", @@ -5730,7 +5599,6 @@ def t_OTHER(self, t): "enum": "ENUM", "callback": "CALLBACK", "typedef": "TYPEDEF", - "implements": "IMPLEMENTS", "includes": "INCLUDES", "const": "CONST", "null": "NULL", @@ -5894,7 +5762,6 @@ def p_Definition(self, p): | Exception | Enum | Typedef - | ImplementsStatement | IncludesStatement """ p[0] = p[1] @@ -6427,16 +6294,6 @@ def p_Typedef(self, p): p[2], p[3]) 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): """ IncludesStatement : ScopedName INCLUDES ScopedName SEMICOLON @@ -6898,7 +6755,6 @@ def p_ArgumentName(self, p): | ENUM | EXCEPTION | GETTER - | IMPLEMENTS | INHERIT | INTERFACE | ITERABLE @@ -7025,11 +6881,9 @@ def p_Other(self, p): | FALSE | FLOAT | GETTER - | IMPLEMENTS | INHERIT | INTERFACE | LONG - | MODULE | NULL | OBJECT | OCTET @@ -7479,12 +7333,6 @@ def __init__(self, outputdir='', lexer=None): self._globalScope = IDLScope(BuiltinLocation(""), 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._productions = [] @@ -7568,20 +7416,13 @@ def simpleExtendedAttr(str): self._productions.append(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 # IDLInterfaces. + # XXX khuey hates this bit and wants to nuke it from orbit. includesStatements = [p for p in self._productions if isinstance(p, IDLIncludesStatement)] otherStatements = [p for p in self._productions if - not isinstance(p, (IDLImplementsStatement, - IDLIncludesStatement))] - for production in implementsStatements: - production.finish(self.globalScope()) + not isinstance(p, IDLIncludesStatement)] for production in includesStatements: production.finish(self.globalScope()) for production in otherStatements: diff --git a/components/script/dom/bindings/codegen/parser/tests/test_constructor_global.py b/components/script/dom/bindings/codegen/parser/tests/test_constructor_global.py index c469d56e8179..31c5d95317f5 100644 --- a/components/script/dom/bindings/codegen/parser/tests/test_constructor_global.py +++ b/components/script/dom/bindings/codegen/parser/tests/test_constructor_global.py @@ -1,8 +1,10 @@ +import traceback + def WebIDLTest(parser, harness): threw = False try: parser.parse(""" - [Global] + [Global, Exposed=TestConstructorGlobal] interface TestConstructorGlobal { constructor(); }; @@ -18,7 +20,8 @@ def WebIDLTest(parser, harness): threw = False try: parser.parse(""" - [Global, NamedConstructor=FooBar] + [Global, Exposed=TestNamedConstructorGlobal, + NamedConstructor=FooBar] interface TestNamedConstructorGlobal { }; """) @@ -32,7 +35,8 @@ def WebIDLTest(parser, harness): threw = False try: parser.parse(""" - [NamedConstructor=FooBar, Global] + [NamedConstructor=FooBar, Global, + Exposed=TestNamedConstructorGlobal] interface TestNamedConstructorGlobal { }; """) @@ -46,7 +50,7 @@ def WebIDLTest(parser, harness): threw = False try: parser.parse(""" - [Global, HTMLConstructor] + [Global, HTMLConstructor, Exposed=TestHTMLConstructorGlobal] interface TestHTMLConstructorGlobal { }; """) @@ -61,7 +65,7 @@ def WebIDLTest(parser, harness): threw = False try: parser.parse(""" - [HTMLConstructor, Global] + [HTMLConstructor, Global, Exposed=TestHTMLConstructorGlobal] interface TestHTMLConstructorGlobal { }; """) diff --git a/components/script/dom/bindings/codegen/parser/tests/test_dictionary.py b/components/script/dom/bindings/codegen/parser/tests/test_dictionary.py index cff049bea15d..3cad3022389a 100644 --- a/components/script/dom/bindings/codegen/parser/tests/test_dictionary.py +++ b/components/script/dom/bindings/codegen/parser/tests/test_dictionary.py @@ -736,3 +736,17 @@ def WebIDLTest(parser, harness): threw = True 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") diff --git a/components/script/dom/bindings/codegen/parser/tests/test_distinguishability.py b/components/script/dom/bindings/codegen/parser/tests/test_distinguishability.py index 8d18b26cf2d0..bd9996e34c9f 100644 --- a/components/script/dom/bindings/codegen/parser/tests/test_distinguishability.py +++ b/components/script/dom/bindings/codegen/parser/tests/test_distinguishability.py @@ -59,8 +59,6 @@ def WebIDLTest(parser, harness): void passKid(Kid arg); void passParent(Parent arg); void passGrandparent(Grandparent arg); - void passImplemented(Implemented arg); - void passImplementedParent(ImplementedParent arg); void passUnrelated1(Unrelated1 arg); void passUnrelated2(Unrelated2 arg); void passArrayBuffer(ArrayBuffer arg); @@ -70,9 +68,6 @@ def WebIDLTest(parser, harness): interface Kid : Parent {}; interface Parent : Grandparent {}; interface Grandparent {}; - interface Implemented : ImplementedParent {}; - Parent implements Implemented; - interface ImplementedParent {}; interface Unrelated1 {}; interface Unrelated2 {}; """) @@ -156,8 +151,7 @@ def WebIDLTest(parser, harness): argTypes = [ "long", "short", "long?", "short?", "boolean", "boolean?", "DOMString", "ByteString", "Enum", "Enum2", "Interface", "Interface?", - "AncestorInterface", "UnrelatedInterface", - "ImplementedInterface", "CallbackInterface", + "AncestorInterface", "UnrelatedInterface", "CallbackInterface", "CallbackInterface?", "CallbackInterface2", "object", "Callback", "Callback2", "Dict", "Dict2", "sequence", "sequence", @@ -190,7 +184,7 @@ def allBut(list1, list2): bufferSourceTypes = ["ArrayBuffer", "ArrayBufferView", "Uint8Array", "Uint16Array"] sharedBufferSourceTypes = ["SharedArrayBuffer"] interfaces = [ "Interface", "Interface?", "AncestorInterface", - "UnrelatedInterface", "ImplementedInterface" ] + bufferSourceTypes + sharedBufferSourceTypes + "UnrelatedInterface" ] + bufferSourceTypes + sharedBufferSourceTypes nullables = (["long?", "short?", "boolean?", "Interface?", "CallbackInterface?", "Dict", "Dict2", "Date?", "any", "Promise?"] + @@ -230,7 +224,6 @@ def setDistinguishable(type, types): setDistinguishable("AncestorInterface", notRelatedInterfaces) setDistinguishable("UnrelatedInterface", allBut(argTypes, ["object", "UnrelatedInterface"])) - setDistinguishable("ImplementedInterface", notRelatedInterfaces) setDistinguishable("CallbackInterface", nonUserObjects) setDistinguishable("CallbackInterface?", allBut(nonUserObjects, nullables)) setDistinguishable("CallbackInterface2", nonUserObjects) @@ -272,8 +265,6 @@ def checkDistinguishability(parser, type1, type2): interface Interface : AncestorInterface {}; interface AncestorInterface {}; interface UnrelatedInterface {}; - interface ImplementedInterface {}; - Interface implements ImplementedInterface; callback interface CallbackInterface {}; callback interface CallbackInterface2 {}; callback Callback = any(); diff --git a/components/script/dom/bindings/codegen/parser/tests/test_exposed_extended_attribute.py b/components/script/dom/bindings/codegen/parser/tests/test_exposed_extended_attribute.py index a6c04e30caf5..e0241a564261 100644 --- a/components/script/dom/bindings/codegen/parser/tests/test_exposed_extended_attribute.py +++ b/components/script/dom/bindings/codegen/parser/tests/test_exposed_extended_attribute.py @@ -2,9 +2,9 @@ def WebIDLTest(parser, harness): parser.parse(""" - [PrimaryGlobal] interface Foo {}; - [Global=(Bar1,Bar2)] interface Bar {}; - [Global=Baz2] interface Baz {}; + [Global, Exposed=Foo] interface Foo {}; + [Global=(Bar, Bar1,Bar2), Exposed=Bar] interface Bar {}; + [Global=(Baz, Baz2), Exposed=Baz] interface Baz {}; [Exposed=(Foo,Bar1)] interface Iface { @@ -51,10 +51,11 @@ def WebIDLTest(parser, harness): parser = parser.reset() parser.parse(""" - [PrimaryGlobal] interface Foo {}; - [Global=(Bar1,Bar2)] interface Bar {}; - [Global=Baz2] interface Baz {}; + [Global, Exposed=Foo] interface Foo {}; + [Global=(Bar, Bar1, Bar2), Exposed=Bar] interface Bar {}; + [Global=(Baz, Baz2), Exposed=Baz] interface Baz {}; + [Exposed=Foo] interface Iface2 { void method3(); }; @@ -80,9 +81,9 @@ def WebIDLTest(parser, harness): parser = parser.reset() parser.parse(""" - [PrimaryGlobal] interface Foo {}; - [Global=(Bar1,Bar2)] interface Bar {}; - [Global=Baz2] interface Baz {}; + [Global, Exposed=Foo] interface Foo {}; + [Global=(Bar, Bar1, Bar2), Exposed=Bar] interface Bar {}; + [Global=(Baz, Baz2), Exposed=Baz] interface Baz {}; [Exposed=Foo] interface Iface3 { @@ -90,11 +91,11 @@ def WebIDLTest(parser, harness): }; [Exposed=(Foo,Bar1)] - interface Mixin { + interface mixin Mixin { void method5(); }; - Iface3 implements Mixin; + Iface3 includes Mixin; """) results = parser.finish() harness.check(len(results), 6, "Should know about six things"); @@ -181,8 +182,8 @@ def WebIDLTest(parser, harness): threw = False try: parser.parse(""" - [Global] interface Foo {}; - [Global] interface Bar {}; + [Global, Exposed=Foo] interface Foo {}; + [Global, Exposed=Bar] interface Bar {}; [Exposed=Foo] interface Baz { @@ -198,25 +199,40 @@ def WebIDLTest(parser, harness): harness.ok(threw, "Should have thrown on member exposed where its interface is not.") parser = parser.reset() - threw = False - try: - parser.parse(""" - [Global] interface Foo {}; - [Global] interface Bar {}; + parser.parse(""" + [Global, Exposed=Foo] interface Foo {}; + [Global, Exposed=Bar] interface Bar {}; - [Exposed=Foo] - interface Baz { - void method(); - }; + [Exposed=Foo] + interface Baz { + void method(); + }; - [Exposed=Bar] - interface Mixin {}; + [Exposed=Bar] + 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.") diff --git a/components/script/dom/bindings/codegen/parser/tests/test_global_extended_attr.py b/components/script/dom/bindings/codegen/parser/tests/test_global_extended_attr.py index bc20da40bbe2..28b79642d86b 100644 --- a/components/script/dom/bindings/codegen/parser/tests/test_global_extended_attr.py +++ b/components/script/dom/bindings/codegen/parser/tests/test_global_extended_attr.py @@ -1,9 +1,10 @@ def WebIDLTest(parser, harness): parser.parse(""" - [Global] + [Global, Exposed=Foo] interface Foo : Bar { getter any(DOMString name); }; + [Exposed=Foo] interface Bar {}; """) @@ -18,7 +19,7 @@ def WebIDLTest(parser, harness): threw = False try: parser.parse(""" - [Global] + [Global, Exposed=Foo] interface Foo { getter any(DOMString name); setter void(DOMString name, any arg); @@ -36,7 +37,7 @@ def WebIDLTest(parser, harness): threw = False try: parser.parse(""" - [Global] + [Global, Exposed=Foo] interface Foo { getter any(DOMString name); deleter void(DOMString name); @@ -54,7 +55,7 @@ def WebIDLTest(parser, harness): threw = False try: parser.parse(""" - [Global, OverrideBuiltins] + [Global, OverrideBuiltins, Exposed=Foo] interface Foo { }; """) @@ -70,10 +71,10 @@ def WebIDLTest(parser, harness): threw = False try: parser.parse(""" - [Global] + [Global, Exposed=Foo] interface Foo : Bar { }; - [OverrideBuiltins] + [OverrideBuiltins, Exposed=Foo] interface Bar { }; """) @@ -89,9 +90,10 @@ def WebIDLTest(parser, harness): threw = False try: parser.parse(""" - [Global] + [Global, Exposed=Foo] interface Foo { }; + [Exposed=Foo] interface Bar : Foo { }; """) diff --git a/components/script/dom/bindings/codegen/parser/tests/test_implements.py b/components/script/dom/bindings/codegen/parser/tests/test_implements.py deleted file mode 100644 index 04c47d92abeb..000000000000 --- a/components/script/dom/bindings/codegen/parser/tests/test_implements.py +++ /dev/null @@ -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'") - diff --git a/components/script/dom/bindings/codegen/parser/tests/test_interface.py b/components/script/dom/bindings/codegen/parser/tests/test_interface.py index 28e6af94597c..47db3ae4cc9f 100644 --- a/components/script/dom/bindings/codegen/parser/tests/test_interface.py +++ b/components/script/dom/bindings/codegen/parser/tests/test_interface.py @@ -80,100 +80,6 @@ def WebIDLTest(parser, harness): 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() threw = False try: @@ -377,7 +283,7 @@ def WebIDLTest(parser, harness): parser = parser.reset() parser.parse(""" - [Global] interface Window {}; + [Global, Exposed=Window] interface Window {}; [Exposed=Window, LegacyWindowAlias=A] interface B {}; [Exposed=Window, LegacyWindowAlias=(C, D)] @@ -419,7 +325,8 @@ def WebIDLTest(parser, harness): threw = False try: parser.parse(""" - [Global] interface Window {}; + [Global, Exposed=Window] interface Window {}; + [Exposed=Window] interface A {}; [Exposed=Window, LegacyWindowAlias=A] interface B {}; @@ -434,9 +341,10 @@ def WebIDLTest(parser, harness): threw = False try: parser.parse(""" - [Global] interface Window {}; + [Global, Exposed=Window] interface Window {}; [Exposed=Window, LegacyWindowAlias=A] interface B {}; + [Exposed=Window] interface A {}; """) results = parser.finish() @@ -449,7 +357,7 @@ def WebIDLTest(parser, harness): threw = False try: parser.parse(""" - [Global] interface Window {}; + [Global, Exposed=Window] interface Window {}; [Exposed=Window, LegacyWindowAlias=A] interface B {}; [Exposed=Window, LegacyWindowAlias=A] diff --git a/components/script/dom/bindings/codegen/parser/tests/test_interface_maplikesetlikeiterable.py b/components/script/dom/bindings/codegen/parser/tests/test_interface_maplikesetlikeiterable.py index 5de2e02af7e2..e070adee7e62 100644 --- a/components/script/dom/bindings/codegen/parser/tests/test_interface_maplikesetlikeiterable.py +++ b/components/script/dom/bindings/codegen/parser/tests/test_interface_maplikesetlikeiterable.py @@ -252,16 +252,6 @@ def shouldFail(prefix, iface): }; """, mapRWMembers, numProductions=2) - shouldPass("Implements with maplike/setlike", - """ - interface Foo1 { - maplike; - }; - interface Foo2 { - }; - Foo2 implements Foo1; - """, mapRWMembers, numProductions=3) - shouldPass("JS Implemented maplike interface", """ [JSImplementation="@mozilla.org/dom/test-interface-js-maplike;1"] @@ -350,31 +340,6 @@ def shouldFail(prefix, iface): }; """) - shouldFail("Consequential interface with conflicting maplike/setlike", - """ - interface Foo1 { - maplike; - }; - interface Foo2 { - setlike; - }; - Foo2 implements Foo1; - """) - - shouldFail("Consequential interfaces with conflicting maplike/setlike", - """ - interface Foo1 { - maplike; - }; - interface Foo2 { - setlike; - }; - interface Foo3 { - }; - Foo3 implements Foo1; - Foo3 implements Foo2; - """) - # # Member name collision tests # @@ -477,52 +442,28 @@ def testConflictingMembers(likeMember, conflictName, expectedMembers, methodPass }; """, mapRWMembers, numProductions=3) - shouldFail("Interface with consequential maplike/setlike interface member collision", - """ - interface Foo1 { - void entries(); - }; - interface Foo2 { - maplike; - }; - Foo1 implements Foo2; - """) - - shouldFail("Maplike interface with consequential interface member collision", + shouldFail("Maplike interface with mixin member collision", """ interface Foo1 { maplike; }; - interface Foo2 { + interface mixin Foo2 { void entries(); }; - Foo1 implements Foo2; + Foo1 includes Foo2; """) - shouldPass("Consequential Maplike interface with inherited interface member collision", - """ - interface Foo1 { - maplike; - }; - interface Foo2 { - void entries(); - }; - interface Foo3 : Foo2 { - }; - Foo3 implements Foo1; - """, mapRWMembers, numProductions=4) - shouldPass("Inherited Maplike interface with consequential interface member collision", """ interface Foo1 { maplike; }; - interface Foo2 { + interface mixin Foo2 { void entries(); }; interface Foo3 : Foo1 { }; - Foo3 implements Foo2; + Foo3 includes Foo2; """, mapRWMembers, numProductions=4) shouldFail("Inheritance of name collision with child maplike/setlike", @@ -645,7 +586,7 @@ def testConflictingMembers(likeMember, conflictName, expectedMembers, methodPass }; """) - shouldPass("Implemented interface with readonly allowable overrides", + shouldPass("Interface with readonly allowable overrides", """ interface Foo1 { readonly setlike; diff --git a/components/script/dom/bindings/codegen/parser/tests/test_interfacemixin.py b/components/script/dom/bindings/codegen/parser/tests/test_interfacemixin.py index ae3400d2cdb2..477a9f377998 100644 --- a/components/script/dom/bindings/codegen/parser/tests/test_interfacemixin.py +++ b/components/script/dom/bindings/codegen/parser/tests/test_interfacemixin.py @@ -337,10 +337,48 @@ def WebIDLTest(parser, harness): harness.ok(threw, "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.parse(""" - [Global] interface Window {}; - [Global] interface Worker {}; + [Global, Exposed=Window] interface Window {}; + [Global, Exposed=Worker] interface Worker {}; [Exposed=Window] interface Base {}; interface mixin Mixin { @@ -356,8 +394,8 @@ def WebIDLTest(parser, harness): parser = parser.reset() parser.parse(""" - [Global] interface Window {}; - [Global] interface Worker {}; + [Global, Exposed=Window] interface Window {}; + [Global, Exposed=Worker] interface Worker {}; [Exposed=Window] interface Base {}; [Exposed=Window] @@ -371,3 +409,29 @@ def WebIDLTest(parser, harness): attr = base.members[0] harness.check(attr.exposureSet, set(["Window"]), "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") diff --git a/components/script/dom/bindings/codegen/parser/tests/test_securecontext_extended_attribute.py b/components/script/dom/bindings/codegen/parser/tests/test_securecontext_extended_attribute.py index 084f19fa7f5e..442dba45d760 100644 --- a/components/script/dom/bindings/codegen/parser/tests/test_securecontext_extended_attribute.py +++ b/components/script/dom/bindings/codegen/parser/tests/test_securecontext_extended_attribute.py @@ -288,33 +288,32 @@ def WebIDLTest(parser, harness): threw = True 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 - # on the resolution of https://github.com/heycam/webidl/issues/118 + # Test 'includes'. parser = parser.reset() parser.parse(""" [SecureContext] - interface TestSecureContextInterfaceThatImplementsNonSecureContextInterface { + interface TestSecureContextInterfaceThatIncludesNonSecureContextMixin { const octet TEST_CONSTANT = 0; }; - interface TestNonSecureContextInterface { + interface mixin TestNonSecureContextMixin { const octet TEST_CONSTANT_2 = 0; readonly attribute byte testAttribute2; void testMethod2(byte foo); }; - TestSecureContextInterfaceThatImplementsNonSecureContextInterface implements TestNonSecureContextInterface; + TestSecureContextInterfaceThatIncludesNonSecureContextMixin includes TestNonSecureContextMixin; """) 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"), "Interface should have [SecureContext] extended attribute") 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") 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, - "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, - "Methods copied from non-[SecureContext] interface should not be [SecureContext]") + "Methods copied from non-[SecureContext] mixin should not be [SecureContext]") # Test SecureContext and NoInterfaceObject parser = parser.reset() diff --git a/components/script/dom/bindings/codegen/parser/tests/test_unforgeable.py b/components/script/dom/bindings/codegen/parser/tests/test_unforgeable.py index 44a168670ed3..770a9d3736f7 100644 --- a/components/script/dom/bindings/codegen/parser/tests/test_unforgeable.py +++ b/components/script/dom/bindings/codegen/parser/tests/test_unforgeable.py @@ -141,16 +141,16 @@ def WebIDLTest(parser, harness): interface Child : Parent { }; interface Parent {}; - interface Consequential { + interface mixin Mixin { [Unforgeable] readonly attribute long foo; }; - Parent implements Consequential; + Parent includes Mixin; """) results = parser.finish() harness.check(len(results), 4, "Should be able to inherit from an interface with a " - "consequential interface with [Unforgeable] properties.") + "mixin with [Unforgeable] properties.") parser = parser.reset(); threw = False @@ -160,10 +160,10 @@ def WebIDLTest(parser, harness): void foo(); }; interface Parent {}; - interface Consequential { + interface mixin Mixin { [Unforgeable] readonly attribute long foo; }; - Parent implements Consequential; + Parent includes Mixin; """) results = parser.finish() @@ -182,14 +182,14 @@ def WebIDLTest(parser, harness): }; interface Parent : GrandParent {}; interface GrandParent {}; - interface Consequential { + interface mixin Mixin { [Unforgeable] readonly attribute long foo; }; - GrandParent implements Consequential; - interface ChildConsequential { + GrandParent includes Mixin; + interface mixin ChildMixin { void foo(); }; - Child implements ChildConsequential; + Child includes ChildMixin; """) results = parser.finish() @@ -208,14 +208,14 @@ def WebIDLTest(parser, harness): }; interface Parent : GrandParent {}; interface GrandParent {}; - interface Consequential { + interface mixin Mixin { [Unforgeable] void foo(); }; - GrandParent implements Consequential; - interface ChildConsequential { + GrandParent includes Mixin; + interface mixin ChildMixin { void foo(); }; - Child implements ChildConsequential; + Child includes ChildMixin; """) results = parser.finish() diff --git a/components/script/dom/bindings/codegen/parser/update.sh b/components/script/dom/bindings/codegen/parser/update.sh index 81b3d944a704..fee9720ab2da 100755 --- a/components/script/dom/bindings/codegen/parser/update.sh +++ b/components/script/dom/bindings/codegen/parser/update.sh @@ -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 < debug.patch patch < callback-location.patch patch < union-typedef.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 mkdir tests tar xvpf tests.tar.gz -C tests --strip-components=5 diff --git a/components/script/dom/webidls/ANGLEInstancedArrays.webidl b/components/script/dom/webidls/ANGLEInstancedArrays.webidl index b629117460b3..fc7e5d3efab7 100644 --- a/components/script/dom/webidls/ANGLEInstancedArrays.webidl +++ b/components/script/dom/webidls/ANGLEInstancedArrays.webidl @@ -6,7 +6,7 @@ * https://www.khronos.org/registry/webgl/extensions/ANGLE_instanced_arrays/ */ -[NoInterfaceObject] +[NoInterfaceObject, Exposed=Window] interface ANGLEInstancedArrays { const GLenum VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE = 0x88FE; void drawArraysInstancedANGLE(GLenum mode, GLint first, GLsizei count, GLsizei primcount); diff --git a/components/script/dom/webidls/Attr.webidl b/components/script/dom/webidls/Attr.webidl index 5cfd5ac9d2fb..9bd212e9fe5f 100644 --- a/components/script/dom/webidls/Attr.webidl +++ b/components/script/dom/webidls/Attr.webidl @@ -7,6 +7,7 @@ * */ +[Exposed=Window] interface Attr { [Constant] readonly attribute DOMString? namespaceURI; diff --git a/components/script/dom/webidls/Bluetooth.webidl b/components/script/dom/webidls/Bluetooth.webidl index 8a8d8e6cc436..a24206036bfc 100644 --- a/components/script/dom/webidls/Bluetooth.webidl +++ b/components/script/dom/webidls/Bluetooth.webidl @@ -25,7 +25,7 @@ dictionary RequestDeviceOptions { boolean acceptAllDevices = false; }; -[Pref="dom.bluetooth.enabled"] +[Exposed=Window, Pref="dom.bluetooth.enabled"] interface Bluetooth : EventTarget { [SecureContext] Promise getAvailability(); diff --git a/components/script/dom/webidls/BluetoothAdvertisingEvent.webidl b/components/script/dom/webidls/BluetoothAdvertisingEvent.webidl index b27590266de8..a7dd3fe947fd 100644 --- a/components/script/dom/webidls/BluetoothAdvertisingEvent.webidl +++ b/components/script/dom/webidls/BluetoothAdvertisingEvent.webidl @@ -10,7 +10,7 @@ interface BluetoothServiceDataMap { readonly maplike; };*/ -[Pref="dom.bluetooth.enabled"] +[Exposed=Window, Pref="dom.bluetooth.enabled"] interface BluetoothAdvertisingEvent : Event { [Throws] constructor(DOMString type, BluetoothAdvertisingEventInit init); [SameObject] diff --git a/components/script/dom/webidls/BluetoothCharacteristicProperties.webidl b/components/script/dom/webidls/BluetoothCharacteristicProperties.webidl index d704fcca8551..124f881a2e01 100644 --- a/components/script/dom/webidls/BluetoothCharacteristicProperties.webidl +++ b/components/script/dom/webidls/BluetoothCharacteristicProperties.webidl @@ -4,7 +4,7 @@ // https://webbluetoothcg.github.io/web-bluetooth/#characteristicproperties -[Pref="dom.bluetooth.enabled"] +[Exposed=Window, Pref="dom.bluetooth.enabled"] interface BluetoothCharacteristicProperties { readonly attribute boolean broadcast; readonly attribute boolean read; diff --git a/components/script/dom/webidls/BluetoothDevice.webidl b/components/script/dom/webidls/BluetoothDevice.webidl index bfbd13913e68..8ead21681465 100644 --- a/components/script/dom/webidls/BluetoothDevice.webidl +++ b/components/script/dom/webidls/BluetoothDevice.webidl @@ -4,7 +4,7 @@ // https://webbluetoothcg.github.io/web-bluetooth/#bluetoothdevice -[Pref="dom.bluetooth.enabled"] +[Exposed=Window, Pref="dom.bluetooth.enabled"] interface BluetoothDevice : EventTarget { readonly attribute DOMString id; readonly attribute DOMString? name; diff --git a/components/script/dom/webidls/BluetoothPermissionResult.webidl b/components/script/dom/webidls/BluetoothPermissionResult.webidl index 0f77c320f980..4f9f2871a2e6 100644 --- a/components/script/dom/webidls/BluetoothPermissionResult.webidl +++ b/components/script/dom/webidls/BluetoothPermissionResult.webidl @@ -12,7 +12,7 @@ dictionary BluetoothPermissionDescriptor : PermissionDescriptor { boolean acceptAllDevices = false; }; -[Pref="dom.bluetooth.enabled"] +[Exposed=Window, Pref="dom.bluetooth.enabled"] interface BluetoothPermissionResult : PermissionStatus { // attribute FrozenArray devices; // Workaround until FrozenArray get implemented. diff --git a/components/script/dom/webidls/BluetoothRemoteGATTCharacteristic.webidl b/components/script/dom/webidls/BluetoothRemoteGATTCharacteristic.webidl index c81bfa4b4038..af85d1c1860d 100644 --- a/components/script/dom/webidls/BluetoothRemoteGATTCharacteristic.webidl +++ b/components/script/dom/webidls/BluetoothRemoteGATTCharacteristic.webidl @@ -4,7 +4,7 @@ // https://webbluetoothcg.github.io/web-bluetooth/#bluetoothremotegattcharacteristic -[Pref="dom.bluetooth.enabled"] +[Exposed=Window, Pref="dom.bluetooth.enabled"] interface BluetoothRemoteGATTCharacteristic : EventTarget { [SameObject] readonly attribute BluetoothRemoteGATTService service; diff --git a/components/script/dom/webidls/BluetoothRemoteGATTDescriptor.webidl b/components/script/dom/webidls/BluetoothRemoteGATTDescriptor.webidl index c748cf7cfc10..37c8722e2245 100644 --- a/components/script/dom/webidls/BluetoothRemoteGATTDescriptor.webidl +++ b/components/script/dom/webidls/BluetoothRemoteGATTDescriptor.webidl @@ -4,7 +4,7 @@ // http://webbluetoothcg.github.io/web-bluetooth/#bluetoothremotegattdescriptor -[Pref="dom.bluetooth.enabled"] +[Exposed=Window, Pref="dom.bluetooth.enabled"] interface BluetoothRemoteGATTDescriptor { [SameObject] readonly attribute BluetoothRemoteGATTCharacteristic characteristic; diff --git a/components/script/dom/webidls/BluetoothRemoteGATTServer.webidl b/components/script/dom/webidls/BluetoothRemoteGATTServer.webidl index a594f9e28784..324750dc39b6 100644 --- a/components/script/dom/webidls/BluetoothRemoteGATTServer.webidl +++ b/components/script/dom/webidls/BluetoothRemoteGATTServer.webidl @@ -4,7 +4,7 @@ //https://webbluetoothcg.github.io/web-bluetooth/#bluetoothremotegattserver -[Pref="dom.bluetooth.enabled"] +[Exposed=Window, Pref="dom.bluetooth.enabled"] interface BluetoothRemoteGATTServer { [SameObject] readonly attribute BluetoothDevice device; diff --git a/components/script/dom/webidls/BluetoothRemoteGATTService.webidl b/components/script/dom/webidls/BluetoothRemoteGATTService.webidl index 478f6df22ab0..7e9f624dd1c0 100644 --- a/components/script/dom/webidls/BluetoothRemoteGATTService.webidl +++ b/components/script/dom/webidls/BluetoothRemoteGATTService.webidl @@ -4,7 +4,7 @@ // https://webbluetoothcg.github.io/web-bluetooth/#bluetoothremotegattservice -[Pref="dom.bluetooth.enabled"] +[Exposed=Window, Pref="dom.bluetooth.enabled"] interface BluetoothRemoteGATTService : EventTarget { [SameObject] readonly attribute BluetoothDevice device; diff --git a/components/script/dom/webidls/BluetoothUUID.webidl b/components/script/dom/webidls/BluetoothUUID.webidl index 27932b70f7e7..dde82d3acb73 100644 --- a/components/script/dom/webidls/BluetoothUUID.webidl +++ b/components/script/dom/webidls/BluetoothUUID.webidl @@ -4,7 +4,7 @@ // https://webbluetoothcg.github.io/web-bluetooth/#bluetoothuuid -[Pref="dom.bluetooth.enabled"] +[Exposed=Window, Pref="dom.bluetooth.enabled"] interface BluetoothUUID { [Throws] static UUID getService(BluetoothServiceUUID name); diff --git a/components/script/dom/webidls/CDATASection.webidl b/components/script/dom/webidls/CDATASection.webidl index cddd6edef6f0..28cb4a850033 100644 --- a/components/script/dom/webidls/CDATASection.webidl +++ b/components/script/dom/webidls/CDATASection.webidl @@ -6,5 +6,6 @@ * https://dom.spec.whatwg.org/#interface-cdatasection */ +[Exposed=Window] interface CDATASection : Text { }; diff --git a/components/script/dom/webidls/CharacterData.webidl b/components/script/dom/webidls/CharacterData.webidl index 64c891d87f82..e69f862afc97 100644 --- a/components/script/dom/webidls/CharacterData.webidl +++ b/components/script/dom/webidls/CharacterData.webidl @@ -9,7 +9,7 @@ * liability, trademark and document use rules apply. */ -[Abstract] +[Exposed=Window, Abstract] interface CharacterData : Node { [Pure] attribute [TreatNullAs=EmptyString] DOMString data; [Pure] readonly attribute unsigned long length; diff --git a/components/script/dom/webidls/Comment.webidl b/components/script/dom/webidls/Comment.webidl index 59b9f78cdf48..0ccda9ee991d 100644 --- a/components/script/dom/webidls/Comment.webidl +++ b/components/script/dom/webidls/Comment.webidl @@ -9,6 +9,7 @@ * liability, trademark and document use rules apply. */ +[Exposed=Window] interface Comment : CharacterData { [Throws] constructor(optional DOMString data = ""); }; diff --git a/components/script/dom/webidls/CompositionEvent.webidl b/components/script/dom/webidls/CompositionEvent.webidl index a16981e023f8..91bf7f45b3f3 100644 --- a/components/script/dom/webidls/CompositionEvent.webidl +++ b/components/script/dom/webidls/CompositionEvent.webidl @@ -8,7 +8,7 @@ */ // https://w3c.github.io/uievents/#idl-compositionevent -[Pref="dom.compositionevent.enabled"] +[Exposed=Window, Pref="dom.compositionevent.enabled"] interface CompositionEvent : UIEvent { [Throws] constructor(DOMString type, optional CompositionEventInit eventInitDict = {}); readonly attribute DOMString data; diff --git a/components/script/dom/webidls/CustomElementRegistry.webidl b/components/script/dom/webidls/CustomElementRegistry.webidl index d2ebff0bdf08..6d3a7b436de6 100644 --- a/components/script/dom/webidls/CustomElementRegistry.webidl +++ b/components/script/dom/webidls/CustomElementRegistry.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#customelementregistry -[Pref="dom.customelements.enabled"] +[Exposed=Window, Pref="dom.customelements.enabled"] interface CustomElementRegistry { [Throws, CEReactions] void define(DOMString name, CustomElementConstructor constructor_, optional ElementDefinitionOptions options = {}); diff --git a/components/script/dom/webidls/DOMImplementation.webidl b/components/script/dom/webidls/DOMImplementation.webidl index 56bdd08107c3..cf809b30f1ac 100644 --- a/components/script/dom/webidls/DOMImplementation.webidl +++ b/components/script/dom/webidls/DOMImplementation.webidl @@ -10,6 +10,7 @@ * related or neighboring rights to this work. */ +[Exposed=Window] interface DOMImplementation { [NewObject, Throws] DocumentType createDocumentType(DOMString qualifiedName, DOMString publicId, diff --git a/components/script/dom/webidls/DOMParser.webidl b/components/script/dom/webidls/DOMParser.webidl index e804adfecd50..8af1f309c785 100644 --- a/components/script/dom/webidls/DOMParser.webidl +++ b/components/script/dom/webidls/DOMParser.webidl @@ -14,6 +14,7 @@ enum SupportedType { "image/svg+xml"*/ }; +[Exposed=Window] interface DOMParser { [Throws] constructor(); [Throws] diff --git a/components/script/dom/webidls/DOMStringMap.webidl b/components/script/dom/webidls/DOMStringMap.webidl index 50799f0543de..0acf6f702282 100644 --- a/components/script/dom/webidls/DOMStringMap.webidl +++ b/components/script/dom/webidls/DOMStringMap.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#the-domstringmap-interface -[OverrideBuiltins] +[Exposed=Window, OverrideBuiltins] interface DOMStringMap { getter DOMString (DOMString name); [CEReactions, Throws] diff --git a/components/script/dom/webidls/DOMTokenList.webidl b/components/script/dom/webidls/DOMTokenList.webidl index 636d38c61089..c4b1ff776bc9 100644 --- a/components/script/dom/webidls/DOMTokenList.webidl +++ b/components/script/dom/webidls/DOMTokenList.webidl @@ -3,6 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://dom.spec.whatwg.org/#domtokenlist +[Exposed=Window] interface DOMTokenList { [Pure] readonly attribute unsigned long length; diff --git a/components/script/dom/webidls/Document.webidl b/components/script/dom/webidls/Document.webidl index 04109960ce9e..9476b9c2d6df 100644 --- a/components/script/dom/webidls/Document.webidl +++ b/components/script/dom/webidls/Document.webidl @@ -8,6 +8,7 @@ */ // https://dom.spec.whatwg.org/#interface-document +[Exposed=Window] interface Document : Node { [Throws] constructor(); [SameObject] diff --git a/components/script/dom/webidls/DocumentFragment.webidl b/components/script/dom/webidls/DocumentFragment.webidl index 8c3cadf94554..ec97caecf93f 100644 --- a/components/script/dom/webidls/DocumentFragment.webidl +++ b/components/script/dom/webidls/DocumentFragment.webidl @@ -3,6 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://dom.spec.whatwg.org/#interface-documentfragment +[Exposed=Window] interface DocumentFragment : Node { [Throws] constructor(); }; diff --git a/components/script/dom/webidls/DocumentType.webidl b/components/script/dom/webidls/DocumentType.webidl index 65d643a8dca3..8d00b6df451c 100644 --- a/components/script/dom/webidls/DocumentType.webidl +++ b/components/script/dom/webidls/DocumentType.webidl @@ -9,6 +9,7 @@ * liability, trademark and document use rules apply. */ +[Exposed=Window] interface DocumentType : Node { [Constant] readonly attribute DOMString name; diff --git a/components/script/dom/webidls/EXTBlendMinmax.webidl b/components/script/dom/webidls/EXTBlendMinmax.webidl index be82b29e0ab1..767eace6923f 100644 --- a/components/script/dom/webidls/EXTBlendMinmax.webidl +++ b/components/script/dom/webidls/EXTBlendMinmax.webidl @@ -6,7 +6,7 @@ * https://www.khronos.org/registry/webgl/extensions/EXT_blend_minmax/ */ -[NoInterfaceObject] +[NoInterfaceObject, Exposed=Window] interface EXTBlendMinmax { const GLenum MIN_EXT = 0x8007; const GLenum MAX_EXT = 0x8008; diff --git a/components/script/dom/webidls/EXTColorBufferHalfFloat.webidl b/components/script/dom/webidls/EXTColorBufferHalfFloat.webidl index 26a863fcd3d8..77cf23c6cd0e 100644 --- a/components/script/dom/webidls/EXTColorBufferHalfFloat.webidl +++ b/components/script/dom/webidls/EXTColorBufferHalfFloat.webidl @@ -6,7 +6,7 @@ * https://www.khronos.org/registry/webgl/extensions/EXT_color_buffer_half_float/ */ -[NoInterfaceObject] +[NoInterfaceObject, Exposed=Window] interface EXTColorBufferHalfFloat { const GLenum RGBA16F_EXT = 0x881A; const GLenum RGB16F_EXT = 0x881B; diff --git a/components/script/dom/webidls/EXTShaderTextureLod.webidl b/components/script/dom/webidls/EXTShaderTextureLod.webidl index 8a33e03d80d7..decb5ba86ac3 100644 --- a/components/script/dom/webidls/EXTShaderTextureLod.webidl +++ b/components/script/dom/webidls/EXTShaderTextureLod.webidl @@ -6,6 +6,6 @@ * https://www.khronos.org/registry/webgl/extensions/EXT_shader_texture_lod/ */ -[NoInterfaceObject] +[NoInterfaceObject, Exposed=Window] interface EXTShaderTextureLod { }; diff --git a/components/script/dom/webidls/EXTTextureFilterAnisotropic.webidl b/components/script/dom/webidls/EXTTextureFilterAnisotropic.webidl index 4ba811e1563e..d29575008449 100644 --- a/components/script/dom/webidls/EXTTextureFilterAnisotropic.webidl +++ b/components/script/dom/webidls/EXTTextureFilterAnisotropic.webidl @@ -6,7 +6,7 @@ * https://www.khronos.org/registry/webgl/extensions/EXT_texture_filter_anisotropic/ */ -[NoInterfaceObject] +[NoInterfaceObject, Exposed=Window] interface EXTTextureFilterAnisotropic { const GLenum TEXTURE_MAX_ANISOTROPY_EXT = 0x84FE; const GLenum MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FF; diff --git a/components/script/dom/webidls/Element.webidl b/components/script/dom/webidls/Element.webidl index c720ff4b88e3..4c44b2cd4316 100644 --- a/components/script/dom/webidls/Element.webidl +++ b/components/script/dom/webidls/Element.webidl @@ -12,6 +12,7 @@ * liability, trademark and document use rules apply. */ +[Exposed=Window] interface Element : Node { [Constant] readonly attribute DOMString? namespaceURI; diff --git a/components/script/dom/webidls/EventListener.webidl b/components/script/dom/webidls/EventListener.webidl index 4e72eccc6096..f384e661c634 100644 --- a/components/script/dom/webidls/EventListener.webidl +++ b/components/script/dom/webidls/EventListener.webidl @@ -5,6 +5,7 @@ * https://dom.spec.whatwg.org/#callbackdef-eventlistener */ +[Exposed=Window] callback interface EventListener { void handleEvent(Event event); }; diff --git a/components/script/dom/webidls/Gamepad.webidl b/components/script/dom/webidls/Gamepad.webidl index de2800b4a982..224e6c5511d6 100644 --- a/components/script/dom/webidls/Gamepad.webidl +++ b/components/script/dom/webidls/Gamepad.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://w3c.github.io/gamepad/#gamepad-interface -[Pref="dom.gamepad.enabled"] +[Exposed=Window, Pref="dom.gamepad.enabled"] interface Gamepad { readonly attribute DOMString id; readonly attribute long index; diff --git a/components/script/dom/webidls/GamepadButton.webidl b/components/script/dom/webidls/GamepadButton.webidl index 9837c288db19..748d47232ac3 100644 --- a/components/script/dom/webidls/GamepadButton.webidl +++ b/components/script/dom/webidls/GamepadButton.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://w3c.github.io/gamepad/#gamepadbutton-interface -[Pref="dom.gamepad.enabled"] +[Exposed=Window, Pref="dom.gamepad.enabled"] interface GamepadButton { readonly attribute boolean pressed; readonly attribute boolean touched; diff --git a/components/script/dom/webidls/GamepadButtonList.webidl b/components/script/dom/webidls/GamepadButtonList.webidl index 6dcd729c6e2a..34ea98570715 100644 --- a/components/script/dom/webidls/GamepadButtonList.webidl +++ b/components/script/dom/webidls/GamepadButtonList.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://w3c.github.io/gamepad/#dom-gamepad-buttons -[Pref="dom.gamepad.enabled"] +[Exposed=Window, Pref="dom.gamepad.enabled"] interface GamepadButtonList { getter GamepadButton? item(unsigned long index); readonly attribute unsigned long length; diff --git a/components/script/dom/webidls/GamepadEvent.webidl b/components/script/dom/webidls/GamepadEvent.webidl index 3bd6ea0c0c85..0da800bafe24 100644 --- a/components/script/dom/webidls/GamepadEvent.webidl +++ b/components/script/dom/webidls/GamepadEvent.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://w3c.github.io/gamepad/#gamepadevent-interface -[Pref="dom.gamepad.enabled"] +[Exposed=Window, Pref="dom.gamepad.enabled"] interface GamepadEvent : Event { [Throws] constructor(DOMString type, GamepadEventInit eventInitDict); readonly attribute Gamepad gamepad; diff --git a/components/script/dom/webidls/GamepadList.webidl b/components/script/dom/webidls/GamepadList.webidl index 568e583698b1..926ab7ac848c 100644 --- a/components/script/dom/webidls/GamepadList.webidl +++ b/components/script/dom/webidls/GamepadList.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://w3c.github.io/gamepad/#navigator-interface-extension -[Pref="dom.gamepad.enabled"] +[Exposed=Window, Pref="dom.gamepad.enabled"] interface GamepadList { getter Gamepad? item(unsigned long index); readonly attribute unsigned long length; diff --git a/components/script/dom/webidls/HTMLAnchorElement.webidl b/components/script/dom/webidls/HTMLAnchorElement.webidl index 875c39ca997e..89d3c8634155 100644 --- a/components/script/dom/webidls/HTMLAnchorElement.webidl +++ b/components/script/dom/webidls/HTMLAnchorElement.webidl @@ -11,7 +11,7 @@ */ // https://html.spec.whatwg.org/multipage/#htmlanchorelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLAnchorElement : HTMLElement { [CEReactions] attribute DOMString target; diff --git a/components/script/dom/webidls/HTMLAreaElement.webidl b/components/script/dom/webidls/HTMLAreaElement.webidl index 0f6b6319fcec..c83457c39940 100644 --- a/components/script/dom/webidls/HTMLAreaElement.webidl +++ b/components/script/dom/webidls/HTMLAreaElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmlareaelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLAreaElement : HTMLElement { // [CEReactions] // attribute DOMString alt; diff --git a/components/script/dom/webidls/HTMLAudioElement.webidl b/components/script/dom/webidls/HTMLAudioElement.webidl index 8b8ff5fa6125..5af7116e44c5 100644 --- a/components/script/dom/webidls/HTMLAudioElement.webidl +++ b/components/script/dom/webidls/HTMLAudioElement.webidl @@ -3,5 +3,5 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmlaudioelement -[HTMLConstructor, NamedConstructor=Audio(optional DOMString src)] +[Exposed=Window, HTMLConstructor, NamedConstructor=Audio(optional DOMString src)] interface HTMLAudioElement : HTMLMediaElement {}; diff --git a/components/script/dom/webidls/HTMLBRElement.webidl b/components/script/dom/webidls/HTMLBRElement.webidl index cf92050e544b..9698acad1f83 100644 --- a/components/script/dom/webidls/HTMLBRElement.webidl +++ b/components/script/dom/webidls/HTMLBRElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmlbrelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLBRElement : HTMLElement { // also has obsolete members }; diff --git a/components/script/dom/webidls/HTMLBaseElement.webidl b/components/script/dom/webidls/HTMLBaseElement.webidl index 08e89fa0ead9..a67a54151391 100644 --- a/components/script/dom/webidls/HTMLBaseElement.webidl +++ b/components/script/dom/webidls/HTMLBaseElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmlbaseelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLBaseElement : HTMLElement { [CEReactions] attribute DOMString href; diff --git a/components/script/dom/webidls/HTMLBodyElement.webidl b/components/script/dom/webidls/HTMLBodyElement.webidl index b1aaceccaeb4..280f387187fe 100644 --- a/components/script/dom/webidls/HTMLBodyElement.webidl +++ b/components/script/dom/webidls/HTMLBodyElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#the-body-element -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLBodyElement : HTMLElement { // also has obsolete members }; diff --git a/components/script/dom/webidls/HTMLButtonElement.webidl b/components/script/dom/webidls/HTMLButtonElement.webidl index 196b6301da06..999a253d0d2b 100644 --- a/components/script/dom/webidls/HTMLButtonElement.webidl +++ b/components/script/dom/webidls/HTMLButtonElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmlbuttonelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLButtonElement : HTMLElement { // [CEReactions] // attribute boolean autofocus; diff --git a/components/script/dom/webidls/HTMLCollection.webidl b/components/script/dom/webidls/HTMLCollection.webidl index 6020c539d5c9..ac0962a5d104 100644 --- a/components/script/dom/webidls/HTMLCollection.webidl +++ b/components/script/dom/webidls/HTMLCollection.webidl @@ -4,7 +4,7 @@ // https://dom.spec.whatwg.org/#interface-htmlcollection -[LegacyUnenumerableNamedProperties] +[Exposed=Window, LegacyUnenumerableNamedProperties] interface HTMLCollection { [Pure] readonly attribute unsigned long length; diff --git a/components/script/dom/webidls/HTMLDListElement.webidl b/components/script/dom/webidls/HTMLDListElement.webidl index dabc1cca88f7..a0e859846f59 100644 --- a/components/script/dom/webidls/HTMLDListElement.webidl +++ b/components/script/dom/webidls/HTMLDListElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmldlistelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLDListElement : HTMLElement { // also has obsolete members }; diff --git a/components/script/dom/webidls/HTMLDataElement.webidl b/components/script/dom/webidls/HTMLDataElement.webidl index 572dc8d6521d..cab3da5a1034 100644 --- a/components/script/dom/webidls/HTMLDataElement.webidl +++ b/components/script/dom/webidls/HTMLDataElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmldataelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLDataElement : HTMLElement { [CEReactions] attribute DOMString value; diff --git a/components/script/dom/webidls/HTMLDataListElement.webidl b/components/script/dom/webidls/HTMLDataListElement.webidl index da856f4beb26..f63ecfdcf77f 100644 --- a/components/script/dom/webidls/HTMLDataListElement.webidl +++ b/components/script/dom/webidls/HTMLDataListElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmldatalistelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLDataListElement : HTMLElement { readonly attribute HTMLCollection options; }; diff --git a/components/script/dom/webidls/HTMLDetailsElement.webidl b/components/script/dom/webidls/HTMLDetailsElement.webidl index 768c3d598aa1..53f1dc3259f0 100644 --- a/components/script/dom/webidls/HTMLDetailsElement.webidl +++ b/components/script/dom/webidls/HTMLDetailsElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmldetailselement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLDetailsElement : HTMLElement { [CEReactions] attribute boolean open; diff --git a/components/script/dom/webidls/HTMLDialogElement.webidl b/components/script/dom/webidls/HTMLDialogElement.webidl index 4359c1cddd75..847098850cc1 100644 --- a/components/script/dom/webidls/HTMLDialogElement.webidl +++ b/components/script/dom/webidls/HTMLDialogElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmldialogelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLDialogElement : HTMLElement { [CEReactions] attribute boolean open; diff --git a/components/script/dom/webidls/HTMLDirectoryElement.webidl b/components/script/dom/webidls/HTMLDirectoryElement.webidl index 95384c6134ae..e6ec1ebf1092 100644 --- a/components/script/dom/webidls/HTMLDirectoryElement.webidl +++ b/components/script/dom/webidls/HTMLDirectoryElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmldirectoryelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLDirectoryElement : HTMLElement { // [CEReactions] // attribute boolean compact; diff --git a/components/script/dom/webidls/HTMLDivElement.webidl b/components/script/dom/webidls/HTMLDivElement.webidl index 824965e8f340..23c1051373c5 100644 --- a/components/script/dom/webidls/HTMLDivElement.webidl +++ b/components/script/dom/webidls/HTMLDivElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmldivelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLDivElement : HTMLElement { // also has obsolete members }; diff --git a/components/script/dom/webidls/HTMLElement.webidl b/components/script/dom/webidls/HTMLElement.webidl index da1ab7797854..2d2b9fe6c68a 100644 --- a/components/script/dom/webidls/HTMLElement.webidl +++ b/components/script/dom/webidls/HTMLElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmlelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLElement : Element { // metadata attributes [CEReactions] diff --git a/components/script/dom/webidls/HTMLEmbedElement.webidl b/components/script/dom/webidls/HTMLEmbedElement.webidl index 24f2a25d6ce8..94549e3c1c6e 100644 --- a/components/script/dom/webidls/HTMLEmbedElement.webidl +++ b/components/script/dom/webidls/HTMLEmbedElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmlembedelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLEmbedElement : HTMLElement { // [CEReactions] // attribute DOMString src; diff --git a/components/script/dom/webidls/HTMLFieldSetElement.webidl b/components/script/dom/webidls/HTMLFieldSetElement.webidl index 820516c457f1..b7c5e2006c36 100644 --- a/components/script/dom/webidls/HTMLFieldSetElement.webidl +++ b/components/script/dom/webidls/HTMLFieldSetElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmlfieldsetelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLFieldSetElement : HTMLElement { [CEReactions] attribute boolean disabled; diff --git a/components/script/dom/webidls/HTMLFontElement.webidl b/components/script/dom/webidls/HTMLFontElement.webidl index 498542ed8770..c1eb66836007 100644 --- a/components/script/dom/webidls/HTMLFontElement.webidl +++ b/components/script/dom/webidls/HTMLFontElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmlfontelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLFontElement : HTMLElement { [CEReactions] attribute [TreatNullAs=EmptyString] DOMString color; diff --git a/components/script/dom/webidls/HTMLFormControlsCollection.webidl b/components/script/dom/webidls/HTMLFormControlsCollection.webidl index c3fd3669e4cf..c1b222dee23e 100644 --- a/components/script/dom/webidls/HTMLFormControlsCollection.webidl +++ b/components/script/dom/webidls/HTMLFormControlsCollection.webidl @@ -3,6 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmlformcontrolscollection +[Exposed=Window] interface HTMLFormControlsCollection : HTMLCollection { // inherits length and item() getter (RadioNodeList or Element)? namedItem(DOMString name); // shadows inherited namedItem() diff --git a/components/script/dom/webidls/HTMLFormElement.webidl b/components/script/dom/webidls/HTMLFormElement.webidl index a672088322ed..b944241093ff 100644 --- a/components/script/dom/webidls/HTMLFormElement.webidl +++ b/components/script/dom/webidls/HTMLFormElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmlformelement -[/*OverrideBuiltins, */HTMLConstructor] +[Exposed=Window, /*OverrideBuiltins, */HTMLConstructor] interface HTMLFormElement : HTMLElement { [CEReactions] attribute DOMString acceptCharset; diff --git a/components/script/dom/webidls/HTMLFrameElement.webidl b/components/script/dom/webidls/HTMLFrameElement.webidl index 6eb8dd5ef2d0..842b3ab1d152 100644 --- a/components/script/dom/webidls/HTMLFrameElement.webidl +++ b/components/script/dom/webidls/HTMLFrameElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmlframeelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLFrameElement : HTMLElement { // [CEReactions] // attribute DOMString name; diff --git a/components/script/dom/webidls/HTMLFrameSetElement.webidl b/components/script/dom/webidls/HTMLFrameSetElement.webidl index eae4d57a68c8..5aea0929ccc4 100644 --- a/components/script/dom/webidls/HTMLFrameSetElement.webidl +++ b/components/script/dom/webidls/HTMLFrameSetElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmlframesetelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLFrameSetElement : HTMLElement { // [CEReactions] // attribute DOMString cols; diff --git a/components/script/dom/webidls/HTMLHRElement.webidl b/components/script/dom/webidls/HTMLHRElement.webidl index 899d55f50b4e..dd9e945fbbcc 100644 --- a/components/script/dom/webidls/HTMLHRElement.webidl +++ b/components/script/dom/webidls/HTMLHRElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmlhrelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLHRElement : HTMLElement { // also has obsolete members }; diff --git a/components/script/dom/webidls/HTMLHeadElement.webidl b/components/script/dom/webidls/HTMLHeadElement.webidl index 273d25e6103f..79843dc536cc 100644 --- a/components/script/dom/webidls/HTMLHeadElement.webidl +++ b/components/script/dom/webidls/HTMLHeadElement.webidl @@ -3,5 +3,5 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmlheadelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLHeadElement : HTMLElement {}; diff --git a/components/script/dom/webidls/HTMLHeadingElement.webidl b/components/script/dom/webidls/HTMLHeadingElement.webidl index 0da3656c076a..ad3b44c62182 100644 --- a/components/script/dom/webidls/HTMLHeadingElement.webidl +++ b/components/script/dom/webidls/HTMLHeadingElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmlheadingelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLHeadingElement : HTMLElement { // also has obsolete members }; diff --git a/components/script/dom/webidls/HTMLHtmlElement.webidl b/components/script/dom/webidls/HTMLHtmlElement.webidl index abadb08829b5..7ffd53f230d6 100644 --- a/components/script/dom/webidls/HTMLHtmlElement.webidl +++ b/components/script/dom/webidls/HTMLHtmlElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmlhtmlelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLHtmlElement : HTMLElement { // also has obsolete members }; diff --git a/components/script/dom/webidls/HTMLIFrameElement.webidl b/components/script/dom/webidls/HTMLIFrameElement.webidl index a92c7e8baa13..00d2218e3389 100644 --- a/components/script/dom/webidls/HTMLIFrameElement.webidl +++ b/components/script/dom/webidls/HTMLIFrameElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmliframeelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLIFrameElement : HTMLElement { [CEReactions] attribute USVString src; diff --git a/components/script/dom/webidls/HTMLImageElement.webidl b/components/script/dom/webidls/HTMLImageElement.webidl index b3b05d050ca9..79aafaeb0dbf 100644 --- a/components/script/dom/webidls/HTMLImageElement.webidl +++ b/components/script/dom/webidls/HTMLImageElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // 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 { [CEReactions] attribute DOMString alt; diff --git a/components/script/dom/webidls/HTMLInputElement.webidl b/components/script/dom/webidls/HTMLInputElement.webidl index 865c496a96bc..8a71320a9106 100644 --- a/components/script/dom/webidls/HTMLInputElement.webidl +++ b/components/script/dom/webidls/HTMLInputElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmlinputelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLInputElement : HTMLElement { [CEReactions] attribute DOMString accept; diff --git a/components/script/dom/webidls/HTMLLIElement.webidl b/components/script/dom/webidls/HTMLLIElement.webidl index b454cb4a2f7d..fcf034fc1e75 100644 --- a/components/script/dom/webidls/HTMLLIElement.webidl +++ b/components/script/dom/webidls/HTMLLIElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmllielement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLLIElement : HTMLElement { [CEReactions] attribute long value; diff --git a/components/script/dom/webidls/HTMLLabelElement.webidl b/components/script/dom/webidls/HTMLLabelElement.webidl index 2e16890c511e..f0cb3d219dec 100644 --- a/components/script/dom/webidls/HTMLLabelElement.webidl +++ b/components/script/dom/webidls/HTMLLabelElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmllabelelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLLabelElement : HTMLElement { readonly attribute HTMLFormElement? form; [CEReactions] diff --git a/components/script/dom/webidls/HTMLLegendElement.webidl b/components/script/dom/webidls/HTMLLegendElement.webidl index c63d4773189e..fc4d136aea90 100644 --- a/components/script/dom/webidls/HTMLLegendElement.webidl +++ b/components/script/dom/webidls/HTMLLegendElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmllegendelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLLegendElement : HTMLElement { readonly attribute HTMLFormElement? form; diff --git a/components/script/dom/webidls/HTMLLinkElement.webidl b/components/script/dom/webidls/HTMLLinkElement.webidl index 83f9545914bc..dde037463a91 100644 --- a/components/script/dom/webidls/HTMLLinkElement.webidl +++ b/components/script/dom/webidls/HTMLLinkElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmllinkelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLLinkElement : HTMLElement { [CEReactions] attribute USVString href; diff --git a/components/script/dom/webidls/HTMLMapElement.webidl b/components/script/dom/webidls/HTMLMapElement.webidl index f138f88c7f93..c36163685519 100644 --- a/components/script/dom/webidls/HTMLMapElement.webidl +++ b/components/script/dom/webidls/HTMLMapElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmlmapelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLMapElement : HTMLElement { // [CEReactions] // attribute DOMString name; diff --git a/components/script/dom/webidls/HTMLMediaElement.webidl b/components/script/dom/webidls/HTMLMediaElement.webidl index cdf32c98312e..fd658913ca5f 100644 --- a/components/script/dom/webidls/HTMLMediaElement.webidl +++ b/components/script/dom/webidls/HTMLMediaElement.webidl @@ -7,7 +7,7 @@ enum CanPlayTypeResult { "" /* empty string */, "maybe", "probably" }; typedef (MediaStream /*or MediaSource */ or Blob) MediaProvider; -[Abstract] +[Exposed=Window, Abstract] interface HTMLMediaElement : HTMLElement { // error state readonly attribute MediaError? error; diff --git a/components/script/dom/webidls/HTMLMetaElement.webidl b/components/script/dom/webidls/HTMLMetaElement.webidl index 07fed2e9cdfb..eb24222a24d5 100644 --- a/components/script/dom/webidls/HTMLMetaElement.webidl +++ b/components/script/dom/webidls/HTMLMetaElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmlmetaelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLMetaElement : HTMLElement { [CEReactions] attribute DOMString name; diff --git a/components/script/dom/webidls/HTMLMeterElement.webidl b/components/script/dom/webidls/HTMLMeterElement.webidl index 0af31badb163..81208ceba7ca 100644 --- a/components/script/dom/webidls/HTMLMeterElement.webidl +++ b/components/script/dom/webidls/HTMLMeterElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmlmeterelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLMeterElement : HTMLElement { // [CEReactions] // attribute double value; diff --git a/components/script/dom/webidls/HTMLModElement.webidl b/components/script/dom/webidls/HTMLModElement.webidl index 93a58c7ad6f8..4a06a1ffa50a 100644 --- a/components/script/dom/webidls/HTMLModElement.webidl +++ b/components/script/dom/webidls/HTMLModElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmlmodelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLModElement : HTMLElement { // [CEReactions] // attribute DOMString cite; diff --git a/components/script/dom/webidls/HTMLOListElement.webidl b/components/script/dom/webidls/HTMLOListElement.webidl index 3a3e992fcb3e..f5a720721c6a 100644 --- a/components/script/dom/webidls/HTMLOListElement.webidl +++ b/components/script/dom/webidls/HTMLOListElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmlolistelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLOListElement : HTMLElement { // [CEReactions] // attribute boolean reversed; diff --git a/components/script/dom/webidls/HTMLObjectElement.webidl b/components/script/dom/webidls/HTMLObjectElement.webidl index 58c610418eb8..59cbe296df13 100644 --- a/components/script/dom/webidls/HTMLObjectElement.webidl +++ b/components/script/dom/webidls/HTMLObjectElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmlobjectelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLObjectElement : HTMLElement { // [CEReactions] // attribute DOMString data; diff --git a/components/script/dom/webidls/HTMLOptGroupElement.webidl b/components/script/dom/webidls/HTMLOptGroupElement.webidl index b60bcb6f3dbd..faf8fdec8037 100644 --- a/components/script/dom/webidls/HTMLOptGroupElement.webidl +++ b/components/script/dom/webidls/HTMLOptGroupElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmloptgroupelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLOptGroupElement : HTMLElement { [CEReactions] attribute boolean disabled; diff --git a/components/script/dom/webidls/HTMLOptionElement.webidl b/components/script/dom/webidls/HTMLOptionElement.webidl index 2100d77ee54c..1a618290b65b 100644 --- a/components/script/dom/webidls/HTMLOptionElement.webidl +++ b/components/script/dom/webidls/HTMLOptionElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // 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 selected = false)*/] interface HTMLOptionElement : HTMLElement { diff --git a/components/script/dom/webidls/HTMLOptionsCollection.webidl b/components/script/dom/webidls/HTMLOptionsCollection.webidl index 97edd3183654..91906b785fb4 100644 --- a/components/script/dom/webidls/HTMLOptionsCollection.webidl +++ b/components/script/dom/webidls/HTMLOptionsCollection.webidl @@ -3,6 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmloptionscollection +[Exposed=Window] interface HTMLOptionsCollection : HTMLCollection { // inherits item(), namedItem() [CEReactions] diff --git a/components/script/dom/webidls/HTMLOutputElement.webidl b/components/script/dom/webidls/HTMLOutputElement.webidl index 440f0490f83a..3ce003729fb0 100644 --- a/components/script/dom/webidls/HTMLOutputElement.webidl +++ b/components/script/dom/webidls/HTMLOutputElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmloutputelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLOutputElement : HTMLElement { // [SameObject, PutForwards=value] readonly attribute DOMTokenList htmlFor; readonly attribute HTMLFormElement? form; diff --git a/components/script/dom/webidls/HTMLParagraphElement.webidl b/components/script/dom/webidls/HTMLParagraphElement.webidl index d6eb3e7c5894..916d8ced83c0 100644 --- a/components/script/dom/webidls/HTMLParagraphElement.webidl +++ b/components/script/dom/webidls/HTMLParagraphElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmlparagraphelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLParagraphElement : HTMLElement { // also has obsolete members }; diff --git a/components/script/dom/webidls/HTMLParamElement.webidl b/components/script/dom/webidls/HTMLParamElement.webidl index 69126afa4b89..232ed733439f 100644 --- a/components/script/dom/webidls/HTMLParamElement.webidl +++ b/components/script/dom/webidls/HTMLParamElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmlparamelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLParamElement : HTMLElement { // [CEReactions] // attribute DOMString name; diff --git a/components/script/dom/webidls/HTMLPictureElement.webidl b/components/script/dom/webidls/HTMLPictureElement.webidl index 49038316c6e0..d63c879f3cda 100644 --- a/components/script/dom/webidls/HTMLPictureElement.webidl +++ b/components/script/dom/webidls/HTMLPictureElement.webidl @@ -3,5 +3,5 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmlpictureelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLPictureElement : HTMLElement {}; diff --git a/components/script/dom/webidls/HTMLPreElement.webidl b/components/script/dom/webidls/HTMLPreElement.webidl index 4ccbabb58e9c..cc3f0c7931c0 100644 --- a/components/script/dom/webidls/HTMLPreElement.webidl +++ b/components/script/dom/webidls/HTMLPreElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmlpreelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLPreElement : HTMLElement { // also has obsolete members }; diff --git a/components/script/dom/webidls/HTMLProgressElement.webidl b/components/script/dom/webidls/HTMLProgressElement.webidl index 4cb6a8b4fd05..b52c09fe4545 100644 --- a/components/script/dom/webidls/HTMLProgressElement.webidl +++ b/components/script/dom/webidls/HTMLProgressElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmlprogresselement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLProgressElement : HTMLElement { // [CEReactions] // attribute double value; diff --git a/components/script/dom/webidls/HTMLQuoteElement.webidl b/components/script/dom/webidls/HTMLQuoteElement.webidl index 5374c9f967b0..4fce3814bc43 100644 --- a/components/script/dom/webidls/HTMLQuoteElement.webidl +++ b/components/script/dom/webidls/HTMLQuoteElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmlquoteelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLQuoteElement : HTMLElement { // [CEReactions] // attribute DOMString cite; diff --git a/components/script/dom/webidls/HTMLScriptElement.webidl b/components/script/dom/webidls/HTMLScriptElement.webidl index cfea1e61ed56..5d4f88903f55 100644 --- a/components/script/dom/webidls/HTMLScriptElement.webidl +++ b/components/script/dom/webidls/HTMLScriptElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmlscriptelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLScriptElement : HTMLElement { [CEReactions] attribute USVString src; diff --git a/components/script/dom/webidls/HTMLSelectElement.webidl b/components/script/dom/webidls/HTMLSelectElement.webidl index c8f70297b2f9..3c742aa0855c 100644 --- a/components/script/dom/webidls/HTMLSelectElement.webidl +++ b/components/script/dom/webidls/HTMLSelectElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmlselectelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLSelectElement : HTMLElement { // [CEReactions] // attribute boolean autofocus; diff --git a/components/script/dom/webidls/HTMLSourceElement.webidl b/components/script/dom/webidls/HTMLSourceElement.webidl index cab2c3ba9f7d..56fbfb240d9e 100644 --- a/components/script/dom/webidls/HTMLSourceElement.webidl +++ b/components/script/dom/webidls/HTMLSourceElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmlsourceelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLSourceElement : HTMLElement { [CEReactions] attribute DOMString src; diff --git a/components/script/dom/webidls/HTMLSpanElement.webidl b/components/script/dom/webidls/HTMLSpanElement.webidl index 1a1e8a6f5e4d..5a1e32aef15a 100644 --- a/components/script/dom/webidls/HTMLSpanElement.webidl +++ b/components/script/dom/webidls/HTMLSpanElement.webidl @@ -3,5 +3,5 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmlspanelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLSpanElement : HTMLElement {}; diff --git a/components/script/dom/webidls/HTMLStyleElement.webidl b/components/script/dom/webidls/HTMLStyleElement.webidl index 09a2ba567f0c..3cb783fe3f99 100644 --- a/components/script/dom/webidls/HTMLStyleElement.webidl +++ b/components/script/dom/webidls/HTMLStyleElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmlstyleelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLStyleElement : HTMLElement { // [CEReactions] // attribute DOMString media; diff --git a/components/script/dom/webidls/HTMLTableCaptionElement.webidl b/components/script/dom/webidls/HTMLTableCaptionElement.webidl index 69abba210a20..fbb0dd120719 100644 --- a/components/script/dom/webidls/HTMLTableCaptionElement.webidl +++ b/components/script/dom/webidls/HTMLTableCaptionElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmltablecaptionelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLTableCaptionElement : HTMLElement { // also has obsolete members }; diff --git a/components/script/dom/webidls/HTMLTableCellElement.webidl b/components/script/dom/webidls/HTMLTableCellElement.webidl index 0705816a3871..cda6fbc3f066 100644 --- a/components/script/dom/webidls/HTMLTableCellElement.webidl +++ b/components/script/dom/webidls/HTMLTableCellElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmltablecellelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLTableCellElement : HTMLElement { [CEReactions] attribute unsigned long colSpan; diff --git a/components/script/dom/webidls/HTMLTableColElement.webidl b/components/script/dom/webidls/HTMLTableColElement.webidl index 8f76735232ff..463c31e45178 100644 --- a/components/script/dom/webidls/HTMLTableColElement.webidl +++ b/components/script/dom/webidls/HTMLTableColElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmltablecolelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLTableColElement : HTMLElement { // [CEReactions] // attribute unsigned long span; diff --git a/components/script/dom/webidls/HTMLTableElement.webidl b/components/script/dom/webidls/HTMLTableElement.webidl index be7180ef90f7..fe3801654b16 100644 --- a/components/script/dom/webidls/HTMLTableElement.webidl +++ b/components/script/dom/webidls/HTMLTableElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmltableelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLTableElement : HTMLElement { [CEReactions] attribute HTMLTableCaptionElement? caption; diff --git a/components/script/dom/webidls/HTMLTableRowElement.webidl b/components/script/dom/webidls/HTMLTableRowElement.webidl index 64a5f5862556..ca823c334966 100644 --- a/components/script/dom/webidls/HTMLTableRowElement.webidl +++ b/components/script/dom/webidls/HTMLTableRowElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmltablerowelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLTableRowElement : HTMLElement { readonly attribute long rowIndex; readonly attribute long sectionRowIndex; diff --git a/components/script/dom/webidls/HTMLTableSectionElement.webidl b/components/script/dom/webidls/HTMLTableSectionElement.webidl index 4d41f8e9fdcf..f04dc5514fc7 100644 --- a/components/script/dom/webidls/HTMLTableSectionElement.webidl +++ b/components/script/dom/webidls/HTMLTableSectionElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmltablesectionelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLTableSectionElement : HTMLElement { readonly attribute HTMLCollection rows; [Throws] diff --git a/components/script/dom/webidls/HTMLTemplateElement.webidl b/components/script/dom/webidls/HTMLTemplateElement.webidl index af0ca00308ed..73c19357c455 100644 --- a/components/script/dom/webidls/HTMLTemplateElement.webidl +++ b/components/script/dom/webidls/HTMLTemplateElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmltemplateelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLTemplateElement : HTMLElement { readonly attribute DocumentFragment content; }; diff --git a/components/script/dom/webidls/HTMLTextAreaElement.webidl b/components/script/dom/webidls/HTMLTextAreaElement.webidl index 396c994e5ea5..88c69ef19aa6 100644 --- a/components/script/dom/webidls/HTMLTextAreaElement.webidl +++ b/components/script/dom/webidls/HTMLTextAreaElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmltextareaelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLTextAreaElement : HTMLElement { // [CEReactions] // attribute DOMString autocomplete; diff --git a/components/script/dom/webidls/HTMLTimeElement.webidl b/components/script/dom/webidls/HTMLTimeElement.webidl index e391a4a850d4..b137c99ec1b2 100644 --- a/components/script/dom/webidls/HTMLTimeElement.webidl +++ b/components/script/dom/webidls/HTMLTimeElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmltimeelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLTimeElement : HTMLElement { [CEReactions] attribute DOMString dateTime; diff --git a/components/script/dom/webidls/HTMLTitleElement.webidl b/components/script/dom/webidls/HTMLTitleElement.webidl index deb436b2afc6..8871eca3a707 100644 --- a/components/script/dom/webidls/HTMLTitleElement.webidl +++ b/components/script/dom/webidls/HTMLTitleElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmltitleelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLTitleElement : HTMLElement { [CEReactions, Pure] attribute DOMString text; diff --git a/components/script/dom/webidls/HTMLTrackElement.webidl b/components/script/dom/webidls/HTMLTrackElement.webidl index c86c745deee5..fb9e616a449b 100644 --- a/components/script/dom/webidls/HTMLTrackElement.webidl +++ b/components/script/dom/webidls/HTMLTrackElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmltrackelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLTrackElement : HTMLElement { [CEReactions] attribute DOMString kind; diff --git a/components/script/dom/webidls/HTMLUListElement.webidl b/components/script/dom/webidls/HTMLUListElement.webidl index bc8e3604baac..b543c91418c5 100644 --- a/components/script/dom/webidls/HTMLUListElement.webidl +++ b/components/script/dom/webidls/HTMLUListElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmlulistelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLUListElement : HTMLElement { // also has obsolete members }; diff --git a/components/script/dom/webidls/HTMLUnknownElement.webidl b/components/script/dom/webidls/HTMLUnknownElement.webidl index a5fcab17bc4d..5e26b34468f0 100644 --- a/components/script/dom/webidls/HTMLUnknownElement.webidl +++ b/components/script/dom/webidls/HTMLUnknownElement.webidl @@ -11,5 +11,6 @@ * and create derivative works of this document. */ +[Exposed=Window] interface HTMLUnknownElement : HTMLElement { }; diff --git a/components/script/dom/webidls/HTMLVideoElement.webidl b/components/script/dom/webidls/HTMLVideoElement.webidl index c79aefafc991..582e017cc711 100644 --- a/components/script/dom/webidls/HTMLVideoElement.webidl +++ b/components/script/dom/webidls/HTMLVideoElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#htmlvideoelement -[HTMLConstructor] +[Exposed=Window, HTMLConstructor] interface HTMLVideoElement : HTMLMediaElement { // [CEReactions] // attribute unsigned long width; diff --git a/components/script/dom/webidls/InputEvent.webidl b/components/script/dom/webidls/InputEvent.webidl index 710f95d511ed..58699b643fa6 100644 --- a/components/script/dom/webidls/InputEvent.webidl +++ b/components/script/dom/webidls/InputEvent.webidl @@ -8,6 +8,7 @@ */ // https://w3c.github.io/uievents/#idl-inputevent +[Exposed=Window] interface InputEvent : UIEvent { [Throws] constructor(DOMString type, optional InputEventInit eventInitDict = {}); readonly attribute DOMString? data; diff --git a/components/script/dom/webidls/KeyboardEvent.webidl b/components/script/dom/webidls/KeyboardEvent.webidl index 85a74ead258b..6933a0105edf 100644 --- a/components/script/dom/webidls/KeyboardEvent.webidl +++ b/components/script/dom/webidls/KeyboardEvent.webidl @@ -7,6 +7,7 @@ * */ +[Exposed=Window] interface KeyboardEvent : UIEvent { [Throws] constructor(DOMString typeArg, optional KeyboardEventInit keyboardEventInitDict = {}); // KeyLocationCode diff --git a/components/script/dom/webidls/MediaList.webidl b/components/script/dom/webidls/MediaList.webidl index 53b19e446084..0851fb5c2202 100644 --- a/components/script/dom/webidls/MediaList.webidl +++ b/components/script/dom/webidls/MediaList.webidl @@ -4,6 +4,7 @@ // https://drafts.csswg.org/cssom/#the-medialist-interface // [LegacyArrayClass] +[Exposed=Window] interface MediaList { /* stringifier */ attribute [TreatNullAs=EmptyString] DOMString mediaText; readonly attribute unsigned long length; diff --git a/components/script/dom/webidls/MutationObserver.webidl b/components/script/dom/webidls/MutationObserver.webidl index 0ed66457dea3..7d75c5ed0c48 100644 --- a/components/script/dom/webidls/MutationObserver.webidl +++ b/components/script/dom/webidls/MutationObserver.webidl @@ -7,7 +7,7 @@ */ // https://dom.spec.whatwg.org/#mutationobserver -[Pref="dom.mutation_observer.enabled"] +[Exposed=Window, Pref="dom.mutation_observer.enabled"] interface MutationObserver { [Throws] constructor(MutationCallback callback); [Throws] diff --git a/components/script/dom/webidls/NamedNodeMap.webidl b/components/script/dom/webidls/NamedNodeMap.webidl index 008be870457b..15adeac68525 100644 --- a/components/script/dom/webidls/NamedNodeMap.webidl +++ b/components/script/dom/webidls/NamedNodeMap.webidl @@ -4,7 +4,7 @@ // https://dom.spec.whatwg.org/#interface-namednodemap -[LegacyUnenumerableNamedProperties] +[Exposed=Window, LegacyUnenumerableNamedProperties] interface NamedNodeMap { [Pure] readonly attribute unsigned long length; diff --git a/components/script/dom/webidls/Navigator.webidl b/components/script/dom/webidls/Navigator.webidl index afd7aa7d5027..6b5b1e1f283a 100644 --- a/components/script/dom/webidls/Navigator.webidl +++ b/components/script/dom/webidls/Navigator.webidl @@ -3,6 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#navigator +[Exposed=Window] interface Navigator { // objects implementing this interface also implement the interfaces given below }; diff --git a/components/script/dom/webidls/Node.webidl b/components/script/dom/webidls/Node.webidl index 37943477bd30..6879518b0176 100644 --- a/components/script/dom/webidls/Node.webidl +++ b/components/script/dom/webidls/Node.webidl @@ -6,7 +6,7 @@ * https://dom.spec.whatwg.org/#interface-node */ -[Abstract] +[Exposed=Window, Abstract] interface Node : EventTarget { const unsigned short ELEMENT_NODE = 1; const unsigned short ATTRIBUTE_NODE = 2; // historical diff --git a/components/script/dom/webidls/NodeFilter.webidl b/components/script/dom/webidls/NodeFilter.webidl index 3b7b6cc68561..95e718ff7711 100644 --- a/components/script/dom/webidls/NodeFilter.webidl +++ b/components/script/dom/webidls/NodeFilter.webidl @@ -7,6 +7,7 @@ */ // Import from http://hg.mozilla.org/mozilla-central/file/a5a720259d79/dom/webidl/NodeFilter.webidl +[Exposed=Window] callback interface NodeFilter { // Constants for acceptNode() const unsigned short FILTER_ACCEPT = 1; diff --git a/components/script/dom/webidls/NodeIterator.webidl b/components/script/dom/webidls/NodeIterator.webidl index 5687eb8bf858..9c9e1f41e802 100644 --- a/components/script/dom/webidls/NodeIterator.webidl +++ b/components/script/dom/webidls/NodeIterator.webidl @@ -6,6 +6,7 @@ */ // Import from http://hg.mozilla.org/mozilla-central/raw-file/a5a720259d79/dom/webidl/NodeIterator.webidl +[Exposed=Window] interface NodeIterator { [SameObject] readonly attribute Node root; diff --git a/components/script/dom/webidls/NodeList.webidl b/components/script/dom/webidls/NodeList.webidl index 03567105d6f5..8ce65efb802f 100644 --- a/components/script/dom/webidls/NodeList.webidl +++ b/components/script/dom/webidls/NodeList.webidl @@ -6,6 +6,7 @@ * https://dom.spec.whatwg.org/#interface-nodelist */ +[Exposed=Window] interface NodeList { [Pure] getter Node? item(unsigned long index); diff --git a/components/script/dom/webidls/OESElementIndexUint.webidl b/components/script/dom/webidls/OESElementIndexUint.webidl index f82e9414f135..01a441e9946e 100644 --- a/components/script/dom/webidls/OESElementIndexUint.webidl +++ b/components/script/dom/webidls/OESElementIndexUint.webidl @@ -6,6 +6,6 @@ * https://www.khronos.org/registry/webgl/extensions/OES_element_index_uint/ */ -[NoInterfaceObject] +[NoInterfaceObject, Exposed=Window] interface OESElementIndexUint { }; diff --git a/components/script/dom/webidls/OESStandardDerivatives.webidl b/components/script/dom/webidls/OESStandardDerivatives.webidl index 53acd80565b7..0e4c51e4df35 100644 --- a/components/script/dom/webidls/OESStandardDerivatives.webidl +++ b/components/script/dom/webidls/OESStandardDerivatives.webidl @@ -6,7 +6,7 @@ * https://www.khronos.org/registry/webgl/extensions/OES_standard_derivatives/ */ -[NoInterfaceObject] +[NoInterfaceObject, Exposed=Window] interface OESStandardDerivatives { const GLenum FRAGMENT_SHADER_DERIVATIVE_HINT_OES = 0x8B8B; }; diff --git a/components/script/dom/webidls/OESTextureFloat.webidl b/components/script/dom/webidls/OESTextureFloat.webidl index 134e831381a5..f053a4059771 100644 --- a/components/script/dom/webidls/OESTextureFloat.webidl +++ b/components/script/dom/webidls/OESTextureFloat.webidl @@ -6,6 +6,6 @@ * https://www.khronos.org/registry/webgl/extensions/OES_texture_float/ */ -[NoInterfaceObject] +[NoInterfaceObject, Exposed=Window] interface OESTextureFloat { }; diff --git a/components/script/dom/webidls/OESTextureFloatLinear.webidl b/components/script/dom/webidls/OESTextureFloatLinear.webidl index 117eb75cb165..f0abf5a1aac1 100644 --- a/components/script/dom/webidls/OESTextureFloatLinear.webidl +++ b/components/script/dom/webidls/OESTextureFloatLinear.webidl @@ -6,6 +6,6 @@ * https://www.khronos.org/registry/webgl/extensions/OES_texture_float_linear/ */ -[NoInterfaceObject] +[NoInterfaceObject, Exposed=Window] interface OESTextureFloatLinear { }; diff --git a/components/script/dom/webidls/OESTextureHalfFloat.webidl b/components/script/dom/webidls/OESTextureHalfFloat.webidl index f18f90137254..cba71c8cb565 100644 --- a/components/script/dom/webidls/OESTextureHalfFloat.webidl +++ b/components/script/dom/webidls/OESTextureHalfFloat.webidl @@ -6,7 +6,7 @@ * https://www.khronos.org/registry/webgl/extensions/OES_texture_half_float/ */ -[NoInterfaceObject] +[NoInterfaceObject, Exposed=Window] interface OESTextureHalfFloat { const GLenum HALF_FLOAT_OES = 0x8D61; }; diff --git a/components/script/dom/webidls/OESTextureHalfFloatLinear.webidl b/components/script/dom/webidls/OESTextureHalfFloatLinear.webidl index 9516ed403a6c..61454dd9cdba 100644 --- a/components/script/dom/webidls/OESTextureHalfFloatLinear.webidl +++ b/components/script/dom/webidls/OESTextureHalfFloatLinear.webidl @@ -6,6 +6,6 @@ * https://www.khronos.org/registry/webgl/extensions/OES_texture_half_float_linear/ */ -[NoInterfaceObject] +[NoInterfaceObject, Exposed=Window] interface OESTextureHalfFloatLinear { }; diff --git a/components/script/dom/webidls/OESVertexArrayObject.webidl b/components/script/dom/webidls/OESVertexArrayObject.webidl index d15dcfda0d0a..21c59fd7a881 100644 --- a/components/script/dom/webidls/OESVertexArrayObject.webidl +++ b/components/script/dom/webidls/OESVertexArrayObject.webidl @@ -6,7 +6,7 @@ * https://www.khronos.org/registry/webgl/extensions/OES_vertex_array_object/ */ -[NoInterfaceObject] +[NoInterfaceObject, Exposed=Window] interface OESVertexArrayObject { const unsigned long VERTEX_ARRAY_BINDING_OES = 0x85B5; diff --git a/components/script/dom/webidls/ProcessingInstruction.webidl b/components/script/dom/webidls/ProcessingInstruction.webidl index acadb0f47e89..b3641badf1f8 100644 --- a/components/script/dom/webidls/ProcessingInstruction.webidl +++ b/components/script/dom/webidls/ProcessingInstruction.webidl @@ -6,6 +6,7 @@ * https://dom.spec.whatwg.org/#interface-processinginstruction */ +[Exposed=Window] interface ProcessingInstruction : CharacterData { [Constant] readonly attribute DOMString target; diff --git a/components/script/dom/webidls/RadioNodeList.webidl b/components/script/dom/webidls/RadioNodeList.webidl index 8a6dfa0da392..6db8d2af3537 100644 --- a/components/script/dom/webidls/RadioNodeList.webidl +++ b/components/script/dom/webidls/RadioNodeList.webidl @@ -3,6 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#radionodelist +[Exposed=Window] interface RadioNodeList : NodeList { attribute DOMString value; }; diff --git a/components/script/dom/webidls/Range.webidl b/components/script/dom/webidls/Range.webidl index b897b049e99b..84cd80da0efe 100644 --- a/components/script/dom/webidls/Range.webidl +++ b/components/script/dom/webidls/Range.webidl @@ -8,6 +8,7 @@ * http://dvcs.w3.org/hg/csswg/raw-file/tip/cssom-view/Overview.html#extensions-to-the-range-interface */ +[Exposed=Window] interface Range { [Throws] constructor(); [Pure] diff --git a/components/script/dom/webidls/SVGElement.webidl b/components/script/dom/webidls/SVGElement.webidl index eb412d697352..51214b261164 100644 --- a/components/script/dom/webidls/SVGElement.webidl +++ b/components/script/dom/webidls/SVGElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://svgwg.org/svg2-draft/types.html#InterfaceSVGElement -[Abstract, Pref="dom.svg.enabled"] +[Exposed=Window, Abstract, Pref="dom.svg.enabled"] interface SVGElement : Element { //[SameObject] readonly attribute SVGAnimatedString className; diff --git a/components/script/dom/webidls/SVGGraphicsElement.webidl b/components/script/dom/webidls/SVGGraphicsElement.webidl index 945c35bd5c34..052182e374da 100644 --- a/components/script/dom/webidls/SVGGraphicsElement.webidl +++ b/components/script/dom/webidls/SVGGraphicsElement.webidl @@ -10,7 +10,7 @@ // boolean clipped = false; //}; -[Abstract, Pref="dom.svg.enabled"] +[Exposed=Window, Abstract, Pref="dom.svg.enabled"] interface SVGGraphicsElement : SVGElement { //[SameObject] readonly attribute SVGAnimatedTransformList transform; diff --git a/components/script/dom/webidls/SVGSVGElement.webidl b/components/script/dom/webidls/SVGSVGElement.webidl index bef4b08c7d45..0e61776a40e8 100644 --- a/components/script/dom/webidls/SVGSVGElement.webidl +++ b/components/script/dom/webidls/SVGSVGElement.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://svgwg.org/svg2-draft/struct.html#InterfaceSVGSVGElement -[Pref="dom.svg.enabled"] +[Exposed=Window, Pref="dom.svg.enabled"] interface SVGSVGElement : SVGGraphicsElement { //[SameObject] readonly attribute SVGAnimatedLength x; diff --git a/components/script/dom/webidls/Text.webidl b/components/script/dom/webidls/Text.webidl index 21a556a22a85..0b0a980d0a9e 100644 --- a/components/script/dom/webidls/Text.webidl +++ b/components/script/dom/webidls/Text.webidl @@ -10,6 +10,7 @@ */ // https://dom.spec.whatwg.org/#text +[Exposed=Window] interface Text : CharacterData { [Throws] constructor(optional DOMString data = ""); [NewObject, Throws] diff --git a/components/script/dom/webidls/Touch.webidl b/components/script/dom/webidls/Touch.webidl index bbd94e2b2b86..c887a0fc2a32 100644 --- a/components/script/dom/webidls/Touch.webidl +++ b/components/script/dom/webidls/Touch.webidl @@ -3,6 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // http://w3c.github.io/touch-events/#idl-def-Touch +[Exposed=Window] interface Touch { readonly attribute long identifier; readonly attribute EventTarget target; diff --git a/components/script/dom/webidls/TouchEvent.webidl b/components/script/dom/webidls/TouchEvent.webidl index c5179c9f30da..3779349b7816 100644 --- a/components/script/dom/webidls/TouchEvent.webidl +++ b/components/script/dom/webidls/TouchEvent.webidl @@ -3,6 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // http://w3c.github.io/touch-events/#idl-def-TouchEvent +[Exposed=Window] interface TouchEvent : UIEvent { readonly attribute TouchList touches; readonly attribute TouchList targetTouches; diff --git a/components/script/dom/webidls/TouchList.webidl b/components/script/dom/webidls/TouchList.webidl index 9a3a3932ac9c..bc6f7cb1304d 100644 --- a/components/script/dom/webidls/TouchList.webidl +++ b/components/script/dom/webidls/TouchList.webidl @@ -3,6 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // http://w3c.github.io/touch-events/#idl-def-TouchList +[Exposed=Window] interface TouchList { readonly attribute unsigned long length; getter Touch? item (unsigned long index); diff --git a/components/script/dom/webidls/TreeWalker.webidl b/components/script/dom/webidls/TreeWalker.webidl index 4b07302ba4ff..4162855dd09f 100644 --- a/components/script/dom/webidls/TreeWalker.webidl +++ b/components/script/dom/webidls/TreeWalker.webidl @@ -6,6 +6,7 @@ * https://dom.spec.whatwg.org/#interface-treewalker */ +[Exposed=Window] interface TreeWalker { [SameObject] readonly attribute Node root; diff --git a/components/script/dom/webidls/UIEvent.webidl b/components/script/dom/webidls/UIEvent.webidl index b49e5d5701b0..12850f70e45d 100644 --- a/components/script/dom/webidls/UIEvent.webidl +++ b/components/script/dom/webidls/UIEvent.webidl @@ -3,6 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://w3c.github.io/uievents/#interface-uievent +[Exposed=Window] interface UIEvent : Event { [Throws] constructor(DOMString type, optional UIEventInit eventInitDict = {}); // readonly attribute WindowProxy? view; diff --git a/components/script/dom/webidls/VRDisplay.webidl b/components/script/dom/webidls/VRDisplay.webidl index 0eafc834926b..0cb636e1a32f 100644 --- a/components/script/dom/webidls/VRDisplay.webidl +++ b/components/script/dom/webidls/VRDisplay.webidl @@ -9,7 +9,7 @@ enum VREye { // https://w3c.github.io/webvr/#interface-vrdisplay -[Pref="dom.webvr.enabled"] +[Exposed=Window, Pref="dom.webvr.enabled"] interface VRDisplay : EventTarget { readonly attribute boolean isConnected; readonly attribute boolean isPresenting; diff --git a/components/script/dom/webidls/VRDisplayCapabilities.webidl b/components/script/dom/webidls/VRDisplayCapabilities.webidl index b45687a80d4c..7bb915dfa52d 100644 --- a/components/script/dom/webidls/VRDisplayCapabilities.webidl +++ b/components/script/dom/webidls/VRDisplayCapabilities.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://w3c.github.io/webvr/#interface-vrdisplaycapabilities -[Pref="dom.webvr.enabled"] +[Exposed=Window, Pref="dom.webvr.enabled"] interface VRDisplayCapabilities { readonly attribute boolean hasPosition; readonly attribute boolean hasOrientation; diff --git a/components/script/dom/webidls/VRDisplayEvent.webidl b/components/script/dom/webidls/VRDisplayEvent.webidl index c4207d51b7ef..a10b9ca86244 100644 --- a/components/script/dom/webidls/VRDisplayEvent.webidl +++ b/components/script/dom/webidls/VRDisplayEvent.webidl @@ -11,7 +11,7 @@ enum VRDisplayEventReason { "requested" }; -[Pref="dom.webvr.enabled"] +[Exposed=Window, Pref="dom.webvr.enabled"] interface VRDisplayEvent : Event { [Throws] constructor(DOMString type, VRDisplayEventInit eventInitDict); readonly attribute VRDisplay display; diff --git a/components/script/dom/webidls/VREyeParameters.webidl b/components/script/dom/webidls/VREyeParameters.webidl index 49ad5503ed74..f9fd71c8e99d 100644 --- a/components/script/dom/webidls/VREyeParameters.webidl +++ b/components/script/dom/webidls/VREyeParameters.webidl @@ -4,7 +4,7 @@ // https://w3c.github.io/webvr/#interface-vreyeparameters -[Pref="dom.webvr.enabled"] +[Exposed=Window, Pref="dom.webvr.enabled"] interface VREyeParameters { readonly attribute Float32Array offset; [SameObject] readonly attribute VRFieldOfView fieldOfView; diff --git a/components/script/dom/webidls/VRFieldOfView.webidl b/components/script/dom/webidls/VRFieldOfView.webidl index 568cfd48ce5f..bdd967583585 100644 --- a/components/script/dom/webidls/VRFieldOfView.webidl +++ b/components/script/dom/webidls/VRFieldOfView.webidl @@ -4,7 +4,7 @@ // https://w3c.github.io/webvr/#interface-vrfieldofview -[Pref="dom.webvr.enabled"] +[Exposed=Window, Pref="dom.webvr.enabled"] interface VRFieldOfView { readonly attribute double upDegrees; readonly attribute double rightDegrees; diff --git a/components/script/dom/webidls/VRFrameData.webidl b/components/script/dom/webidls/VRFrameData.webidl index 5b95df05ffb4..4c7c4695a8cd 100644 --- a/components/script/dom/webidls/VRFrameData.webidl +++ b/components/script/dom/webidls/VRFrameData.webidl @@ -4,7 +4,7 @@ // https://w3c.github.io/webvr/#interface-vrframedata -[Pref="dom.webvr.enabled"] +[Exposed=Window, Pref="dom.webvr.enabled"] interface VRFrameData { [Throws] constructor(); readonly attribute DOMHighResTimeStamp timestamp; diff --git a/components/script/dom/webidls/VRPose.webidl b/components/script/dom/webidls/VRPose.webidl index 88bd7090a362..7fb19c60da11 100644 --- a/components/script/dom/webidls/VRPose.webidl +++ b/components/script/dom/webidls/VRPose.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://w3c.github.io/webvr/#interface-vrpose -[Pref="dom.webvr.enabled"] +[Exposed=Window, Pref="dom.webvr.enabled"] interface VRPose { readonly attribute Float32Array? position; readonly attribute Float32Array? linearVelocity; diff --git a/components/script/dom/webidls/VRStageParameters.webidl b/components/script/dom/webidls/VRStageParameters.webidl index 8f3beb3e723c..5816dd55db5c 100644 --- a/components/script/dom/webidls/VRStageParameters.webidl +++ b/components/script/dom/webidls/VRStageParameters.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://w3c.github.io/webvr/#interface-vrstageparameters -[Pref="dom.webvr.enabled"] +[Exposed=Window, Pref="dom.webvr.enabled"] interface VRStageParameters { readonly attribute Float32Array sittingToStandingTransform; readonly attribute float sizeX; diff --git a/components/script/dom/webidls/ValidityState.webidl b/components/script/dom/webidls/ValidityState.webidl index 7a980f440c37..a1a553e91ff0 100644 --- a/components/script/dom/webidls/ValidityState.webidl +++ b/components/script/dom/webidls/ValidityState.webidl @@ -3,6 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#validitystate +[Exposed=Window] interface ValidityState { readonly attribute boolean valueMissing; readonly attribute boolean typeMismatch; diff --git a/components/script/dom/webidls/WEBGLColorBufferFloat.webidl b/components/script/dom/webidls/WEBGLColorBufferFloat.webidl index 2023b46c16e7..dd041927ec1c 100644 --- a/components/script/dom/webidls/WEBGLColorBufferFloat.webidl +++ b/components/script/dom/webidls/WEBGLColorBufferFloat.webidl @@ -6,7 +6,7 @@ * https://www.khronos.org/registry/webgl/extensions/WEBGL_color_buffer_float/ */ -[NoInterfaceObject] +[NoInterfaceObject, Exposed=Window] interface WEBGLColorBufferFloat { const GLenum RGBA32F_EXT = 0x8814; const GLenum FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT = 0x8211; diff --git a/components/script/dom/webidls/WEBGLCompressedTextureETC1.webidl b/components/script/dom/webidls/WEBGLCompressedTextureETC1.webidl index c8ba921764d4..77f80197c976 100644 --- a/components/script/dom/webidls/WEBGLCompressedTextureETC1.webidl +++ b/components/script/dom/webidls/WEBGLCompressedTextureETC1.webidl @@ -6,7 +6,7 @@ * https://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_etc1/ */ -[NoInterfaceObject] +[NoInterfaceObject, Exposed=Window] interface WEBGLCompressedTextureETC1 { /* Compressed Texture Format */ const GLenum COMPRESSED_RGB_ETC1_WEBGL = 0x8D64; diff --git a/components/script/dom/webidls/WEBGLCompressedTextureS3TC.webidl b/components/script/dom/webidls/WEBGLCompressedTextureS3TC.webidl index 0da53b81c170..f940028bf5d9 100644 --- a/components/script/dom/webidls/WEBGLCompressedTextureS3TC.webidl +++ b/components/script/dom/webidls/WEBGLCompressedTextureS3TC.webidl @@ -6,7 +6,7 @@ * https://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_s3tc/ */ -[NoInterfaceObject] +[NoInterfaceObject, Exposed=Window] interface WEBGLCompressedTextureS3TC { /* Compressed Texture Formats */ const GLenum COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83F0; diff --git a/components/script/dom/webidls/WebGL2RenderingContext.webidl b/components/script/dom/webidls/WebGL2RenderingContext.webidl index d46f3099f601..9162b71a2305 100644 --- a/components/script/dom/webidls/WebGL2RenderingContext.webidl +++ b/components/script/dom/webidls/WebGL2RenderingContext.webidl @@ -576,7 +576,7 @@ interface mixin WebGL2RenderingContextBase void bindVertexArray(WebGLVertexArrayObject? array);*/ }; -[Pref="dom.webgl2.enabled"] +[Exposed=Window, Pref="dom.webgl2.enabled"] interface WebGL2RenderingContext { }; diff --git a/components/script/dom/webidls/WebGLSync.webidl b/components/script/dom/webidls/WebGLSync.webidl index 3b251b8cf873..f8cd33ef9cef 100644 --- a/components/script/dom/webidls/WebGLSync.webidl +++ b/components/script/dom/webidls/WebGLSync.webidl @@ -6,6 +6,6 @@ // https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.14 // -[Pref="dom.webgl2.enabled"] +[Exposed=Window, Pref="dom.webgl2.enabled"] interface WebGLSync : WebGLObject { }; diff --git a/components/script/dom/webidls/WebGLVertexArrayObjectOES.webidl b/components/script/dom/webidls/WebGLVertexArrayObjectOES.webidl index 55964f3363e0..e576bd6089dd 100644 --- a/components/script/dom/webidls/WebGLVertexArrayObjectOES.webidl +++ b/components/script/dom/webidls/WebGLVertexArrayObjectOES.webidl @@ -6,6 +6,6 @@ * https://www.khronos.org/registry/webgl/extensions/OES_vertex_array_object/ */ -[NoInterfaceObject] +[NoInterfaceObject, Exposed=Window] interface WebGLVertexArrayObjectOES: WebGLObject { }; diff --git a/components/script/dom/webidls/Window.webidl b/components/script/dom/webidls/Window.webidl index 56907a9f7be3..65944aa3eb14 100644 --- a/components/script/dom/webidls/Window.webidl +++ b/components/script/dom/webidls/Window.webidl @@ -3,7 +3,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://html.spec.whatwg.org/multipage/#window -[PrimaryGlobal] +[Global=Window, Exposed=Window] /*sealed*/ interface Window : GlobalScope { // the current browsing context [Unforgeable] readonly attribute WindowProxy window; diff --git a/components/script/dom/webidls/XMLDocument.webidl b/components/script/dom/webidls/XMLDocument.webidl index 9d6a32c2b4f9..64d11d29cd76 100644 --- a/components/script/dom/webidls/XMLDocument.webidl +++ b/components/script/dom/webidls/XMLDocument.webidl @@ -8,4 +8,5 @@ */ // https://dom.spec.whatwg.org/#interface-document +[Exposed=Window] interface XMLDocument : Document {}; diff --git a/components/script/dom/webidls/XMLSerializer.webidl b/components/script/dom/webidls/XMLSerializer.webidl index e93d35467874..c0111220e420 100644 --- a/components/script/dom/webidls/XMLSerializer.webidl +++ b/components/script/dom/webidls/XMLSerializer.webidl @@ -6,6 +6,7 @@ * https://w3c.github.io/DOM-Parsing/#the-domparser-interface */ +[Exposed=Window] interface XMLSerializer { [Throws] constructor(); [Throws]