diff --git a/dom/bindings/parser/WebIDL.py b/dom/bindings/parser/WebIDL.py index 08194a5aaf01..65f1afea713d 100644 --- a/dom/bindings/parser/WebIDL.py +++ b/dom/bindings/parser/WebIDL.py @@ -1084,18 +1084,11 @@ class IDLInterfaceOrNamespace(IDLInterfaceOrInterfaceMixinOrNamespace): "Can't have both a constructor and [Global]", [self.location, ctor.location]) - assert(len(ctor._exposureGlobalNames) == 0 or - ctor._exposureGlobalNames == self._exposureGlobalNames) + assert(ctor._exposureGlobalNames == self._exposureGlobalNames) ctor._exposureGlobalNames.update(self._exposureGlobalNames) - if ctor in self.members: - # constructor operation. - self.members.remove(ctor) - else: - # extended attribute. This can only happen with - # [HTMLConstructor] and this is the only way we can get into this - # code with len(ctor._exposureGlobalNames) != - # self._exposureGlobalNames. - ctor.finish(scope) + # Remove the constructor operation from our member list so + # it doesn't get in the way later. + self.members.remove(ctor) for ctor in self.namedConstructors: if self.globalNames: @@ -1653,60 +1646,45 @@ class IDLInterface(IDLInterfaceOrNamespace): [attr.location]) self._noInterfaceObject = True - elif identifier == "NamedConstructor" or identifier == "HTMLConstructor": - if identifier == "NamedConstructor" and not attr.hasValue(): + elif identifier == "NamedConstructor": + if not attr.hasValue(): raise WebIDLError("NamedConstructor must either take an identifier or take a named argument list", [attr.location]) - if identifier == "HTMLConstructor": - if not attr.noArguments(): - raise WebIDLError(str(identifier) + " must take no arguments", - [attr.location]) args = attr.args() if attr.hasArgs() else [] retType = IDLWrapperType(self.location, self) - if identifier == "HTMLConstructor": - name = "constructor" - allowForbidden = True - else: - name = attr.value() - allowForbidden = False - - method = IDLConstructor( - attr.location, args, name, - htmlConstructor=(identifier == "HTMLConstructor")) + method = IDLConstructor(attr.location, args, attr.value()) method.reallyInit(self) - # Are always assumed to be able to throw (since there's no way to - # indicate otherwise). + # Named constructors are always assumed to be able to + # throw (since there's no way to indicate otherwise). method.addExtendedAttributes( [IDLExtendedAttribute(self.location, ("Throws",))]) - if identifier == "HTMLConstructor": - method.resolve(self) - else: - # We need to detect conflicts for NamedConstructors across - # interfaces. We first call resolve on the parentScope, - # which will merge all NamedConstructors with the same - # identifier accross interfaces as overloads. - method.resolve(self.parentScope) + # We need to detect conflicts for NamedConstructors across + # interfaces. We first call resolve on the parentScope, + # which will merge all NamedConstructors with the same + # identifier accross interfaces as overloads. + method.resolve(self.parentScope) - # Then we look up the identifier on the parentScope. If the - # result is the same as the method we're adding then it - # hasn't been added as an overload and it's the first time - # we've encountered a NamedConstructor with that identifier. - # If the result is not the same as the method we're adding - # then it has been added as an overload and we need to check - # whether the result is actually one of our existing - # NamedConstructors. - newMethod = self.parentScope.lookupIdentifier(method.identifier) - if newMethod == method: - self.namedConstructors.append(method) - elif newMethod not in self.namedConstructors: - raise WebIDLError("NamedConstructor conflicts with a NamedConstructor of a different interface", - [method.location, newMethod.location]) + # Then we look up the identifier on the parentScope. If the + # result is the same as the method we're adding then it + # hasn't been added as an overload and it's the first time + # we've encountered a NamedConstructor with that identifier. + # If the result is not the same as the method we're adding + # then it has been added as an overload and we need to check + # whether the result is actually one of our existing + # NamedConstructors. + newMethod = self.parentScope.lookupIdentifier(method.identifier) + if newMethod == method: + self.namedConstructors.append(method) + elif newMethod not in self.namedConstructors: + raise WebIDLError("NamedConstructor conflicts with a " + "NamedConstructor of a different interface", + [method.location, newMethod.location]) elif (identifier == "ExceptionClass"): if not attr.noArguments(): raise WebIDLError("[ExceptionClass] must take no arguments", @@ -4879,7 +4857,7 @@ class IDLMethod(IDLInterfaceMember, IDLScope): static=False, getter=False, setter=False, deleter=False, specialType=NamedOrIndexed.Neither, legacycaller=False, stringifier=False, - maplikeOrSetlikeOrIterable=None, htmlConstructor=False): + maplikeOrSetlikeOrIterable=None): # REVIEW: specialType is NamedOrIndexed -- wow, this is messed up. IDLInterfaceMember.__init__(self, location, identifier, IDLInterfaceMember.Tags.Method) @@ -4905,10 +4883,7 @@ class IDLMethod(IDLInterfaceMember, IDLScope): self._stringifier = stringifier assert maplikeOrSetlikeOrIterable is None or isinstance(maplikeOrSetlikeOrIterable, IDLMaplikeOrSetlikeOrIterableBase) self.maplikeOrSetlikeOrIterable = maplikeOrSetlikeOrIterable - assert isinstance(htmlConstructor, bool) - # The identifier of a HTMLConstructor must be 'constructor'. - assert not htmlConstructor or identifier.name == "constructor" - self._htmlConstructor = htmlConstructor + self._htmlConstructor = False self._specialType = specialType self._unforgeable = False self.dependsOn = "Everything" @@ -5403,14 +5378,13 @@ class IDLMethod(IDLInterfaceMember, IDLScope): class IDLConstructor(IDLMethod): - def __init__(self, location, args, name, htmlConstructor=False): + def __init__(self, location, args, name): # We can't actually init our IDLMethod yet, because we do not know the # return type yet. Just save the info we have for now and we will init # it later. self._initLocation = location self._initArgs = args self._initName = name - self._htmlConstructor = htmlConstructor self._inited = False self._initExtendedAttrs = [] @@ -5427,6 +5401,18 @@ class IDLConstructor(IDLMethod): identifier == "SecureContext" or identifier == "Throws"): IDLMethod.handleExtendedAttribute(self, attr) + elif identifier == "HTMLConstructor": + if not attr.noArguments(): + raise WebIDLError("[HTMLConstructor] must take no arguments", + [attr.location]) + # We shouldn't end up here for named constructors. + assert(self.identifier.name == "constructor") + + if any(len(sig[1]) != 0 for sig in self.signatures()): + raise WebIDLError("[HTMLConstructor] must not be applied to a " + "constructor operation that has arguments.", + [attr.location]) + self._htmlConstructor = True else: raise WebIDLError("Unknown extended attribute %s on method" % identifier, [attr.location]) @@ -5437,7 +5423,7 @@ class IDLConstructor(IDLMethod): identifier = IDLUnresolvedIdentifier(location, name, allowForbidden=True) retType = IDLWrapperType(parentInterface.location, parentInterface) IDLMethod.__init__(self, location, identifier, retType, self._initArgs, - static=True, htmlConstructor=self._htmlConstructor) + static=True) self._inited = True; # Propagate through whatever extended attributes we already had self.addExtendedAttributes(self._initExtendedAttrs) diff --git a/dom/bindings/parser/tests/test_constructor.py b/dom/bindings/parser/tests/test_constructor.py index 20eb152cdabf..721f9c2089eb 100644 --- a/dom/bindings/parser/tests/test_constructor.py +++ b/dom/bindings/parser/tests/test_constructor.py @@ -105,8 +105,8 @@ def WebIDLTest(parser, harness): parser = parser.reset() parser.parse(""" - [HTMLConstructor] interface TestHTMLConstructor { + [HTMLConstructor] constructor(); }; """) results = parser.finish() @@ -138,8 +138,8 @@ def WebIDLTest(parser, harness): threw = False try: parser.parse(""" - [HTMLConstructor(DOMString a)] interface TestHTMLConstructorWithArgs { + [HTMLConstructor] constructor(DOMString a); }; """) results = parser.finish() @@ -153,8 +153,8 @@ def WebIDLTest(parser, harness): threw = False try: parser.parse(""" - [HTMLConstructor] callback interface TestHTMLConstructorOnCallbackInterface { + [HTMLConstructor] constructor(); }; """) results = parser.finish() @@ -168,9 +168,9 @@ def WebIDLTest(parser, harness): threw = False try: parser.parse(""" - [HTMLConstructor] interface TestHTMLConstructorAndConstructor { constructor(); + [HTMLConstructor] constructor(); }; """) results = parser.finish() @@ -183,10 +183,10 @@ def WebIDLTest(parser, harness): threw = False try: parser.parse(""" - [HTMLConstructor] interface TestHTMLConstructorAndConstructor { [Throws] constructor(); + [HTMLConstructor] constructor(); }; """) results = parser.finish() @@ -200,9 +200,9 @@ def WebIDLTest(parser, harness): threw = False try: parser.parse(""" - [HTMLConstructor] interface TestHTMLConstructorAndConstructor { constructor(DOMString a); + [HTMLConstructor] constructor(); }; """) results = parser.finish() @@ -216,10 +216,10 @@ def WebIDLTest(parser, harness): threw = False try: parser.parse(""" - [HTMLConstructor] interface TestHTMLConstructorAndConstructor { [Throws] constructor(DOMString a); + [HTMLConstructor] constructor(); }; """) results = parser.finish() @@ -235,10 +235,10 @@ def WebIDLTest(parser, harness): threw = False try: parser.parse(""" - [HTMLConstructor] interface TestHTMLConstructorAndConstructor { [ChromeOnly] constructor(); + [HTMLConstructor] constructor(); }; """) results = parser.finish() @@ -252,10 +252,10 @@ def WebIDLTest(parser, harness): threw = False try: parser.parse(""" - [HTMLConstructor] interface TestHTMLConstructorAndConstructor { [Throws, ChromeOnly] constructor(); + [HTMLConstructor] constructor(); }; """) results = parser.finish() @@ -270,10 +270,10 @@ def WebIDLTest(parser, harness): threw = False try: parser.parse(""" - [HTMLConstructor] interface TestHTMLConstructorAndConstructor { [ChromeOnly] constructor(DOMString a); + [HTMLConstructor] constructor(); }; """) results = parser.finish() @@ -288,10 +288,10 @@ def WebIDLTest(parser, harness): threw = False try: parser.parse(""" - [HTMLConstructor] interface TestHTMLConstructorAndConstructor { [Throws, ChromeOnly] constructor(DOMString a); + [HTMLConstructor] constructor(); }; """) results = parser.finish() diff --git a/dom/bindings/parser/tests/test_constructor_global.py b/dom/bindings/parser/tests/test_constructor_global.py index 31c5d95317f5..b7eabb1e35b6 100644 --- a/dom/bindings/parser/tests/test_constructor_global.py +++ b/dom/bindings/parser/tests/test_constructor_global.py @@ -50,23 +50,9 @@ def WebIDLTest(parser, harness): threw = False try: parser.parse(""" - [Global, HTMLConstructor, Exposed=TestHTMLConstructorGlobal] - interface TestHTMLConstructorGlobal { - }; - """) - - results = parser.finish() - except: - threw = True - - harness.ok(threw, "Should have thrown.") - - parser = parser.reset() - threw = False - try: - parser.parse(""" - [HTMLConstructor, Global, Exposed=TestHTMLConstructorGlobal] + [Global, Exposed=TestHTMLConstructorGlobal] interface TestHTMLConstructorGlobal { + [HTMLConstructor] constructor(); }; """) diff --git a/dom/bindings/parser/tests/test_constructor_no_interface_object.py b/dom/bindings/parser/tests/test_constructor_no_interface_object.py index d41750949117..24cc36066cd6 100644 --- a/dom/bindings/parser/tests/test_constructor_no_interface_object.py +++ b/dom/bindings/parser/tests/test_constructor_no_interface_object.py @@ -28,24 +28,9 @@ def WebIDLTest(parser, harness): threw = False try: parser.parse(""" - [NoInterfaceObject, HTMLConstructor] - interface TestHTMLConstructorNoInterfaceObject { - }; - """) - - results = parser.finish() - except: - threw = True - - harness.ok(threw, "Should have thrown.") - - parser = parser.reset() - - threw = False - try: - parser.parse(""" - [HTMLConstructor, NoInterfaceObject] + [NoInterfaceObject] interface TestHTMLConstructorNoInterfaceObject { + [HTMLConstructor] constructor(); }; """) diff --git a/dom/bindings/test/TestCodeGen.webidl b/dom/bindings/test/TestCodeGen.webidl index 3c23083ddcf1..b83818b6e4e7 100644 --- a/dom/bindings/test/TestCodeGen.webidl +++ b/dom/bindings/test/TestCodeGen.webidl @@ -1327,9 +1327,9 @@ interface TestWorkerExposedInterface { [NeedsSubjectPrincipal=NonSystem] attribute boolean needsNonSystemSubjectPrincipalAttr; }; -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface TestHTMLConstructorInterface { + [HTMLConstructor] constructor(); }; [Exposed=Window] diff --git a/dom/chrome-webidl/XULFrameElement.webidl b/dom/chrome-webidl/XULFrameElement.webidl index d56fca32b5cd..84db8cadfb68 100644 --- a/dom/chrome-webidl/XULFrameElement.webidl +++ b/dom/chrome-webidl/XULFrameElement.webidl @@ -6,10 +6,12 @@ interface nsIDocShell; interface nsIWebNavigation; -[HTMLConstructor, Func="IsChromeOrXBL", +[Func="IsChromeOrXBL", Exposed=Window] interface XULFrameElement : XULElement { + [HTMLConstructor] constructor(); + readonly attribute nsIDocShell? docShell; readonly attribute nsIWebNavigation? webNavigation; diff --git a/dom/chrome-webidl/XULMenuElement.webidl b/dom/chrome-webidl/XULMenuElement.webidl index b07f696ab5e2..7aa6e067c67e 100644 --- a/dom/chrome-webidl/XULMenuElement.webidl +++ b/dom/chrome-webidl/XULMenuElement.webidl @@ -5,9 +5,10 @@ * You can obtain one at http://mozilla.org/MPL/2.0/. */ -[HTMLConstructor, Func="IsChromeOrXBL", +[Func="IsChromeOrXBL", Exposed=Window] interface XULMenuElement : XULElement { + [HTMLConstructor] constructor(); attribute Element? activeChild; diff --git a/dom/chrome-webidl/XULTextElement.webidl b/dom/chrome-webidl/XULTextElement.webidl index 13f4140d33a3..c54f54e9a2f7 100644 --- a/dom/chrome-webidl/XULTextElement.webidl +++ b/dom/chrome-webidl/XULTextElement.webidl @@ -5,9 +5,11 @@ * You can obtain one at http://mozilla.org/MPL/2.0/. */ -[HTMLConstructor, Func="IsChromeOrXBL", +[Func="IsChromeOrXBL", Exposed=Window] interface XULTextElement : XULElement { + [HTMLConstructor] constructor(); + attribute boolean disabled; attribute DOMString value; attribute DOMString accessKey; diff --git a/dom/chrome-webidl/XULTreeElement.webidl b/dom/chrome-webidl/XULTreeElement.webidl index d7c0646c7798..8f09de4f1d20 100644 --- a/dom/chrome-webidl/XULTreeElement.webidl +++ b/dom/chrome-webidl/XULTreeElement.webidl @@ -13,10 +13,12 @@ dictionary TreeCellInfo { DOMString childElt = ""; }; -[HTMLConstructor, Func="IsChromeOrXBL", +[Func="IsChromeOrXBL", Exposed=Window] interface XULTreeElement : XULElement { + [HTMLConstructor] constructor(); + /** * Obtain the columns. */ diff --git a/dom/webidl/HTMLAnchorElement.webidl b/dom/webidl/HTMLAnchorElement.webidl index 623ebaee4cb4..3ca7455f4ce3 100644 --- a/dom/webidl/HTMLAnchorElement.webidl +++ b/dom/webidl/HTMLAnchorElement.webidl @@ -12,9 +12,10 @@ */ // http://www.whatwg.org/specs/web-apps/current-work/#the-a-element -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLAnchorElement : HTMLElement { + [HTMLConstructor] constructor(); + [CEReactions, SetterThrows] attribute DOMString target; [CEReactions, SetterThrows] diff --git a/dom/webidl/HTMLAreaElement.webidl b/dom/webidl/HTMLAreaElement.webidl index e4c01a23983b..7bef4a316c3d 100644 --- a/dom/webidl/HTMLAreaElement.webidl +++ b/dom/webidl/HTMLAreaElement.webidl @@ -13,9 +13,10 @@ */ // http://www.whatwg.org/specs/web-apps/current-work/#the-area-element -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLAreaElement : HTMLElement { + [HTMLConstructor] constructor(); + [CEReactions, SetterThrows] attribute DOMString alt; [CEReactions, SetterThrows] diff --git a/dom/webidl/HTMLAudioElement.webidl b/dom/webidl/HTMLAudioElement.webidl index 7172cb471863..54142f317ca7 100644 --- a/dom/webidl/HTMLAudioElement.webidl +++ b/dom/webidl/HTMLAudioElement.webidl @@ -11,7 +11,9 @@ * and create derivative works of this document. */ -[HTMLConstructor, NamedConstructor=Audio(optional DOMString src), +[NamedConstructor=Audio(optional DOMString src), Exposed=Window] -interface HTMLAudioElement : HTMLMediaElement {}; +interface HTMLAudioElement : HTMLMediaElement { + [HTMLConstructor] constructor(); +}; diff --git a/dom/webidl/HTMLBRElement.webidl b/dom/webidl/HTMLBRElement.webidl index e73145d02dca..9762fda0195e 100644 --- a/dom/webidl/HTMLBRElement.webidl +++ b/dom/webidl/HTMLBRElement.webidl @@ -13,9 +13,10 @@ */ // http://www.whatwg.org/specs/web-apps/current-work/#the-br-element -[HTMLConstructor, - Exposed=Window] -interface HTMLBRElement : HTMLElement {}; +[Exposed=Window] +interface HTMLBRElement : HTMLElement { + [HTMLConstructor] constructor(); +}; // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis partial interface HTMLBRElement { diff --git a/dom/webidl/HTMLBaseElement.webidl b/dom/webidl/HTMLBaseElement.webidl index af0b76e6fc7b..17b67bad3834 100644 --- a/dom/webidl/HTMLBaseElement.webidl +++ b/dom/webidl/HTMLBaseElement.webidl @@ -12,9 +12,10 @@ */ // http://www.whatwg.org/specs/web-apps/current-work/#the-base-element -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLBaseElement : HTMLElement { + [HTMLConstructor] constructor(); + [CEReactions, SetterThrows, Pure] attribute DOMString href; [CEReactions, SetterThrows, Pure] diff --git a/dom/webidl/HTMLBodyElement.webidl b/dom/webidl/HTMLBodyElement.webidl index 6cec91919242..1038adb45f44 100644 --- a/dom/webidl/HTMLBodyElement.webidl +++ b/dom/webidl/HTMLBodyElement.webidl @@ -11,9 +11,10 @@ * and create derivative works of this document. */ -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLBodyElement : HTMLElement { + [HTMLConstructor] constructor(); + }; partial interface HTMLBodyElement { diff --git a/dom/webidl/HTMLButtonElement.webidl b/dom/webidl/HTMLButtonElement.webidl index 5ec108851987..b76d8cc73fb5 100644 --- a/dom/webidl/HTMLButtonElement.webidl +++ b/dom/webidl/HTMLButtonElement.webidl @@ -11,9 +11,10 @@ */ // http://www.whatwg.org/specs/web-apps/current-work/#the-button-element -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLButtonElement : HTMLElement { + [HTMLConstructor] constructor(); + [CEReactions, SetterThrows, Pure] attribute boolean autofocus; [CEReactions, SetterThrows, Pure] diff --git a/dom/webidl/HTMLCanvasElement.webidl b/dom/webidl/HTMLCanvasElement.webidl index 959f62477f9e..1ecd479afcdf 100644 --- a/dom/webidl/HTMLCanvasElement.webidl +++ b/dom/webidl/HTMLCanvasElement.webidl @@ -13,9 +13,10 @@ interface nsISupports; interface Variant; -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLCanvasElement : HTMLElement { + [HTMLConstructor] constructor(); + [CEReactions, Pure, SetterThrows] attribute unsigned long width; [CEReactions, Pure, SetterThrows] diff --git a/dom/webidl/HTMLDListElement.webidl b/dom/webidl/HTMLDListElement.webidl index c72dd0bb9d6c..00afe405b62d 100644 --- a/dom/webidl/HTMLDListElement.webidl +++ b/dom/webidl/HTMLDListElement.webidl @@ -13,9 +13,10 @@ */ // http://www.whatwg.org/specs/web-apps/current-work/#the-dl-element -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLDListElement : HTMLElement { + [HTMLConstructor] constructor(); + }; // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis diff --git a/dom/webidl/HTMLDataElement.webidl b/dom/webidl/HTMLDataElement.webidl index aef7a2d8a649..1a04747e752f 100644 --- a/dom/webidl/HTMLDataElement.webidl +++ b/dom/webidl/HTMLDataElement.webidl @@ -7,9 +7,10 @@ * http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-data-element */ -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLDataElement : HTMLElement { + [HTMLConstructor] constructor(); + [CEReactions, SetterThrows] attribute DOMString value; }; diff --git a/dom/webidl/HTMLDataListElement.webidl b/dom/webidl/HTMLDataListElement.webidl index 88b2a0ebbe26..23c462a3b79c 100644 --- a/dom/webidl/HTMLDataListElement.webidl +++ b/dom/webidl/HTMLDataListElement.webidl @@ -11,8 +11,9 @@ * and create derivative works of this document. */ -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLDataListElement : HTMLElement { + [HTMLConstructor] constructor(); + readonly attribute HTMLCollection options; }; diff --git a/dom/webidl/HTMLDetailsElement.webidl b/dom/webidl/HTMLDetailsElement.webidl index 69eda0c080c6..7f293f8ed829 100644 --- a/dom/webidl/HTMLDetailsElement.webidl +++ b/dom/webidl/HTMLDetailsElement.webidl @@ -11,9 +11,10 @@ * and create derivative works of this document. */ -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLDetailsElement : HTMLElement { + [HTMLConstructor] constructor(); + [CEReactions, SetterThrows] attribute boolean open; }; diff --git a/dom/webidl/HTMLDialogElement.webidl b/dom/webidl/HTMLDialogElement.webidl index c220e26a3270..38b035f24773 100644 --- a/dom/webidl/HTMLDialogElement.webidl +++ b/dom/webidl/HTMLDialogElement.webidl @@ -11,9 +11,11 @@ * and create derivative works of this document. */ -[Pref="dom.dialog_element.enabled", HTMLConstructor, +[Pref="dom.dialog_element.enabled", Exposed=Window] interface HTMLDialogElement : HTMLElement { + [HTMLConstructor] constructor(); + [CEReactions, SetterThrows] attribute boolean open; attribute DOMString returnValue; diff --git a/dom/webidl/HTMLDirectoryElement.webidl b/dom/webidl/HTMLDirectoryElement.webidl index 073af9a297be..69624d541e92 100644 --- a/dom/webidl/HTMLDirectoryElement.webidl +++ b/dom/webidl/HTMLDirectoryElement.webidl @@ -12,9 +12,10 @@ */ // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLDirectoryElement : HTMLElement { + [HTMLConstructor] constructor(); + [CEReactions, SetterThrows, Pure] attribute boolean compact; }; diff --git a/dom/webidl/HTMLDivElement.webidl b/dom/webidl/HTMLDivElement.webidl index 2249df124024..c61b82df972c 100644 --- a/dom/webidl/HTMLDivElement.webidl +++ b/dom/webidl/HTMLDivElement.webidl @@ -11,9 +11,10 @@ * and create derivative works of this document. */ -[HTMLConstructor, - Exposed=Window] -interface HTMLDivElement : HTMLElement {}; +[Exposed=Window] +interface HTMLDivElement : HTMLElement { + [HTMLConstructor] constructor(); +}; partial interface HTMLDivElement { [CEReactions, SetterThrows] diff --git a/dom/webidl/HTMLElement.webidl b/dom/webidl/HTMLElement.webidl index d5e648a7cae5..081f37c7e07e 100644 --- a/dom/webidl/HTMLElement.webidl +++ b/dom/webidl/HTMLElement.webidl @@ -12,9 +12,10 @@ * and create derivative works of this document. */ -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLElement : Element { + [HTMLConstructor] constructor(); + // metadata attributes [CEReactions] attribute DOMString title; diff --git a/dom/webidl/HTMLEmbedElement.webidl b/dom/webidl/HTMLEmbedElement.webidl index 95658bf07805..01ebced01551 100644 --- a/dom/webidl/HTMLEmbedElement.webidl +++ b/dom/webidl/HTMLEmbedElement.webidl @@ -13,9 +13,11 @@ */ // http://www.whatwg.org/specs/web-apps/current-work/#the-embed-element -[HTMLConstructor, NeedResolve, +[NeedResolve, Exposed=Window] interface HTMLEmbedElement : HTMLElement { + [HTMLConstructor] constructor(); + [CEReactions, Pure, SetterThrows] attribute DOMString src; [CEReactions, Pure, SetterThrows] diff --git a/dom/webidl/HTMLFieldSetElement.webidl b/dom/webidl/HTMLFieldSetElement.webidl index 36f99db80851..cc53202b8051 100644 --- a/dom/webidl/HTMLFieldSetElement.webidl +++ b/dom/webidl/HTMLFieldSetElement.webidl @@ -11,9 +11,10 @@ * and create derivative works of this document. */ -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLFieldSetElement : HTMLElement { + [HTMLConstructor] constructor(); + [CEReactions, SetterThrows] attribute boolean disabled; readonly attribute HTMLFormElement? form; diff --git a/dom/webidl/HTMLFontElement.webidl b/dom/webidl/HTMLFontElement.webidl index b16941a0aa9d..f400b5d11f5f 100644 --- a/dom/webidl/HTMLFontElement.webidl +++ b/dom/webidl/HTMLFontElement.webidl @@ -11,9 +11,10 @@ * and create derivative works of this document. */ -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLFontElement : HTMLElement { + [HTMLConstructor] constructor(); + [CEReactions, SetterThrows] attribute [TreatNullAs=EmptyString] DOMString color; [CEReactions, SetterThrows] attribute DOMString face; [CEReactions, SetterThrows] attribute DOMString size; diff --git a/dom/webidl/HTMLFormElement.webidl b/dom/webidl/HTMLFormElement.webidl index 24b3cf6bfd37..6da88e2f39dd 100644 --- a/dom/webidl/HTMLFormElement.webidl +++ b/dom/webidl/HTMLFormElement.webidl @@ -11,9 +11,11 @@ * and create derivative works of this document. */ -[OverrideBuiltins, LegacyUnenumerableNamedProperties, HTMLConstructor, +[OverrideBuiltins, LegacyUnenumerableNamedProperties, Exposed=Window] interface HTMLFormElement : HTMLElement { + [HTMLConstructor] constructor(); + [CEReactions, Pure, SetterThrows] attribute DOMString acceptCharset; [CEReactions, Pure, SetterThrows] diff --git a/dom/webidl/HTMLFrameElement.webidl b/dom/webidl/HTMLFrameElement.webidl index 654662d9025c..2409298f411e 100644 --- a/dom/webidl/HTMLFrameElement.webidl +++ b/dom/webidl/HTMLFrameElement.webidl @@ -11,9 +11,10 @@ */ // http://www.whatwg.org/specs/web-apps/current-work/#htmlframeelement -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLFrameElement : HTMLElement { + [HTMLConstructor] constructor(); + [CEReactions, SetterThrows] attribute DOMString name; [CEReactions, SetterThrows] diff --git a/dom/webidl/HTMLFrameSetElement.webidl b/dom/webidl/HTMLFrameSetElement.webidl index e603bc4ae029..49e6c549563e 100644 --- a/dom/webidl/HTMLFrameSetElement.webidl +++ b/dom/webidl/HTMLFrameSetElement.webidl @@ -11,9 +11,10 @@ * and create derivative works of this document. */ -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLFrameSetElement : HTMLElement { + [HTMLConstructor] constructor(); + [CEReactions, SetterThrows] attribute DOMString cols; [CEReactions, SetterThrows] diff --git a/dom/webidl/HTMLHRElement.webidl b/dom/webidl/HTMLHRElement.webidl index 378affb3bd48..b73c2589dbeb 100644 --- a/dom/webidl/HTMLHRElement.webidl +++ b/dom/webidl/HTMLHRElement.webidl @@ -12,9 +12,10 @@ */ // http://www.whatwg.org/specs/web-apps/current-work/#the-hr-element -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLHRElement : HTMLElement { + [HTMLConstructor] constructor(); + }; // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis diff --git a/dom/webidl/HTMLHeadElement.webidl b/dom/webidl/HTMLHeadElement.webidl index d5273d5045e8..0524a6d8f131 100644 --- a/dom/webidl/HTMLHeadElement.webidl +++ b/dom/webidl/HTMLHeadElement.webidl @@ -12,7 +12,8 @@ */ // http://www.whatwg.org/specs/web-apps/current-work/#the-head-element -[HTMLConstructor, - Exposed=Window] -interface HTMLHeadElement : HTMLElement {}; +[Exposed=Window] +interface HTMLHeadElement : HTMLElement { + [HTMLConstructor] constructor(); +}; diff --git a/dom/webidl/HTMLHeadingElement.webidl b/dom/webidl/HTMLHeadingElement.webidl index d298c8a87e3f..0092388e96ea 100644 --- a/dom/webidl/HTMLHeadingElement.webidl +++ b/dom/webidl/HTMLHeadingElement.webidl @@ -12,9 +12,10 @@ */ // http://www.whatwg.org/specs/web-apps/current-work/#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLHeadingElement : HTMLElement { + [HTMLConstructor] constructor(); + }; // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis diff --git a/dom/webidl/HTMLHtmlElement.webidl b/dom/webidl/HTMLHtmlElement.webidl index 30efaec5015b..38f1b3bc53e4 100644 --- a/dom/webidl/HTMLHtmlElement.webidl +++ b/dom/webidl/HTMLHtmlElement.webidl @@ -13,9 +13,10 @@ */ // http://www.whatwg.org/specs/web-apps/current-work/#the-html-element -[HTMLConstructor, - Exposed=Window] -interface HTMLHtmlElement : HTMLElement {}; +[Exposed=Window] +interface HTMLHtmlElement : HTMLElement { + [HTMLConstructor] constructor(); +}; // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis partial interface HTMLHtmlElement { diff --git a/dom/webidl/HTMLIFrameElement.webidl b/dom/webidl/HTMLIFrameElement.webidl index 60f5ddd28c92..fc786738e478 100644 --- a/dom/webidl/HTMLIFrameElement.webidl +++ b/dom/webidl/HTMLIFrameElement.webidl @@ -13,9 +13,10 @@ * and create derivative works of this document. */ -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLIFrameElement : HTMLElement { + [HTMLConstructor] constructor(); + [CEReactions, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows, Pure] attribute DOMString src; [CEReactions, SetterThrows, Pure] diff --git a/dom/webidl/HTMLImageElement.webidl b/dom/webidl/HTMLImageElement.webidl index 0fb2d1ca3bd4..9e3daa7f7563 100644 --- a/dom/webidl/HTMLImageElement.webidl +++ b/dom/webidl/HTMLImageElement.webidl @@ -16,10 +16,11 @@ interface imgIRequest; interface URI; interface nsIStreamListener; -[HTMLConstructor, - NamedConstructor=Image(optional unsigned long width, optional unsigned long height), +[NamedConstructor=Image(optional unsigned long width, optional unsigned long height), Exposed=Window] interface HTMLImageElement : HTMLElement { + [HTMLConstructor] constructor(); + [CEReactions, SetterThrows] attribute DOMString alt; [CEReactions, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows] diff --git a/dom/webidl/HTMLInputElement.webidl b/dom/webidl/HTMLInputElement.webidl index bb708365a741..bd9c1eb2b33f 100644 --- a/dom/webidl/HTMLInputElement.webidl +++ b/dom/webidl/HTMLInputElement.webidl @@ -22,9 +22,10 @@ enum SelectionMode { interface XULControllers; -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLInputElement : HTMLElement { + [HTMLConstructor] constructor(); + [CEReactions, Pure, SetterThrows] attribute DOMString accept; [CEReactions, Pure, SetterThrows] diff --git a/dom/webidl/HTMLLIElement.webidl b/dom/webidl/HTMLLIElement.webidl index 359b051675e7..f6a667102f9e 100644 --- a/dom/webidl/HTMLLIElement.webidl +++ b/dom/webidl/HTMLLIElement.webidl @@ -13,9 +13,10 @@ */ // http://www.whatwg.org/specs/web-apps/current-work/#the-li-element -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLLIElement : HTMLElement { + [HTMLConstructor] constructor(); + [CEReactions, SetterThrows, Pure] attribute long value; }; diff --git a/dom/webidl/HTMLLabelElement.webidl b/dom/webidl/HTMLLabelElement.webidl index 73cf4fe780ff..6f78a19339da 100644 --- a/dom/webidl/HTMLLabelElement.webidl +++ b/dom/webidl/HTMLLabelElement.webidl @@ -11,9 +11,10 @@ * and create derivative works of this document. */ -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLLabelElement : HTMLElement { + [HTMLConstructor] constructor(); + readonly attribute HTMLFormElement? form; [CEReactions] attribute DOMString htmlFor; diff --git a/dom/webidl/HTMLLegendElement.webidl b/dom/webidl/HTMLLegendElement.webidl index 2e0cf4e3403b..075af8b1a9c0 100644 --- a/dom/webidl/HTMLLegendElement.webidl +++ b/dom/webidl/HTMLLegendElement.webidl @@ -13,9 +13,10 @@ */ // http://www.whatwg.org/specs/web-apps/current-work/#the-legend-element -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLLegendElement : HTMLElement { + [HTMLConstructor] constructor(); + readonly attribute HTMLFormElement? form; }; diff --git a/dom/webidl/HTMLLinkElement.webidl b/dom/webidl/HTMLLinkElement.webidl index 98658e1e9dc9..dbde671bc7dc 100644 --- a/dom/webidl/HTMLLinkElement.webidl +++ b/dom/webidl/HTMLLinkElement.webidl @@ -12,9 +12,10 @@ */ // http://www.whatwg.org/specs/web-apps/current-work/#the-link-element -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLLinkElement : HTMLElement { + [HTMLConstructor] constructor(); + [CEReactions, SetterThrows, Pure] attribute boolean disabled; [CEReactions, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows, Pure] diff --git a/dom/webidl/HTMLMapElement.webidl b/dom/webidl/HTMLMapElement.webidl index 1e241a15b496..038fd108e16d 100644 --- a/dom/webidl/HTMLMapElement.webidl +++ b/dom/webidl/HTMLMapElement.webidl @@ -11,9 +11,10 @@ */ // http://www.whatwg.org/specs/web-apps/current-work/#the-map-element -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLMapElement : HTMLElement { + [HTMLConstructor] constructor(); + [CEReactions, SetterThrows, Pure] attribute DOMString name; [Constant] diff --git a/dom/webidl/HTMLMarqueeElement.webidl b/dom/webidl/HTMLMarqueeElement.webidl index d8b3236c721b..a755dc6c48e4 100644 --- a/dom/webidl/HTMLMarqueeElement.webidl +++ b/dom/webidl/HTMLMarqueeElement.webidl @@ -12,9 +12,10 @@ // https://html.spec.whatwg.org/multipage/obsolete.html#the-marquee-element -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLMarqueeElement : HTMLElement { + [HTMLConstructor] constructor(); + [CEReactions, SetterThrows] attribute DOMString behavior; [CEReactions, SetterThrows] attribute DOMString bgColor; [CEReactions, SetterThrows] attribute DOMString direction; diff --git a/dom/webidl/HTMLMenuElement.webidl b/dom/webidl/HTMLMenuElement.webidl index 6262ce7e7a29..c2c027fd3992 100644 --- a/dom/webidl/HTMLMenuElement.webidl +++ b/dom/webidl/HTMLMenuElement.webidl @@ -15,9 +15,10 @@ interface MenuBuilder; // http://www.whatwg.org/specs/web-apps/current-work/#the-menu-element -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLMenuElement : HTMLElement { + [HTMLConstructor] constructor(); + [CEReactions, SetterThrows] attribute DOMString type; [CEReactions, SetterThrows] diff --git a/dom/webidl/HTMLMenuItemElement.webidl b/dom/webidl/HTMLMenuItemElement.webidl index fd3f4842c72d..ccaae36e13f7 100644 --- a/dom/webidl/HTMLMenuItemElement.webidl +++ b/dom/webidl/HTMLMenuItemElement.webidl @@ -12,9 +12,10 @@ */ // http://www.whatwg.org/specs/web-apps/current-work/#the-menuitem-element -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLMenuItemElement : HTMLElement { + [HTMLConstructor] constructor(); + [CEReactions, SetterThrows] attribute DOMString type; [CEReactions, SetterThrows] diff --git a/dom/webidl/HTMLMetaElement.webidl b/dom/webidl/HTMLMetaElement.webidl index ebb0c3fec321..148203f5d8eb 100644 --- a/dom/webidl/HTMLMetaElement.webidl +++ b/dom/webidl/HTMLMetaElement.webidl @@ -12,9 +12,10 @@ */ // http://www.whatwg.org/specs/web-apps/current-work/#the-meta-element -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLMetaElement : HTMLElement { + [HTMLConstructor] constructor(); + [CEReactions, SetterThrows, Pure] attribute DOMString name; [CEReactions, SetterThrows, Pure] diff --git a/dom/webidl/HTMLMeterElement.webidl b/dom/webidl/HTMLMeterElement.webidl index cd2aacbe1bec..36a6a1d8f579 100644 --- a/dom/webidl/HTMLMeterElement.webidl +++ b/dom/webidl/HTMLMeterElement.webidl @@ -12,9 +12,10 @@ */ // http://www.whatwg.org/specs/web-apps/current-work/#the-meter-element -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLMeterElement : HTMLElement { + [HTMLConstructor] constructor(); + [CEReactions, SetterThrows] attribute double value; [CEReactions, SetterThrows] diff --git a/dom/webidl/HTMLModElement.webidl b/dom/webidl/HTMLModElement.webidl index f89a5bcac8a7..afc040123bc7 100644 --- a/dom/webidl/HTMLModElement.webidl +++ b/dom/webidl/HTMLModElement.webidl @@ -11,9 +11,10 @@ */ // http://www.whatwg.org/specs/web-apps/current-work/#attributes-common-to-ins-and-del-elements -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLModElement : HTMLElement { + [HTMLConstructor] constructor(); + [CEReactions, SetterThrows, Pure] attribute DOMString cite; [CEReactions, SetterThrows, Pure] diff --git a/dom/webidl/HTMLOListElement.webidl b/dom/webidl/HTMLOListElement.webidl index 8e3041067db6..269c4bfd1e17 100644 --- a/dom/webidl/HTMLOListElement.webidl +++ b/dom/webidl/HTMLOListElement.webidl @@ -13,9 +13,10 @@ */ // http://www.whatwg.org/specs/web-apps/current-work/#the-ol-element -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLOListElement : HTMLElement { + [HTMLConstructor] constructor(); + [CEReactions, SetterThrows] attribute boolean reversed; [CEReactions, SetterThrows] diff --git a/dom/webidl/HTMLObjectElement.webidl b/dom/webidl/HTMLObjectElement.webidl index 5589a8589c60..53f0cc622161 100644 --- a/dom/webidl/HTMLObjectElement.webidl +++ b/dom/webidl/HTMLObjectElement.webidl @@ -13,9 +13,11 @@ */ // http://www.whatwg.org/specs/web-apps/current-work/#the-object-element -[HTMLConstructor, NeedResolve, +[NeedResolve, Exposed=Window] interface HTMLObjectElement : HTMLElement { + [HTMLConstructor] constructor(); + [CEReactions, Pure, SetterThrows] attribute DOMString data; [CEReactions, Pure, SetterThrows] diff --git a/dom/webidl/HTMLOptGroupElement.webidl b/dom/webidl/HTMLOptGroupElement.webidl index b674b1af0472..926c59a31d98 100644 --- a/dom/webidl/HTMLOptGroupElement.webidl +++ b/dom/webidl/HTMLOptGroupElement.webidl @@ -11,9 +11,10 @@ * and create derivative works of this document. */ -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLOptGroupElement : HTMLElement { + [HTMLConstructor] constructor(); + [CEReactions, SetterThrows] attribute boolean disabled; [CEReactions, SetterThrows] diff --git a/dom/webidl/HTMLOptionElement.webidl b/dom/webidl/HTMLOptionElement.webidl index d952ba0e0697..9b04a517eefe 100644 --- a/dom/webidl/HTMLOptionElement.webidl +++ b/dom/webidl/HTMLOptionElement.webidl @@ -11,9 +11,11 @@ * and create derivative works of this document. */ -[HTMLConstructor, NamedConstructor=Option(optional DOMString text = "", optional DOMString value, optional boolean defaultSelected = false, optional boolean selected = false), +[NamedConstructor=Option(optional DOMString text = "", optional DOMString value, optional boolean defaultSelected = false, optional boolean selected = false), Exposed=Window] interface HTMLOptionElement : HTMLElement { + [HTMLConstructor] constructor(); + [CEReactions, SetterThrows] attribute boolean disabled; readonly attribute HTMLFormElement? form; diff --git a/dom/webidl/HTMLOutputElement.webidl b/dom/webidl/HTMLOutputElement.webidl index 3fdac5ae083d..732ef5548a9b 100644 --- a/dom/webidl/HTMLOutputElement.webidl +++ b/dom/webidl/HTMLOutputElement.webidl @@ -12,9 +12,10 @@ */ // http://www.whatwg.org/specs/web-apps/current-work/#the-output-element -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLOutputElement : HTMLElement { + [HTMLConstructor] constructor(); + [PutForwards=value, Constant] readonly attribute DOMTokenList htmlFor; readonly attribute HTMLFormElement? form; diff --git a/dom/webidl/HTMLParagraphElement.webidl b/dom/webidl/HTMLParagraphElement.webidl index 986ff02b0fd5..f5d0bfd36aba 100644 --- a/dom/webidl/HTMLParagraphElement.webidl +++ b/dom/webidl/HTMLParagraphElement.webidl @@ -12,9 +12,10 @@ */ // http://www.whatwg.org/specs/web-apps/current-work/#the-p-element -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLParagraphElement : HTMLElement { + [HTMLConstructor] constructor(); + }; // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis diff --git a/dom/webidl/HTMLParamElement.webidl b/dom/webidl/HTMLParamElement.webidl index 42738734dc8a..1fadfc6da6e4 100644 --- a/dom/webidl/HTMLParamElement.webidl +++ b/dom/webidl/HTMLParamElement.webidl @@ -13,9 +13,10 @@ */ // http://www.whatwg.org/specs/web-apps/current-work/#the-param-element -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLParamElement : HTMLElement { + [HTMLConstructor] constructor(); + [CEReactions, SetterThrows, Pure] attribute DOMString name; [CEReactions, SetterThrows, Pure] diff --git a/dom/webidl/HTMLPictureElement.webidl b/dom/webidl/HTMLPictureElement.webidl index bbcfc2435ed9..520ff9e01199 100644 --- a/dom/webidl/HTMLPictureElement.webidl +++ b/dom/webidl/HTMLPictureElement.webidl @@ -4,7 +4,8 @@ * You can obtain one at http://mozilla.org/MPL/2.0/. */ -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLPictureElement : HTMLElement { + [HTMLConstructor] constructor(); + }; diff --git a/dom/webidl/HTMLPreElement.webidl b/dom/webidl/HTMLPreElement.webidl index bcb504014abf..f13fc8519532 100644 --- a/dom/webidl/HTMLPreElement.webidl +++ b/dom/webidl/HTMLPreElement.webidl @@ -12,9 +12,10 @@ */ // http://www.whatwg.org/specs/web-apps/current-work/#the-pre-element -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLPreElement : HTMLElement { + [HTMLConstructor] constructor(); + }; // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis diff --git a/dom/webidl/HTMLProgressElement.webidl b/dom/webidl/HTMLProgressElement.webidl index 5e02365e351d..e5326375ff36 100644 --- a/dom/webidl/HTMLProgressElement.webidl +++ b/dom/webidl/HTMLProgressElement.webidl @@ -11,9 +11,10 @@ * and create derivative works of this document. */ -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLProgressElement : HTMLElement { + [HTMLConstructor] constructor(); + [CEReactions, SetterThrows] attribute double value; [CEReactions, SetterThrows] diff --git a/dom/webidl/HTMLQuoteElement.webidl b/dom/webidl/HTMLQuoteElement.webidl index 174de430e968..aaf3f3898556 100644 --- a/dom/webidl/HTMLQuoteElement.webidl +++ b/dom/webidl/HTMLQuoteElement.webidl @@ -12,9 +12,10 @@ */ // http://www.whatwg.org/specs/web-apps/current-work/#the-blockquote-element -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLQuoteElement : HTMLElement { + [HTMLConstructor] constructor(); + [CEReactions, SetterThrows, Pure] attribute DOMString cite; }; diff --git a/dom/webidl/HTMLScriptElement.webidl b/dom/webidl/HTMLScriptElement.webidl index 8284844f0735..a31e07b7b683 100644 --- a/dom/webidl/HTMLScriptElement.webidl +++ b/dom/webidl/HTMLScriptElement.webidl @@ -8,9 +8,10 @@ * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis */ -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLScriptElement : HTMLElement { + [HTMLConstructor] constructor(); + [CEReactions, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows] attribute DOMString src; [CEReactions, SetterThrows] diff --git a/dom/webidl/HTMLSelectElement.webidl b/dom/webidl/HTMLSelectElement.webidl index 567f2d2f3f25..0dd3d862247c 100644 --- a/dom/webidl/HTMLSelectElement.webidl +++ b/dom/webidl/HTMLSelectElement.webidl @@ -7,9 +7,10 @@ * http://www.whatwg.org/html/#the-select-element */ -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLSelectElement : HTMLElement { + [HTMLConstructor] constructor(); + [CEReactions, SetterThrows, Pure] attribute boolean autofocus; [CEReactions, SetterThrows, Pure] diff --git a/dom/webidl/HTMLSlotElement.webidl b/dom/webidl/HTMLSlotElement.webidl index 1042d1243bd7..7488e398b95b 100644 --- a/dom/webidl/HTMLSlotElement.webidl +++ b/dom/webidl/HTMLSlotElement.webidl @@ -11,8 +11,10 @@ * and create derivative works of this document. */ -[Exposed=Window, HTMLConstructor] +[Exposed=Window] interface HTMLSlotElement : HTMLElement { + [HTMLConstructor] constructor(); + [CEReactions, SetterThrows] attribute DOMString name; sequence assignedNodes(optional AssignedNodesOptions options = {}); sequence assignedElements(optional AssignedNodesOptions options = {}); diff --git a/dom/webidl/HTMLSourceElement.webidl b/dom/webidl/HTMLSourceElement.webidl index c0d7dde55dbc..e0fcdc4f521c 100644 --- a/dom/webidl/HTMLSourceElement.webidl +++ b/dom/webidl/HTMLSourceElement.webidl @@ -11,9 +11,10 @@ * and create derivative works of this document. */ -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLSourceElement : HTMLElement { + [HTMLConstructor] constructor(); + [CEReactions, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows] attribute DOMString src; [CEReactions, SetterThrows] diff --git a/dom/webidl/HTMLSpanElement.webidl b/dom/webidl/HTMLSpanElement.webidl index 314ff5b3e556..b8c723bd3f6c 100644 --- a/dom/webidl/HTMLSpanElement.webidl +++ b/dom/webidl/HTMLSpanElement.webidl @@ -12,6 +12,7 @@ */ // http://www.whatwg.org/specs/web-apps/current-work/#the-span-element -[HTMLConstructor, - Exposed=Window] -interface HTMLSpanElement : HTMLElement {}; +[Exposed=Window] +interface HTMLSpanElement : HTMLElement { + [HTMLConstructor] constructor(); +}; diff --git a/dom/webidl/HTMLStyleElement.webidl b/dom/webidl/HTMLStyleElement.webidl index f047f783257a..8720a671d3fd 100644 --- a/dom/webidl/HTMLStyleElement.webidl +++ b/dom/webidl/HTMLStyleElement.webidl @@ -8,9 +8,10 @@ * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis */ -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLStyleElement : HTMLElement { + [HTMLConstructor] constructor(); + [Pure] attribute boolean disabled; [CEReactions, SetterThrows, Pure] diff --git a/dom/webidl/HTMLTableCaptionElement.webidl b/dom/webidl/HTMLTableCaptionElement.webidl index 133a61fcc380..6112fe6f310d 100644 --- a/dom/webidl/HTMLTableCaptionElement.webidl +++ b/dom/webidl/HTMLTableCaptionElement.webidl @@ -11,9 +11,10 @@ * and create derivative works of this document. */ -[HTMLConstructor, - Exposed=Window] -interface HTMLTableCaptionElement : HTMLElement {}; +[Exposed=Window] +interface HTMLTableCaptionElement : HTMLElement { + [HTMLConstructor] constructor(); +}; partial interface HTMLTableCaptionElement { [CEReactions, SetterThrows] diff --git a/dom/webidl/HTMLTableCellElement.webidl b/dom/webidl/HTMLTableCellElement.webidl index 8f3247459c37..041e798b8318 100644 --- a/dom/webidl/HTMLTableCellElement.webidl +++ b/dom/webidl/HTMLTableCellElement.webidl @@ -11,9 +11,10 @@ * and create derivative works of this document. */ -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLTableCellElement : HTMLElement { + [HTMLConstructor] constructor(); + [CEReactions, SetterThrows] attribute unsigned long colSpan; [CEReactions, SetterThrows] diff --git a/dom/webidl/HTMLTableColElement.webidl b/dom/webidl/HTMLTableColElement.webidl index 0a977e618760..c17a78c92545 100644 --- a/dom/webidl/HTMLTableColElement.webidl +++ b/dom/webidl/HTMLTableColElement.webidl @@ -11,9 +11,10 @@ * and create derivative works of this document. */ -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLTableColElement : HTMLElement { + [HTMLConstructor] constructor(); + [CEReactions, SetterThrows] attribute unsigned long span; }; diff --git a/dom/webidl/HTMLTableElement.webidl b/dom/webidl/HTMLTableElement.webidl index 3362b8e41f3f..343f0f701890 100644 --- a/dom/webidl/HTMLTableElement.webidl +++ b/dom/webidl/HTMLTableElement.webidl @@ -11,9 +11,10 @@ * and create derivative works of this document. */ -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLTableElement : HTMLElement { + [HTMLConstructor] constructor(); + [CEReactions, SetterThrows] attribute HTMLTableCaptionElement? caption; HTMLElement createCaption(); diff --git a/dom/webidl/HTMLTableRowElement.webidl b/dom/webidl/HTMLTableRowElement.webidl index a851baf67646..a8f455c7fdb9 100644 --- a/dom/webidl/HTMLTableRowElement.webidl +++ b/dom/webidl/HTMLTableRowElement.webidl @@ -11,9 +11,10 @@ * and create derivative works of this document. */ -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLTableRowElement : HTMLElement { + [HTMLConstructor] constructor(); + readonly attribute long rowIndex; readonly attribute long sectionRowIndex; readonly attribute HTMLCollection cells; diff --git a/dom/webidl/HTMLTableSectionElement.webidl b/dom/webidl/HTMLTableSectionElement.webidl index 2adb75a47733..0724492926bb 100644 --- a/dom/webidl/HTMLTableSectionElement.webidl +++ b/dom/webidl/HTMLTableSectionElement.webidl @@ -11,9 +11,10 @@ * and create derivative works of this document. */ -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLTableSectionElement : HTMLElement { + [HTMLConstructor] constructor(); + readonly attribute HTMLCollection rows; [Throws] HTMLElement insertRow(optional long index = -1); diff --git a/dom/webidl/HTMLTemplateElement.webidl b/dom/webidl/HTMLTemplateElement.webidl index ccb13151dca1..3728e986e543 100644 --- a/dom/webidl/HTMLTemplateElement.webidl +++ b/dom/webidl/HTMLTemplateElement.webidl @@ -9,9 +9,10 @@ * liability, trademark and document use rules apply. */ -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLTemplateElement : HTMLElement { + [HTMLConstructor] constructor(); + readonly attribute DocumentFragment content; }; diff --git a/dom/webidl/HTMLTextAreaElement.webidl b/dom/webidl/HTMLTextAreaElement.webidl index a48b1ab40a21..f66818c37285 100644 --- a/dom/webidl/HTMLTextAreaElement.webidl +++ b/dom/webidl/HTMLTextAreaElement.webidl @@ -14,9 +14,10 @@ interface nsIEditor; interface XULControllers; -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLTextAreaElement : HTMLElement { + [HTMLConstructor] constructor(); + [CEReactions, SetterThrows, Pure] attribute DOMString autocomplete; [CEReactions, SetterThrows, Pure] diff --git a/dom/webidl/HTMLTimeElement.webidl b/dom/webidl/HTMLTimeElement.webidl index 10b9fd37697d..3f0d8733ebce 100644 --- a/dom/webidl/HTMLTimeElement.webidl +++ b/dom/webidl/HTMLTimeElement.webidl @@ -7,9 +7,10 @@ * http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-time-element */ -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLTimeElement : HTMLElement { + [HTMLConstructor] constructor(); + [CEReactions, SetterThrows] attribute DOMString dateTime; }; diff --git a/dom/webidl/HTMLTitleElement.webidl b/dom/webidl/HTMLTitleElement.webidl index fbc9e4455371..25f4b9fbef7b 100644 --- a/dom/webidl/HTMLTitleElement.webidl +++ b/dom/webidl/HTMLTitleElement.webidl @@ -7,9 +7,10 @@ * http://www.whatwg.org/specs/web-apps/current-work/#the-title-element */ -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLTitleElement : HTMLElement { + [HTMLConstructor] constructor(); + [CEReactions, Throws] attribute DOMString text; }; diff --git a/dom/webidl/HTMLTrackElement.webidl b/dom/webidl/HTMLTrackElement.webidl index 4ebb77678587..67558f6cbcf8 100644 --- a/dom/webidl/HTMLTrackElement.webidl +++ b/dom/webidl/HTMLTrackElement.webidl @@ -7,9 +7,10 @@ * http://www.whatwg.org/specs/web-apps/current-work/#the-track-element */ -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLTrackElement : HTMLElement { + [HTMLConstructor] constructor(); + [CEReactions, SetterThrows, Pure] attribute DOMString kind; [CEReactions, SetterThrows, Pure] diff --git a/dom/webidl/HTMLUListElement.webidl b/dom/webidl/HTMLUListElement.webidl index 962ea6f71e29..447524c48cef 100644 --- a/dom/webidl/HTMLUListElement.webidl +++ b/dom/webidl/HTMLUListElement.webidl @@ -13,9 +13,10 @@ */ // http://www.whatwg.org/specs/web-apps/current-work/#the-ul-element -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLUListElement : HTMLElement { + [HTMLConstructor] constructor(); + }; // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis diff --git a/dom/webidl/HTMLVideoElement.webidl b/dom/webidl/HTMLVideoElement.webidl index 2db15aa3553a..d5555feb108e 100644 --- a/dom/webidl/HTMLVideoElement.webidl +++ b/dom/webidl/HTMLVideoElement.webidl @@ -11,9 +11,10 @@ * and create derivative works of this document. */ -[HTMLConstructor, - Exposed=Window] +[Exposed=Window] interface HTMLVideoElement : HTMLMediaElement { + [HTMLConstructor] constructor(); + [CEReactions, SetterThrows] attribute unsigned long width; [CEReactions, SetterThrows] diff --git a/dom/webidl/XULElement.webidl b/dom/webidl/XULElement.webidl index 0e09cf6cebf1..8292ea1445a9 100644 --- a/dom/webidl/XULElement.webidl +++ b/dom/webidl/XULElement.webidl @@ -6,9 +6,11 @@ interface XULControllers; -[HTMLConstructor, Func="IsChromeOrXBL", +[Func="IsChromeOrXBL", Exposed=Window] interface XULElement : Element { + [HTMLConstructor] constructor(); + // Layout properties [SetterThrows] attribute DOMString align; diff --git a/dom/webidl/XULPopupElement.webidl b/dom/webidl/XULPopupElement.webidl index 9749eee2d18c..b42934bfea79 100644 --- a/dom/webidl/XULPopupElement.webidl +++ b/dom/webidl/XULPopupElement.webidl @@ -20,10 +20,12 @@ dictionary OpenPopupOptions { typedef (DOMString or OpenPopupOptions) StringOrOpenPopupOptions; -[HTMLConstructor, Func="IsChromeOrXBL", +[Func="IsChromeOrXBL", Exposed=Window] interface XULPopupElement : XULElement { + [HTMLConstructor] constructor(); + /** * Allow the popup to automatically position itself. */