diff options
author | bors-servo <servo-ops@mozilla.com> | 2022-01-16 23:06:45 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-16 23:06:45 -0500 |
commit | 35e95f55a1b9e488d1c796c8fb39d764d090d660 (patch) | |
tree | 75335911acb4ca6afe12bcbd02df9cc61d8eca38 /components | |
parent | 3391772551128a6f2a56093d7a53e91b9dcaaf01 (diff) | |
parent | 5b38981b5b03cb5f137a0183e156acfe10c93dcd (diff) | |
download | servo-35e95f55a1b9e488d1c796c8fb39d764d090d660.tar.gz servo-35e95f55a1b9e488d1c796c8fb39d764d090d660.zip |
Auto merge of #28663 - saschanaz:void-undefined, r=jdm
Convert Web IDL void to undefined
<!-- Please describe your changes on the following line: -->
Thanks to my tool https://github.com/saschanaz/gecko-webidl 🙌
Build is failing on my current VS2022+Python 3.10 environment, but the IDL tests are passing anyway, so...
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #27660
<!-- Either: -->
- [x] There are tests for these changes
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Diffstat (limited to 'components')
159 files changed, 1162 insertions, 1144 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py index e8e5bfbab4f..046f7984858 100644 --- a/components/script/dom/bindings/codegen/CodegenRust.py +++ b/components/script/dom/bindings/codegen/CodegenRust.py @@ -1188,7 +1188,7 @@ def getJSToNativeConversionInfo(type, descriptorProvider, failureCode=None, return handleOptional(template, declType, handleDefault(empty)) - if type.isVoid(): + if type.isUndefined(): # This one only happens for return values, and its easy: Just # ignore the jsval. return JSToNativeConversionInfo("", None, None) @@ -1439,7 +1439,7 @@ def getConversionConfigForType(type, isEnforceRange, isClamp, treatNullAs): # Returns a CGThing containing the type of the return value. def getRetvalDeclarationForType(returnType, descriptorProvider): - if returnType is None or returnType.isVoid(): + if returnType is None or returnType.isUndefined(): # Nothing to declare return CGGeneric("()") if returnType.isPrimitive() and returnType.tag() in builtinNames: @@ -4338,7 +4338,7 @@ class CGMemberJITInfo(CGThing): result += self.defineJitInfo(setterinfo, setter, "Setter", False, False, "AliasEverything", False, False, "0", - [BuiltinTypes[IDLBuiltinType.Types.void]], + [BuiltinTypes[IDLBuiltinType.Types.undefined]], None) return result if self.member.isMethod(): @@ -4426,7 +4426,7 @@ class CGMemberJITInfo(CGThing): if t.nullable(): # Sometimes it might return null, sometimes not return "JSVAL_TYPE_UNKNOWN" - if t.isVoid(): + if t.isUndefined(): # No return, every time return "JSVAL_TYPE_UNDEFINED" if t.isSequence(): @@ -4500,7 +4500,7 @@ class CGMemberJITInfo(CGThing): @staticmethod def getJSArgType(t): - assert not t.isVoid() + assert not t.isUndefined() if t.nullable(): # Sometimes it might return null, sometimes not return "JSJitInfo_ArgType::Null as i32 | %s" % CGMemberJITInfo.getJSArgType(t.inner) @@ -7336,7 +7336,7 @@ class CGNativeMember(ClassMethod): # Mark our getters, which are attrs that # have a non-void return type, as const. const=(not member.isStatic() and member.isAttr() - and not signature[0].isVoid()), + and not signature[0].isUndefined()), breakAfterSelf=breakAfterSelf, unsafe=unsafe, visibility=visibility) @@ -7608,7 +7608,7 @@ class CallbackMember(CGNativeMember): convertType = instantiateJSToNativeConversionTemplate( template, replacements, declType, "rvalDecl") - if self.retvalType is None or self.retvalType.isVoid(): + if self.retvalType is None or self.retvalType.isUndefined(): retval = "()" elif self.retvalType.isAny(): retval = "rvalDecl.get()" diff --git a/components/script/dom/bindings/codegen/parser/WebIDL.py b/components/script/dom/bindings/codegen/parser/WebIDL.py index d74278c3e0c..e317087837d 100644 --- a/components/script/dom/bindings/codegen/parser/WebIDL.py +++ b/components/script/dom/bindings/codegen/parser/WebIDL.py @@ -2093,7 +2093,7 @@ class IDLType(IDLObject): 'utf8string', 'jsstring', 'object', - 'void', + 'undefined', # Funny stuff 'interface', 'dictionary', @@ -2168,8 +2168,8 @@ class IDLType(IDLObject): def isJSString(self): return False - def isVoid(self): - return self.name == "Void" + def isUndefined(self): + return self.name == "Undefined" def isSequence(self): return False @@ -2355,7 +2355,7 @@ class IDLParametrizedType(IDLType): class IDLNullableType(IDLParametrizedType): def __init__(self, location, innerType): - assert not innerType.isVoid() + assert not innerType.isUndefined() assert not innerType == BuiltinTypes[IDLBuiltinType.Types.any] IDLParametrizedType.__init__(self, location, None, innerType) @@ -2414,7 +2414,7 @@ class IDLNullableType(IDLParametrizedType): def isInteger(self): return self.inner.isInteger() - def isVoid(self): + def isUndefined(self): return False def isSequence(self): @@ -2517,7 +2517,7 @@ class IDLNullableType(IDLParametrizedType): class IDLSequenceType(IDLParametrizedType): def __init__(self, location, parameterType): - assert not parameterType.isVoid() + assert not parameterType.isUndefined() IDLParametrizedType.__init__(self, location, parameterType.name, parameterType) # Need to set self.name up front if our inner type is already complete, @@ -2561,7 +2561,7 @@ class IDLSequenceType(IDLParametrizedType): def isJSString(self): return False - def isVoid(self): + def isUndefined(self): return False def isSequence(self): @@ -2602,7 +2602,7 @@ class IDLRecordType(IDLParametrizedType): def __init__(self, location, keyType, valueType): assert keyType.isString() assert keyType.isComplete() - assert not valueType.isVoid() + assert not valueType.isUndefined() IDLParametrizedType.__init__(self, location, valueType.name, valueType) self.keyType = keyType @@ -2673,7 +2673,7 @@ class IDLUnionType(IDLType): def prettyName(self): return "(" + " or ".join(m.prettyName() for m in self.memberTypes) + ")" - def isVoid(self): + def isUndefined(self): return False def isUnion(self): @@ -2836,8 +2836,8 @@ class IDLTypedefType(IDLType): def isJSString(self): return self.inner.isJSString() - def isVoid(self): - return self.inner.isVoid() + def isUndefined(self): + return self.inner.isUndefined() def isJSONType(self): return self.inner.isJSONType() @@ -2972,7 +2972,7 @@ class IDLWrapperType(IDLType): def isJSString(self): return False - def isVoid(self): + def isUndefined(self): return False def isSequence(self): @@ -3178,7 +3178,7 @@ class IDLBuiltinType(IDLType): 'utf8string', 'jsstring', 'object', - 'void', + 'undefined', # Funny stuff 'ArrayBuffer', 'ArrayBufferView', @@ -3215,7 +3215,7 @@ class IDLBuiltinType(IDLType): Types.utf8string: IDLType.Tags.utf8string, Types.jsstring: IDLType.Tags.jsstring, Types.object: IDLType.Tags.object, - Types.void: IDLType.Tags.void, + Types.undefined: IDLType.Tags.undefined, Types.ArrayBuffer: IDLType.Tags.interface, Types.ArrayBufferView: IDLType.Tags.interface, Types.Int8Array: IDLType.Tags.interface, @@ -3251,7 +3251,7 @@ class IDLBuiltinType(IDLType): Types.utf8string: "USVString", # That's what it is in spec terms Types.jsstring: "USVString", # Again, that's what it is in spec terms Types.object: "object", - Types.void: "void", + Types.undefined: "undefined", Types.ArrayBuffer: "ArrayBuffer", Types.ArrayBufferView: "ArrayBufferView", Types.Int8Array: "Int8Array", @@ -3456,8 +3456,8 @@ class IDLBuiltinType(IDLType): return False if self.isObject(): return other.isPrimitive() or other.isString() or other.isEnum() - if self.isVoid(): - return not other.isVoid() + if self.isUndefined(): + return not other.isUndefined() # Not much else we could be! assert self.isSpiderMonkeyInterface() # Like interfaces, but we know we're not a callback @@ -3591,9 +3591,9 @@ BuiltinTypes = { IDLBuiltinType.Types.object: IDLBuiltinType(BuiltinLocation("<builtin type>"), "Object", IDLBuiltinType.Types.object), - IDLBuiltinType.Types.void: - IDLBuiltinType(BuiltinLocation("<builtin type>"), "Void", - IDLBuiltinType.Types.void), + IDLBuiltinType.Types.undefined: + IDLBuiltinType(BuiltinLocation("<builtin type>"), "Undefined", + IDLBuiltinType.Types.undefined), IDLBuiltinType.Types.ArrayBuffer: IDLBuiltinType(BuiltinLocation("<builtin type>"), "ArrayBuffer", IDLBuiltinType.Types.ArrayBuffer), @@ -4196,9 +4196,9 @@ class IDLIterable(IDLMaplikeOrSetlikeOrIterableBase): self.addMethod("values", members, False, self.iteratorType, affectsNothing=True, newObject=True) - # void forEach(callback(valueType, keyType), optional any thisArg) + # undefined forEach(callback(valueType, keyType), optional any thisArg) self.addMethod("forEach", members, False, - BuiltinTypes[IDLBuiltinType.Types.void], + BuiltinTypes[IDLBuiltinType.Types.undefined], self.getForEachArguments()) def isValueIterator(self): @@ -4256,8 +4256,8 @@ class IDLMaplikeOrSetlike(IDLMaplikeOrSetlikeOrIterableBase): self.addMethod("values", members, False, BuiltinTypes[IDLBuiltinType.Types.object], affectsNothing=True, isIteratorAlias=self.isSetlike()) - # void forEach(callback(valueType, keyType), thisVal) - self.addMethod("forEach", members, False, BuiltinTypes[IDLBuiltinType.Types.void], + # undefined forEach(callback(valueType, keyType), thisVal) + self.addMethod("forEach", members, False, BuiltinTypes[IDLBuiltinType.Types.undefined], self.getForEachArguments()) def getKeyArg(): @@ -4270,8 +4270,8 @@ class IDLMaplikeOrSetlike(IDLMaplikeOrSetlikeOrIterableBase): [getKeyArg()], isPure=True) if not self.readonly: - # void clear() - self.addMethod("clear", members, True, BuiltinTypes[IDLBuiltinType.Types.void], + # undefined clear() + self.addMethod("clear", members, True, BuiltinTypes[IDLBuiltinType.Types.undefined], []) # boolean delete(keyType key) self.addMethod("delete", members, True, @@ -4280,8 +4280,8 @@ class IDLMaplikeOrSetlike(IDLMaplikeOrSetlikeOrIterableBase): # Always generate underscored functions (e.g. __add, __clear) for js # implemented interfaces as convenience functions. if isJSImplemented: - # void clear() - self.addMethod("clear", members, True, BuiltinTypes[IDLBuiltinType.Types.void], + # undefined clear() + self.addMethod("clear", members, True, BuiltinTypes[IDLBuiltinType.Types.undefined], [], chromeOnly=True) # boolean delete(keyType key) self.addMethod("delete", members, True, @@ -5119,7 +5119,7 @@ class IDLMethod(IDLInterfaceMember, IDLScope): assert (arguments[0].type == BuiltinTypes[IDLBuiltinType.Types.domstring] or arguments[0].type == BuiltinTypes[IDLBuiltinType.Types.unsigned_long]) assert not arguments[0].optional and not arguments[0].variadic - assert not self._getter or not overload.returnType.isVoid() + assert not self._getter or not overload.returnType.isUndefined() if self._setter: assert len(self._overloads) == 1 @@ -5480,8 +5480,8 @@ class IDLMethod(IDLInterfaceMember, IDLScope): # This is called before we've done overload resolution overloads = self._overloads assert len(overloads) == 1 - if not overloads[0].returnType.isVoid(): - raise WebIDLError("[LenientFloat] used on a non-void method", + if not overloads[0].returnType.isUndefined(): + raise WebIDLError("[LenientFloat] used on a non-undefined returning method", [attr.location, self.location]) if not overloads[0].includesRestrictedFloatArgument(): raise WebIDLError("[LenientFloat] used on an operation with no " @@ -5837,7 +5837,7 @@ class Tokenizer(object): "record": "RECORD", "short": "SHORT", "unsigned": "UNSIGNED", - "void": "VOID", + "undefined": "UNDEFINED", ":": "COLON", ";": "SEMICOLON", "{": "LBRACE", @@ -6722,8 +6722,8 @@ class Parser(Tokenizer): "optional" if arguments[0].optional else "variadic"), [arguments[0].location]) if getter: - if returnType.isVoid(): - raise WebIDLError("getter cannot have void return type", + if returnType.isUndefined(): + raise WebIDLError("getter cannot have undefined return type", [self.getLocation(p, 2)]) if setter: if len(arguments) != 2: @@ -7103,7 +7103,7 @@ class Parser(Tokenizer): | SYMBOL | TRUE | UNSIGNED - | VOID + | UNDEFINED | ArgumentNameKeyword """ pass @@ -7145,7 +7145,7 @@ class Parser(Tokenizer): """ p[0] = BuiltinTypes[IDLBuiltinType.Types.any] - # Note: Promise<void> is allowed, so we want to parametrize on ReturnType, + # Note: Promise<undefined> is allowed, so we want to parametrize on ReturnType, # not Type. Promise types can't be null, hence no "Null" in there. def p_SingleTypePromiseType(self, p): """ @@ -7413,11 +7413,11 @@ class Parser(Tokenizer): """ p[0] = p[1] - def p_ReturnTypeVoid(self, p): + def p_ReturnTypeUndefined(self, p): """ - ReturnType : VOID + ReturnType : UNDEFINED """ - p[0] = BuiltinTypes[IDLBuiltinType.Types.void] + p[0] = BuiltinTypes[IDLBuiltinType.Types.undefined] def p_ScopedName(self, p): """ diff --git a/components/script/dom/bindings/codegen/parser/tests/test_argument_identifier_conflicts.py b/components/script/dom/bindings/codegen/parser/tests/test_argument_identifier_conflicts.py index eb1f6d3c92e..9ae85531fa3 100644 --- a/components/script/dom/bindings/codegen/parser/tests/test_argument_identifier_conflicts.py +++ b/components/script/dom/bindings/codegen/parser/tests/test_argument_identifier_conflicts.py @@ -3,7 +3,7 @@ def WebIDLTest(parser, harness): try: parser.parse(""" interface ArgumentIdentifierConflict { - void foo(boolean arg1, boolean arg1); + undefined foo(boolean arg1, boolean arg1); }; """) diff --git a/components/script/dom/bindings/codegen/parser/tests/test_argument_keywords.py b/components/script/dom/bindings/codegen/parser/tests/test_argument_keywords.py index e190f617e26..2b29658d678 100644 --- a/components/script/dom/bindings/codegen/parser/tests/test_argument_keywords.py +++ b/components/script/dom/bindings/codegen/parser/tests/test_argument_keywords.py @@ -1,7 +1,7 @@ def WebIDLTest(parser, harness): parser.parse(""" interface Foo { - void foo(object constructor); + undefined foo(object constructor); }; """) diff --git a/components/script/dom/bindings/codegen/parser/tests/test_argument_novoid.py b/components/script/dom/bindings/codegen/parser/tests/test_argument_novoid.py index ef8c2229aed..42e0776e677 100644 --- a/components/script/dom/bindings/codegen/parser/tests/test_argument_novoid.py +++ b/components/script/dom/bindings/codegen/parser/tests/test_argument_novoid.py @@ -2,8 +2,8 @@ def WebIDLTest(parser, harness): threw = False try: parser.parse(""" - interface VoidArgument1 { - void foo(void arg2); + interface UndefinedArgument1 { + undefined foo(undefined arg2); }; """) diff --git a/components/script/dom/bindings/codegen/parser/tests/test_arraybuffer.py b/components/script/dom/bindings/codegen/parser/tests/test_arraybuffer.py index 4a96c0ff512..7020db59f3e 100644 --- a/components/script/dom/bindings/codegen/parser/tests/test_arraybuffer.py +++ b/components/script/dom/bindings/codegen/parser/tests/test_arraybuffer.py @@ -4,37 +4,37 @@ def WebIDLTest(parser, harness): parser.parse(""" interface TestArrayBuffer { attribute ArrayBuffer bufferAttr; - void bufferMethod(ArrayBuffer arg1, ArrayBuffer? arg2, sequence<ArrayBuffer> arg3); + undefined bufferMethod(ArrayBuffer arg1, ArrayBuffer? arg2, sequence<ArrayBuffer> arg3); attribute ArrayBufferView viewAttr; - void viewMethod(ArrayBufferView arg1, ArrayBufferView? arg2, sequence<ArrayBufferView> arg3); + undefined viewMethod(ArrayBufferView arg1, ArrayBufferView? arg2, sequence<ArrayBufferView> arg3); attribute Int8Array int8ArrayAttr; - void int8ArrayMethod(Int8Array arg1, Int8Array? arg2, sequence<Int8Array> arg3); + undefined int8ArrayMethod(Int8Array arg1, Int8Array? arg2, sequence<Int8Array> arg3); attribute Uint8Array uint8ArrayAttr; - void uint8ArrayMethod(Uint8Array arg1, Uint8Array? arg2, sequence<Uint8Array> arg3); + undefined uint8ArrayMethod(Uint8Array arg1, Uint8Array? arg2, sequence<Uint8Array> arg3); attribute Uint8ClampedArray uint8ClampedArrayAttr; - void uint8ClampedArrayMethod(Uint8ClampedArray arg1, Uint8ClampedArray? arg2, sequence<Uint8ClampedArray> arg3); + undefined uint8ClampedArrayMethod(Uint8ClampedArray arg1, Uint8ClampedArray? arg2, sequence<Uint8ClampedArray> arg3); attribute Int16Array int16ArrayAttr; - void int16ArrayMethod(Int16Array arg1, Int16Array? arg2, sequence<Int16Array> arg3); + undefined int16ArrayMethod(Int16Array arg1, Int16Array? arg2, sequence<Int16Array> arg3); attribute Uint16Array uint16ArrayAttr; - void uint16ArrayMethod(Uint16Array arg1, Uint16Array? arg2, sequence<Uint16Array> arg3); + undefined uint16ArrayMethod(Uint16Array arg1, Uint16Array? arg2, sequence<Uint16Array> arg3); attribute Int32Array int32ArrayAttr; - void int32ArrayMethod(Int32Array arg1, Int32Array? arg2, sequence<Int32Array> arg3); + undefined int32ArrayMethod(Int32Array arg1, Int32Array? arg2, sequence<Int32Array> arg3); attribute Uint32Array uint32ArrayAttr; - void uint32ArrayMethod(Uint32Array arg1, Uint32Array? arg2, sequence<Uint32Array> arg3); + undefined uint32ArrayMethod(Uint32Array arg1, Uint32Array? arg2, sequence<Uint32Array> arg3); attribute Float32Array float32ArrayAttr; - void float32ArrayMethod(Float32Array arg1, Float32Array? arg2, sequence<Float32Array> arg3); + undefined float32ArrayMethod(Float32Array arg1, Float32Array? arg2, sequence<Float32Array> arg3); attribute Float64Array float64ArrayAttr; - void float64ArrayMethod(Float64Array arg1, Float64Array? arg2, sequence<Float64Array> arg3); + undefined float64ArrayMethod(Float64Array arg1, Float64Array? arg2, sequence<Float64Array> arg3); }; """) @@ -55,7 +55,7 @@ def WebIDLTest(parser, harness): harness.ok(attr.type.isSpiderMonkeyInterface(), "Should test as a js interface") (retType, arguments) = method.signatures()[0] - harness.ok(retType.isVoid(), "Should have a void return type") + harness.ok(retType.isUndefined(), "Should have a undefined return type") harness.check(len(arguments), 3, "Expect 3 arguments") harness.check(str(arguments[0].type), t, "Expect an ArrayBuffer type") diff --git a/components/script/dom/bindings/codegen/parser/tests/test_attributes_on_types.py b/components/script/dom/bindings/codegen/parser/tests/test_attributes_on_types.py index ff08791d16f..9ba39018c77 100644 --- a/components/script/dom/bindings/codegen/parser/tests/test_attributes_on_types.py +++ b/components/script/dom/bindings/codegen/parser/tests/test_attributes_on_types.py @@ -20,16 +20,16 @@ def WebIDLTest(parser, harness): attribute [EnforceRange] long foo; attribute [Clamp] long bar; attribute [TreatNullAs=EmptyString] DOMString baz; - void method([EnforceRange] long foo, [Clamp] long bar, + undefined method([EnforceRange] long foo, [Clamp] long bar, [TreatNullAs=EmptyString] DOMString baz); - void method2(optional [EnforceRange] long foo, optional [Clamp] long bar, + undefined method2(optional [EnforceRange] long foo, optional [Clamp] long bar, optional [TreatNullAs=EmptyString] DOMString baz); }; interface C { attribute [EnforceRange] long? foo; attribute [Clamp] long? bar; - void method([EnforceRange] long? foo, [Clamp] long? bar); - void method2(optional [EnforceRange] long? foo, optional [Clamp] long? bar); + undefined method([EnforceRange] long? foo, [Clamp] long? bar); + undefined method2(optional [EnforceRange] long? foo, optional [Clamp] long? bar); }; interface Setlike { setlike<[Clamp] long>; @@ -98,13 +98,13 @@ def WebIDLTest(parser, harness): interface B { attribute Foo typedefFoo; attribute [AllowShared] ArrayBufferView foo; - void method([AllowShared] ArrayBufferView foo); - void method2(optional [AllowShared] ArrayBufferView foo); + undefined method([AllowShared] ArrayBufferView foo); + undefined method2(optional [AllowShared] ArrayBufferView foo); }; interface C { attribute [AllowShared] ArrayBufferView? foo; - void method([AllowShared] ArrayBufferView? foo); - void method2(optional [AllowShared] ArrayBufferView? foo); + undefined method([AllowShared] ArrayBufferView? foo); + undefined method2(optional [AllowShared] ArrayBufferView? foo); }; interface Setlike { setlike<[AllowShared] ArrayBufferView>; @@ -154,7 +154,7 @@ def WebIDLTest(parser, harness): """), ("optional arguments", """ interface Foo { - void foo(%s optional %s foo); + undefined foo(%s optional %s foo); }; """), ("typedefs", """ @@ -189,7 +189,7 @@ def WebIDLTest(parser, harness): """), ("partial interface",""" interface Foo { - void foo(); + undefined foo(); }; %s partial interface Foo { @@ -210,7 +210,7 @@ def WebIDLTest(parser, harness): """), ("partial namespace",""" namespace Foo { - void foo(); + undefined foo(); }; %s partial namespace Foo { @@ -387,7 +387,7 @@ def WebIDLTest(parser, harness): try: parser.parse(""" interface Foo { - void foo([Clamp] Bar arg); + undefined foo([Clamp] Bar arg); }; typedef long Bar; """) @@ -403,7 +403,7 @@ def WebIDLTest(parser, harness): try: parser.parse(""" interface Foo { - void foo(Bar arg); + undefined foo(Bar arg); }; typedef [Clamp] long Bar; """) diff --git a/components/script/dom/bindings/codegen/parser/tests/test_bytestring.py b/components/script/dom/bindings/codegen/parser/tests/test_bytestring.py index fa83e9e2d57..51289f5db6e 100644 --- a/components/script/dom/bindings/codegen/parser/tests/test_bytestring.py +++ b/components/script/dom/bindings/codegen/parser/tests/test_bytestring.py @@ -60,8 +60,8 @@ def WebIDLTest(parser, harness): try: parser.parse(""" interface OptionalByteString { - void passByteString(optional ByteString arg = "hello"); - }; + undefined passByteString(optional ByteString arg = "hello"); + }; """) results2 = parser.finish(); except WebIDL.WebIDLError as e: diff --git a/components/script/dom/bindings/codegen/parser/tests/test_callback_interface.py b/components/script/dom/bindings/codegen/parser/tests/test_callback_interface.py index e4789dae168..34813bcab99 100644 --- a/components/script/dom/bindings/codegen/parser/tests/test_callback_interface.py +++ b/components/script/dom/bindings/codegen/parser/tests/test_callback_interface.py @@ -48,31 +48,31 @@ def WebIDLTest(parser, harness): parser = parser.reset() parser.parse(""" callback interface TestCallbackInterface1 { - void foo(); + undefined foo(); }; callback interface TestCallbackInterface2 { - void foo(DOMString arg); - void foo(TestCallbackInterface1 arg); + undefined foo(DOMString arg); + undefined foo(TestCallbackInterface1 arg); }; callback interface TestCallbackInterface3 { - void foo(DOMString arg); - void foo(TestCallbackInterface1 arg); - static void bar(); + undefined foo(DOMString arg); + undefined foo(TestCallbackInterface1 arg); + static undefined bar(); }; callback interface TestCallbackInterface4 { - void foo(DOMString arg); - void foo(TestCallbackInterface1 arg); - static void bar(); + undefined foo(DOMString arg); + undefined foo(TestCallbackInterface1 arg); + static undefined bar(); const long baz = 5; }; callback interface TestCallbackInterface5 { static attribute boolean bool; - void foo(); + undefined foo(); }; callback interface TestCallbackInterface6 { - void foo(DOMString arg); - void foo(TestCallbackInterface1 arg); - void bar(); + undefined foo(DOMString arg); + undefined foo(TestCallbackInterface1 arg); + undefined bar(); }; callback interface TestCallbackInterface7 { static attribute boolean bool; @@ -81,10 +81,10 @@ def WebIDLTest(parser, harness): attribute boolean bool; }; callback interface TestCallbackInterface9 : TestCallbackInterface1 { - void foo(); + undefined foo(); }; callback interface TestCallbackInterface10 : TestCallbackInterface1 { - void bar(); + undefined bar(); }; """) results = parser.finish() diff --git a/components/script/dom/bindings/codegen/parser/tests/test_cereactions.py b/components/script/dom/bindings/codegen/parser/tests/test_cereactions.py index f726907c2fc..ebc688bfd9c 100644 --- a/components/script/dom/bindings/codegen/parser/tests/test_cereactions.py +++ b/components/script/dom/bindings/codegen/parser/tests/test_cereactions.py @@ -3,7 +3,7 @@ def WebIDLTest(parser, harness): try: parser.parse(""" interface Foo { - [CEReactions(DOMString a)] void foo(boolean arg2); + [CEReactions(DOMString a)] undefined foo(boolean arg2); }; """) @@ -47,7 +47,7 @@ def WebIDLTest(parser, harness): try: parser.parse(""" interface Foo { - [CEReactions] void foo(boolean arg2); + [CEReactions] undefined foo(boolean arg2); }; """) 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 3cad3022389..dcdc43d5c47 100644 --- a/components/script/dom/bindings/codegen/parser/tests/test_dictionary.py +++ b/components/script/dom/bindings/codegen/parser/tests/test_dictionary.py @@ -158,7 +158,7 @@ def WebIDLTest(parser, harness): dictionary A { }; interface X { - void doFoo(A arg); + undefined doFoo(A arg); }; """) results = parser.finish() @@ -174,7 +174,7 @@ def WebIDLTest(parser, harness): dictionary A { }; interface X { - void doFoo(optional A arg); + undefined doFoo(optional A arg); }; """) results = parser.finish() @@ -190,7 +190,7 @@ def WebIDLTest(parser, harness): dictionary A { }; interface X { - void doFoo((A or DOMString) arg); + undefined doFoo((A or DOMString) arg); }; """) results = parser.finish() @@ -207,7 +207,7 @@ def WebIDLTest(parser, harness): dictionary A { }; interface X { - void doFoo(optional (A or DOMString) arg); + undefined doFoo(optional (A or DOMString) arg); }; """) results = parser.finish() @@ -224,7 +224,7 @@ def WebIDLTest(parser, harness): dictionary A { }; interface X { - void doFoo(A arg1, optional long arg2); + undefined doFoo(A arg1, optional long arg2); }; """) results = parser.finish() @@ -240,7 +240,7 @@ def WebIDLTest(parser, harness): dictionary A { }; interface X { - void doFoo(optional A arg1, optional long arg2); + undefined doFoo(optional A arg1, optional long arg2); }; """) results = parser.finish() @@ -256,7 +256,7 @@ def WebIDLTest(parser, harness): dictionary A { }; interface X { - void doFoo(A arg1, optional long arg2, long arg3); + undefined doFoo(A arg1, optional long arg2, long arg3); }; """) results = parser.finish() @@ -273,7 +273,7 @@ def WebIDLTest(parser, harness): dictionary A { }; interface X { - void doFoo((A or DOMString) arg1, optional long arg2); + undefined doFoo((A or DOMString) arg1, optional long arg2); }; """) results = parser.finish() @@ -291,7 +291,7 @@ def WebIDLTest(parser, harness): dictionary A { }; interface X { - void doFoo(optional (A or DOMString) arg1, optional long arg2); + undefined doFoo(optional (A or DOMString) arg1, optional long arg2); }; """) results = parser.finish() @@ -307,7 +307,7 @@ def WebIDLTest(parser, harness): dictionary A { }; interface X { - void doFoo(A arg1, long arg2); + undefined doFoo(A arg1, long arg2); }; """) results = parser.finish() @@ -320,7 +320,7 @@ def WebIDLTest(parser, harness): dictionary A { }; interface X { - void doFoo(optional A? arg1 = {}); + undefined doFoo(optional A? arg1 = {}); }; """) results = parser.finish() @@ -339,7 +339,7 @@ def WebIDLTest(parser, harness): required long x; }; interface X { - void doFoo(A? arg1); + undefined doFoo(A? arg1); }; """) results = parser.finish() @@ -358,7 +358,7 @@ def WebIDLTest(parser, harness): dictionary A { }; interface X { - void doFoo(optional (A or long)? arg1 = {}); + undefined doFoo(optional (A or long)? arg1 = {}); }; """) results = parser.finish() @@ -378,7 +378,7 @@ def WebIDLTest(parser, harness): required long x; }; interface X { - void doFoo((A or long)? arg1); + undefined doFoo((A or long)? arg1); }; """) results = parser.finish() @@ -397,7 +397,7 @@ def WebIDLTest(parser, harness): dictionary A { }; interface X { - void doFoo(sequence<A?> arg1); + undefined doFoo(sequence<A?> arg1); }; """) results = parser.finish() @@ -414,7 +414,7 @@ def WebIDLTest(parser, harness): dictionary A { }; interface X { - void doFoo(optional (A or long?) arg1); + undefined doFoo(optional (A or long?) arg1); }; """) results = parser.finish() @@ -430,7 +430,7 @@ def WebIDLTest(parser, harness): dictionary A { }; interface X { - void doFoo(optional (long? or A) arg1); + undefined doFoo(optional (long? or A) arg1); }; """) results = parser.finish() @@ -455,7 +455,7 @@ def WebIDLTest(parser, harness): dictionary A { }; interface X { - void doFoo(optional A arg = {}); + undefined doFoo(optional A arg = {}); }; """) results = parser.finish() @@ -466,7 +466,7 @@ def WebIDLTest(parser, harness): dictionary A { }; interface X { - void doFoo(optional (A or DOMString) arg = {}); + undefined doFoo(optional (A or DOMString) arg = {}); }; """) results = parser.finish() @@ -477,7 +477,7 @@ def WebIDLTest(parser, harness): dictionary A { }; interface X { - void doFoo(optional (A or DOMString) arg = "abc"); + undefined doFoo(optional (A or DOMString) arg = "abc"); }; """) results = parser.finish() 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 505b36468d6..1fa12832d7f 100644 --- a/components/script/dom/bindings/codegen/parser/tests/test_distinguishability.py +++ b/components/script/dom/bindings/codegen/parser/tests/test_distinguishability.py @@ -12,10 +12,10 @@ def WebIDLTest(parser, harness): }; interface Bar { // Bit of a pain to get things that have dictionary types - void passDict(Dict arg); - void passFoo(Foo arg); - void passNullableUnion((object? or DOMString) arg); - void passNullable(Foo? arg); + undefined passDict(Dict arg); + undefined passFoo(Foo arg); + undefined passNullableUnion((object? or DOMString) arg); + undefined passNullable(Foo? arg); }; """) results = parser.finish() @@ -56,13 +56,13 @@ def WebIDLTest(parser, harness): parser = parser.reset() parser.parse(""" interface TestIface { - void passKid(Kid arg); - void passParent(Parent arg); - void passGrandparent(Grandparent arg); - void passUnrelated1(Unrelated1 arg); - void passUnrelated2(Unrelated2 arg); - void passArrayBuffer(ArrayBuffer arg); - void passArrayBuffer(ArrayBufferView arg); + undefined passKid(Kid arg); + undefined passParent(Parent arg); + undefined passGrandparent(Grandparent arg); + undefined passUnrelated1(Unrelated1 arg); + undefined passUnrelated2(Unrelated2 arg); + undefined passArrayBuffer(ArrayBuffer arg); + undefined passArrayBuffer(ArrayBufferView arg); }; interface Kid : Parent {}; @@ -97,10 +97,10 @@ def WebIDLTest(parser, harness): parser.parse(""" interface Dummy {}; interface TestIface { - void method(long arg1, TestIface arg2); - void method(long arg1, long arg2); - void method(long arg1, Dummy arg2); - void method(DOMString arg1, DOMString arg2, DOMString arg3); + undefined method(long arg1, TestIface arg2); + undefined method(long arg1, long arg2); + undefined method(long arg1, Dummy arg2); + undefined method(DOMString arg1, DOMString arg2, DOMString arg3); }; """) results = parser.finish() @@ -115,10 +115,10 @@ def WebIDLTest(parser, harness): parser.parse(""" interface Dummy {}; interface TestIface { - void method(long arg1, TestIface arg2); - void method(long arg1, long arg2); - void method(any arg1, Dummy arg2); - void method(DOMString arg1, DOMString arg2, DOMString arg3); + undefined method(long arg1, TestIface arg2); + undefined method(long arg1, long arg2); + undefined method(any arg1, Dummy arg2); + undefined method(DOMString arg1, DOMString arg2, DOMString arg3); }; """) results = parser.finish() @@ -135,10 +135,10 @@ def WebIDLTest(parser, harness): parser.parse(""" interface Dummy {}; interface TestIface { - void method(long arg1, TestIface arg2); - void method(long arg1, long arg2); - void method(any arg1, DOMString arg2); - void method(DOMString arg1, DOMString arg2, DOMString arg3); + undefined method(long arg1, TestIface arg2); + undefined method(long arg1, long arg2); + undefined method(any arg1, DOMString arg2); + undefined method(DOMString arg1, DOMString arg2, DOMString arg3); }; """) results = parser.finish() @@ -272,7 +272,7 @@ def WebIDLTest(parser, harness): }; """ methodTemplate = """ - void myMethod(%s arg);""" + undefined myMethod(%s arg);""" methods = (methodTemplate % type1) + (methodTemplate % type2) idl = idlTemplate % methods parser = parser.reset() diff --git a/components/script/dom/bindings/codegen/parser/tests/test_empty_sequence_default_value.py b/components/script/dom/bindings/codegen/parser/tests/test_empty_sequence_default_value.py index a713266c88e..5f04c6ae751 100644 --- a/components/script/dom/bindings/codegen/parser/tests/test_empty_sequence_default_value.py +++ b/components/script/dom/bindings/codegen/parser/tests/test_empty_sequence_default_value.py @@ -19,7 +19,7 @@ def WebIDLTest(parser, harness): parser.parse(""" interface X { - void foo(optional sequence<long> arg = []); + undefined foo(optional sequence<long> arg = []); }; """) results = parser.finish(); diff --git a/components/script/dom/bindings/codegen/parser/tests/test_enum.py b/components/script/dom/bindings/codegen/parser/tests/test_enum.py index 86228939181..c5617ead99a 100644 --- a/components/script/dom/bindings/codegen/parser/tests/test_enum.py +++ b/components/script/dom/bindings/codegen/parser/tests/test_enum.py @@ -71,7 +71,7 @@ def WebIDLTest(parser, harness): "c" }; interface TestInterface { - void foo(optional Enum e = "d"); + undefined foo(optional Enum e = "d"); }; """) results = parser.finish() 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 e0241a56426..39993eaeae5 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 @@ -8,7 +8,7 @@ def WebIDLTest(parser, harness): [Exposed=(Foo,Bar1)] interface Iface { - void method1(); + undefined method1(); [Exposed=Bar1] readonly attribute any attr; @@ -16,7 +16,7 @@ def WebIDLTest(parser, harness): [Exposed=Foo] partial interface Iface { - void method2(); + undefined method2(); }; """) @@ -57,7 +57,7 @@ def WebIDLTest(parser, harness): [Exposed=Foo] interface Iface2 { - void method3(); + undefined method3(); }; """) results = parser.finish() @@ -87,12 +87,12 @@ def WebIDLTest(parser, harness): [Exposed=Foo] interface Iface3 { - void method4(); + undefined method4(); }; [Exposed=(Foo,Bar1)] interface mixin Mixin { - void method5(); + undefined method5(); }; Iface3 includes Mixin; @@ -152,7 +152,7 @@ def WebIDLTest(parser, harness): parser.parse(""" interface Bar { [Exposed=Foo] - void operation(); + undefined operation(); }; """) @@ -188,7 +188,7 @@ def WebIDLTest(parser, harness): [Exposed=Foo] interface Baz { [Exposed=Bar] - void method(); + undefined method(); }; """) @@ -205,12 +205,12 @@ def WebIDLTest(parser, harness): [Exposed=Foo] interface Baz { - void method(); + undefined method(); }; [Exposed=Bar] interface mixin Mixin { - void otherMethod(); + undefined otherMethod(); }; Baz includes Mixin; diff --git a/components/script/dom/bindings/codegen/parser/tests/test_extended_attributes.py b/components/script/dom/bindings/codegen/parser/tests/test_extended_attributes.py index 144c945bc10..66909f322c2 100644 --- a/components/script/dom/bindings/codegen/parser/tests/test_extended_attributes.py +++ b/components/script/dom/bindings/codegen/parser/tests/test_extended_attributes.py @@ -48,8 +48,8 @@ def WebIDLTest(parser, harness): parser = parser.reset() parser.parse(""" interface TestClamp { - void testClamp([Clamp] long foo); - void testNotClamp(long foo); + undefined testClamp([Clamp] long foo); + undefined testNotClamp(long foo); }; """) @@ -66,7 +66,7 @@ def WebIDLTest(parser, harness): try: parser.parse(""" interface TestClamp2 { - void testClamp([Clamp=something] long foo); + undefined testClamp([Clamp=something] long foo); }; """) results = parser.finish() @@ -78,8 +78,8 @@ def WebIDLTest(parser, harness): parser = parser.reset() parser.parse(""" interface TestEnforceRange { - void testEnforceRange([EnforceRange] long foo); - void testNotEnforceRange(long foo); + undefined testEnforceRange([EnforceRange] long foo); + undefined testNotEnforceRange(long foo); }; """) @@ -96,7 +96,7 @@ def WebIDLTest(parser, harness): try: parser.parse(""" interface TestEnforceRange2 { - void testEnforceRange([EnforceRange=something] long foo); + undefined testEnforceRange([EnforceRange=something] long foo); }; """) results = parser.finish() @@ -104,4 +104,4 @@ def WebIDLTest(parser, harness): threw = True harness.ok(threw, "[EnforceRange] must take no arguments") - + diff --git a/components/script/dom/bindings/codegen/parser/tests/test_float_types.py b/components/script/dom/bindings/codegen/parser/tests/test_float_types.py index b7325cf9d26..8fbe9394042 100644 --- a/components/script/dom/bindings/codegen/parser/tests/test_float_types.py +++ b/components/script/dom/bindings/codegen/parser/tests/test_float_types.py @@ -14,23 +14,23 @@ def WebIDLTest(parser, harness): [LenientFloat] attribute double ld; - void m1(float arg1, double arg2, float? arg3, double? arg4, + undefined m1(float arg1, double arg2, float? arg3, double? arg4, myFloat arg5, unrestricted float arg6, unrestricted double arg7, unrestricted float? arg8, unrestricted double? arg9, myUnrestrictedFloat arg10); [LenientFloat] - void m2(float arg1, double arg2, float? arg3, double? arg4, + undefined m2(float arg1, double arg2, float? arg3, double? arg4, myFloat arg5, unrestricted float arg6, unrestricted double arg7, unrestricted float? arg8, unrestricted double? arg9, myUnrestrictedFloat arg10); [LenientFloat] - void m3(float arg); + undefined m3(float arg); [LenientFloat] - void m4(double arg); + undefined m4(double arg); [LenientFloat] - void m5((float or FloatTypes) arg); + undefined m5((float or FloatTypes) arg); [LenientFloat] - void m6(sequence<float> arg); + undefined m6(sequence<float> arg); }; """) @@ -70,7 +70,7 @@ def WebIDLTest(parser, harness): """) except Exception as x: threw = True - harness.ok(threw, "[LenientFloat] only allowed on void methods") + harness.ok(threw, "[LenientFloat] only allowed on undefined-retuning methods") parser = parser.reset() threw = False @@ -78,7 +78,7 @@ def WebIDLTest(parser, harness): parser.parse(""" interface FloatTypes { [LenientFloat] - void m(unrestricted float arg); + undefined m(unrestricted float arg); }; """) except Exception as x: @@ -91,7 +91,7 @@ def WebIDLTest(parser, harness): parser.parse(""" interface FloatTypes { [LenientFloat] - void m(sequence<unrestricted float> arg); + undefined m(sequence<unrestricted float> arg); }; """) except Exception as x: @@ -104,7 +104,7 @@ def WebIDLTest(parser, harness): parser.parse(""" interface FloatTypes { [LenientFloat] - void m((unrestricted float or FloatTypes) arg); + undefined m((unrestricted float or FloatTypes) arg); }; """) except Exception as x: 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 28b79642d86..3958f8ce104 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 @@ -22,7 +22,7 @@ def WebIDLTest(parser, harness): [Global, Exposed=Foo] interface Foo { getter any(DOMString name); - setter void(DOMString name, any arg); + setter undefined(DOMString name, any arg); }; """) results = parser.finish() @@ -40,7 +40,7 @@ def WebIDLTest(parser, harness): [Global, Exposed=Foo] interface Foo { getter any(DOMString name); - deleter void(DOMString name); + deleter undefined(DOMString name); }; """) results = parser.finish() diff --git a/components/script/dom/bindings/codegen/parser/tests/test_incomplete_parent.py b/components/script/dom/bindings/codegen/parser/tests/test_incomplete_parent.py index 1f520a28e16..8f30c212d7b 100644 --- a/components/script/dom/bindings/codegen/parser/tests/test_incomplete_parent.py +++ b/components/script/dom/bindings/codegen/parser/tests/test_incomplete_parent.py @@ -3,7 +3,7 @@ import WebIDL def WebIDLTest(parser, harness): parser.parse(""" interface TestIncompleteParent : NotYetDefined { - void foo(); + undefined foo(); }; interface NotYetDefined : EvenHigherOnTheChain { 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 47db3ae4cc9..a10bcd9863d 100644 --- a/components/script/dom/bindings/codegen/parser/tests/test_interface.py +++ b/components/script/dom/bindings/codegen/parser/tests/test_interface.py @@ -32,7 +32,7 @@ def WebIDLTest(parser, harness): interface QNameDerived : QNameBase { attribute long long foo; - attribute byte bar; + attribute byte bar; }; """) results = parser.finish() @@ -99,11 +99,11 @@ def WebIDLTest(parser, harness): constructor(); constructor(long arg); readonly attribute boolean x; - void foo(); + undefined foo(); }; partial interface A { readonly attribute boolean y; - void foo(long arg); + undefined foo(long arg); }; """); results = parser.finish(); @@ -127,13 +127,13 @@ def WebIDLTest(parser, harness): parser.parse(""" partial interface A { readonly attribute boolean y; - void foo(long arg); + undefined foo(long arg); }; interface A { constructor(); constructor(long arg); readonly attribute boolean x; - void foo(); + undefined foo(); }; """); results = parser.finish(); 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 e070adee7e6..835212d2965 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 @@ -358,7 +358,7 @@ def WebIDLTest(parser, harness): interface Foo1 { %s; [Throws] - void %s(long test1, double test2, double test3); + undefined %s(long test1, double test2, double test3); }; """ % (likeMember, conflictName), expectedMembers) else: @@ -367,14 +367,14 @@ def WebIDLTest(parser, harness): interface Foo1 { %s; [Throws] - void %s(long test1, double test2, double test3); + undefined %s(long test1, double test2, double test3); }; """ % (likeMember, conflictName)) # Inherited conflicting methods should ALWAYS fail shouldFail("Conflicting inherited method: %s and %s" % (likeMember, conflictName), """ interface Foo1 { - void %s(long test1, double test2, double test3); + undefined %s(long test1, double test2, double test3); }; interface Foo2 : Foo1 { %s; @@ -384,7 +384,7 @@ def WebIDLTest(parser, harness): """ interface Foo1 { %s; - static void %s(long test1, double test2, double test3); + static undefined %s(long test1, double test2, double test3); }; """ % (likeMember, conflictName)) shouldFail("Conflicting attribute: %s and %s" % (likeMember, conflictName), @@ -426,7 +426,7 @@ def WebIDLTest(parser, harness): maplike<long, long>; }; interface Foo2 : Foo1 { - void entries(); + undefined entries(); }; """, mapRWMembers, numProductions=2) @@ -438,7 +438,7 @@ def WebIDLTest(parser, harness): interface Foo2 : Foo1 { }; interface Foo3 : Foo2 { - void entries(); + undefined entries(); }; """, mapRWMembers, numProductions=3) @@ -448,7 +448,7 @@ def WebIDLTest(parser, harness): maplike<long, long>; }; interface mixin Foo2 { - void entries(); + undefined entries(); }; Foo1 includes Foo2; """) @@ -459,7 +459,7 @@ def WebIDLTest(parser, harness): maplike<long, long>; }; interface mixin Foo2 { - void entries(); + undefined entries(); }; interface Foo3 : Foo1 { }; @@ -469,7 +469,7 @@ def WebIDLTest(parser, harness): shouldFail("Inheritance of name collision with child maplike/setlike", """ interface Foo1 { - void entries(); + undefined entries(); }; interface Foo2 : Foo1 { maplike<long, long>; @@ -479,7 +479,7 @@ def WebIDLTest(parser, harness): shouldFail("Inheritance of multi-level name collision with child maplike/setlike", """ interface Foo1 { - void entries(); + undefined entries(); }; interface Foo2 : Foo1 { }; @@ -558,7 +558,7 @@ def WebIDLTest(parser, harness): maplike<long, long>; }; interface Foo2 : Foo1 { - void clear(); + undefined clear(); }; """, mapRWMembers, numProductions=2) 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 477a9f37799..79cf1f6780d 100644 --- a/components/script/dom/bindings/codegen/parser/tests/test_interfacemixin.py +++ b/components/script/dom/bindings/codegen/parser/tests/test_interfacemixin.py @@ -30,11 +30,11 @@ def WebIDLTest(parser, harness): parser.parse(""" interface mixin A { readonly attribute boolean x; - void foo(); + undefined foo(); }; partial interface mixin A { readonly attribute boolean y; - void foo(long arg); + undefined foo(long arg); }; """) results = parser.finish() @@ -56,11 +56,11 @@ def WebIDLTest(parser, harness): parser.parse(""" partial interface mixin A { readonly attribute boolean y; - void foo(long arg); + undefined foo(long arg); }; interface mixin A { readonly attribute boolean x; - void foo(); + undefined foo(); }; """) results = parser.finish() @@ -212,7 +212,7 @@ def WebIDLTest(parser, harness): try: parser.parse(""" interface mixin A { - setter void (DOMString propertyName, double propertyValue); + setter undefined (DOMString propertyName, double propertyValue); }; """) results = parser.finish() @@ -226,7 +226,7 @@ def WebIDLTest(parser, harness): try: parser.parse(""" interface mixin A { - deleter void (DOMString propertyName); + deleter undefined (DOMString propertyName); }; """) results = parser.finish() diff --git a/components/script/dom/bindings/codegen/parser/tests/test_method.py b/components/script/dom/bindings/codegen/parser/tests/test_method.py index 88ee874386c..ff1f087c861 100644 --- a/components/script/dom/bindings/codegen/parser/tests/test_method.py +++ b/components/script/dom/bindings/codegen/parser/tests/test_method.py @@ -3,17 +3,17 @@ import WebIDL def WebIDLTest(parser, harness): parser.parse(""" interface TestMethods { - void basic(); - static void basicStatic(); - void basicWithSimpleArgs(boolean arg1, byte arg2, unsigned long arg3); + undefined basic(); + static undefined basicStatic(); + undefined basicWithSimpleArgs(boolean arg1, byte arg2, unsigned long arg3); boolean basicBoolean(); static boolean basicStaticBoolean(); boolean basicBooleanWithSimpleArgs(boolean arg1, byte arg2, unsigned long arg3); - void optionalArg(optional byte? arg1, optional sequence<byte> arg2); - void variadicArg(byte?... arg1); + undefined optionalArg(optional byte? arg1, optional sequence<byte> arg2); + undefined variadicArg(byte?... arg1); object getObject(); - void setObject(object arg1); - void setAny(any arg1); + undefined setObject(object arg1); + undefined setAny(any arg1); float doFloats(float arg1); }; """) @@ -70,12 +70,12 @@ def WebIDLTest(parser, harness): (QName, name, type, optional, variadic) = expectedArgs[i] checkArgument(gotArgs[i], QName, name, type, optional, variadic) - checkMethod(methods[0], "::TestMethods::basic", "basic", [("Void", [])]) + checkMethod(methods[0], "::TestMethods::basic", "basic", [("Undefined", [])]) checkMethod(methods[1], "::TestMethods::basicStatic", "basicStatic", - [("Void", [])], static=True) + [("Undefined", [])], static=True) checkMethod(methods[2], "::TestMethods::basicWithSimpleArgs", "basicWithSimpleArgs", - [("Void", + [("Undefined", [("::TestMethods::basicWithSimpleArgs::arg1", "arg1", "Boolean", False, False), ("::TestMethods::basicWithSimpleArgs::arg2", "arg2", "Byte", False, False), ("::TestMethods::basicWithSimpleArgs::arg3", "arg3", "UnsignedLong", False, False)])]) @@ -89,22 +89,22 @@ def WebIDLTest(parser, harness): ("::TestMethods::basicBooleanWithSimpleArgs::arg3", "arg3", "UnsignedLong", False, False)])]) checkMethod(methods[6], "::TestMethods::optionalArg", "optionalArg", - [("Void", + [("Undefined", [("::TestMethods::optionalArg::arg1", "arg1", "ByteOrNull", True, False), ("::TestMethods::optionalArg::arg2", "arg2", "ByteSequence", True, False)])]) checkMethod(methods[7], "::TestMethods::variadicArg", "variadicArg", - [("Void", + [("Undefined", [("::TestMethods::variadicArg::arg1", "arg1", "ByteOrNull", True, True)])]) checkMethod(methods[8], "::TestMethods::getObject", "getObject", [("Object", [])]) checkMethod(methods[9], "::TestMethods::setObject", "setObject", - [("Void", + [("Undefined", [("::TestMethods::setObject::arg1", "arg1", "Object", False, False)])]) checkMethod(methods[10], "::TestMethods::setAny", "setAny", - [("Void", + [("Undefined", [("::TestMethods::setAny::arg1", "arg1", "Any", False, False)])]) checkMethod(methods[11], "::TestMethods::doFloats", "doFloats", @@ -116,7 +116,7 @@ def WebIDLTest(parser, harness): try: parser.parse(""" interface A { - void foo(optional float bar = 1); + undefined foo(optional float bar = 1); }; """) results = parser.finish() @@ -129,7 +129,7 @@ def WebIDLTest(parser, harness): try: parser.parse(""" interface A { - [GetterThrows] void foo(); + [GetterThrows] undefined foo(); }; """) results = parser.finish() @@ -142,7 +142,7 @@ def WebIDLTest(parser, harness): try: parser.parse(""" interface A { - [SetterThrows] void foo(); + [SetterThrows] undefined foo(); }; """) results = parser.finish() @@ -155,7 +155,7 @@ def WebIDLTest(parser, harness): try: parser.parse(""" interface A { - [Throw] void foo(); + [Throw] undefined foo(); }; """) results = parser.finish() @@ -168,7 +168,7 @@ def WebIDLTest(parser, harness): try: parser.parse(""" interface A { - void __noSuchMethod__(); + undefined __noSuchMethod__(); }; """) results = parser.finish() @@ -182,9 +182,9 @@ def WebIDLTest(parser, harness): parser.parse(""" interface A { [Throws, LenientFloat] - void foo(float myFloat); + undefined foo(float myFloat); [Throws] - void foo(); + undefined foo(); }; """) results = parser.finish() @@ -196,9 +196,9 @@ def WebIDLTest(parser, harness): parser.parse(""" interface A { [Throws] - void foo(); + undefined foo(); [Throws, LenientFloat] - void foo(float myFloat); + undefined foo(float myFloat); }; """) results = parser.finish() @@ -213,9 +213,9 @@ def WebIDLTest(parser, harness): parser.parse(""" interface A { [Throws, LenientFloat] - void foo(float myFloat); + undefined foo(float myFloat); [Throws] - void foo(float myFloat, float yourFloat); + undefined foo(float myFloat, float yourFloat); }; """) results = parser.finish() @@ -229,9 +229,9 @@ def WebIDLTest(parser, harness): parser.parse(""" interface A { [Throws] - void foo(float myFloat, float yourFloat); + undefined foo(float myFloat, float yourFloat); [Throws, LenientFloat] - void foo(float myFloat); + undefined foo(float myFloat); }; """) results = parser.finish() @@ -245,9 +245,9 @@ def WebIDLTest(parser, harness): parser.parse(""" interface A { [Throws, LenientFloat] - void foo(float myFloat); + undefined foo(float myFloat); [Throws, LenientFloat] - void foo(short myShort); + undefined foo(short myShort); }; """) results = parser.finish() diff --git a/components/script/dom/bindings/codegen/parser/tests/test_nullable_void.py b/components/script/dom/bindings/codegen/parser/tests/test_nullable_void.py index 961ff825e9f..ebf841a5205 100644 --- a/components/script/dom/bindings/codegen/parser/tests/test_nullable_void.py +++ b/components/script/dom/bindings/codegen/parser/tests/test_nullable_void.py @@ -2,8 +2,8 @@ def WebIDLTest(parser, harness): threw = False try: parser.parse(""" - interface NullableVoid { - void? foo(); + interface NullableUndefined { + undefined? foo(); }; """) diff --git a/components/script/dom/bindings/codegen/parser/tests/test_optional_constraints.py b/components/script/dom/bindings/codegen/parser/tests/test_optional_constraints.py index 6217465ce7d..ad012b633d5 100644 --- a/components/script/dom/bindings/codegen/parser/tests/test_optional_constraints.py +++ b/components/script/dom/bindings/codegen/parser/tests/test_optional_constraints.py @@ -3,7 +3,7 @@ def WebIDLTest(parser, harness): try: parser.parse(""" interface OptionalConstraints1 { - void foo(optional byte arg1, byte arg2); + undefined foo(optional byte arg1, byte arg2); }; """) @@ -18,7 +18,7 @@ def WebIDLTest(parser, harness): parser = parser.reset() parser.parse(""" interface OptionalConstraints2 { - void foo(optional byte arg1 = 1, optional byte arg2 = 2, + undefined foo(optional byte arg1 = 1, optional byte arg2 = 2, optional byte arg3, optional byte arg4 = 4, optional byte arg5, optional byte arg6 = 9); }; diff --git a/components/script/dom/bindings/codegen/parser/tests/test_overload.py b/components/script/dom/bindings/codegen/parser/tests/test_overload.py index 3c680ad5233..8e02f64d6c9 100644 --- a/components/script/dom/bindings/codegen/parser/tests/test_overload.py +++ b/components/script/dom/bindings/codegen/parser/tests/test_overload.py @@ -3,16 +3,16 @@ import WebIDL def WebIDLTest(parser, harness): parser.parse(""" interface TestOverloads { - void basic(); - void basic(long arg1); + undefined basic(); + undefined basic(long arg1); boolean abitharder(TestOverloads foo); boolean abitharder(boolean foo); - void abitharder(ArrayBuffer? foo); - void withVariadics(long... numbers); - void withVariadics(TestOverloads iface); - void withVariadics(long num, TestOverloads iface); - void optionalTest(); - void optionalTest(optional long num1, long num2); + undefined abitharder(ArrayBuffer? foo); + undefined withVariadics(long... numbers); + undefined withVariadics(TestOverloads iface); + undefined withVariadics(long num, TestOverloads iface); + undefined optionalTest(); + undefined optionalTest(optional long num1, long num2); }; """) @@ -37,11 +37,11 @@ def WebIDLTest(parser, harness): (retval, argumentSet) = signatures[0] - harness.check(str(retval), "Void", "Expect a void retval") + harness.check(str(retval), "Undefined", "Expect a undefined retval") harness.check(len(argumentSet), 0, "Expect an empty argument set") (retval, argumentSet) = signatures[1] - harness.check(str(retval), "Void", "Expect a void retval") + harness.check(str(retval), "Undefined", "Expect a undefined retval") harness.check(len(argumentSet), 1, "Expect an argument set with one argument") argument = argumentSet[0] diff --git a/components/script/dom/bindings/codegen/parser/tests/test_promise.py b/components/script/dom/bindings/codegen/parser/tests/test_promise.py index 43c74029dc5..ef44a216d10 100644 --- a/components/script/dom/bindings/codegen/parser/tests/test_promise.py +++ b/components/script/dom/bindings/codegen/parser/tests/test_promise.py @@ -64,7 +64,7 @@ def WebIDLTest(parser, harness): try: parser.parse(""" interface A { - void foo(Promise<any>? arg); + undefined foo(Promise<any>? arg); }; """) results = parser.finish(); diff --git a/components/script/dom/bindings/codegen/parser/tests/test_record.py b/components/script/dom/bindings/codegen/parser/tests/test_record.py index d50572caf07..3d83e249be8 100644 --- a/components/script/dom/bindings/codegen/parser/tests/test_record.py +++ b/components/script/dom/bindings/codegen/parser/tests/test_record.py @@ -4,7 +4,7 @@ def WebIDLTest(parser, harness): parser.parse(""" dictionary Dict {}; interface RecordArg { - void foo(record<DOMString, Dict> arg); + undefined foo(record<DOMString, Dict> arg); }; """) @@ -27,16 +27,16 @@ def WebIDLTest(parser, harness): threw = False try: parser.parse(""" - interface RecordVoidArg { - void foo(record<DOMString, void> arg); + interface RecordUndefinedArg { + undefined foo(record<DOMString, undefined> arg); }; """) results = parser.finish() except Exception as x: threw = True - harness.ok(threw, "Should have thrown because record can't have void as value type.") - + harness.ok(threw, "Should have thrown because record can't have undefined as value type.") + parser = parser.reset() threw = False try: 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 442dba45d76..5af0c22803c 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 @@ -6,12 +6,12 @@ def WebIDLTest(parser, harness): interface TestSecureContextOnInterface { const octet TEST_CONSTANT = 0; readonly attribute byte testAttribute; - void testMethod(byte foo); + undefined testMethod(byte foo); }; partial interface TestSecureContextOnInterface { const octet TEST_CONSTANT_2 = 0; readonly attribute byte testAttribute2; - void testMethod2(byte foo); + undefined testMethod2(byte foo); }; """) results = parser.finish() @@ -37,13 +37,13 @@ def WebIDLTest(parser, harness): partial interface TestSecureContextOnInterfaceAfterPartialInterface { const octet TEST_CONSTANT_2 = 0; readonly attribute byte testAttribute2; - void testMethod2(byte foo); + undefined testMethod2(byte foo); }; [SecureContext] interface TestSecureContextOnInterfaceAfterPartialInterface { const octet TEST_CONSTANT = 0; readonly attribute byte testAttribute; - void testMethod(byte foo); + undefined testMethod(byte foo); }; """) results = parser.finish() @@ -68,13 +68,13 @@ def WebIDLTest(parser, harness): interface TestSecureContextOnPartialInterface { const octet TEST_CONSTANT = 0; readonly attribute byte testAttribute; - void testMethod(byte foo); + undefined testMethod(byte foo); }; [SecureContext] partial interface TestSecureContextOnPartialInterface { const octet TEST_CONSTANT_2 = 0; readonly attribute byte testAttribute2; - void testMethod2(byte foo); + undefined testMethod2(byte foo); }; """) results = parser.finish() @@ -105,10 +105,10 @@ def WebIDLTest(parser, harness): [SecureContext] readonly attribute byte testSecureAttribute; readonly attribute byte testNonSecureAttribute2; - void testNonSecureMethod1(byte foo); + undefined testNonSecureMethod1(byte foo); [SecureContext] - void testSecureMethod(byte foo); - void testNonSecureMethod2(byte foo); + undefined testSecureMethod(byte foo); + undefined testNonSecureMethod2(byte foo); }; """) results = parser.finish() @@ -147,10 +147,10 @@ def WebIDLTest(parser, harness): [SecureContext] readonly attribute byte testSecureAttribute; readonly attribute byte testNonSecureAttribute2; - void testNonSecureMethod1(byte foo); + undefined testNonSecureMethod1(byte foo); [SecureContext] - void testSecureMethod(byte foo); - void testNonSecureMethod2(byte foo); + undefined testSecureMethod(byte foo); + undefined testNonSecureMethod2(byte foo); }; """) results = parser.finish() @@ -194,10 +194,10 @@ def WebIDLTest(parser, harness): parser.parse(""" interface TestSecureContextForOverloads1 { [SecureContext] - void testSecureMethod(byte foo); + undefined testSecureMethod(byte foo); }; partial interface TestSecureContextForOverloads1 { - void testSecureMethod(byte foo, byte bar); + undefined testSecureMethod(byte foo, byte bar); }; """) results = parser.finish() @@ -211,11 +211,11 @@ def WebIDLTest(parser, harness): parser.parse(""" interface TestSecureContextForOverloads2 { [SecureContext] - void testSecureMethod(byte foo); + undefined testSecureMethod(byte foo); }; partial interface TestSecureContextForOverloads2 { [SecureContext] - void testSecureMethod(byte foo, byte bar); + undefined testSecureMethod(byte foo, byte bar); }; """) results = parser.finish() @@ -230,7 +230,7 @@ def WebIDLTest(parser, harness): [SecureContext] interface TestSecureContextOnInterfaceAndMember { [SecureContext] - void testSecureMethod(byte foo); + undefined testSecureMethod(byte foo); }; """) results = parser.finish() @@ -247,7 +247,7 @@ def WebIDLTest(parser, harness): [SecureContext] partial interface TestSecureContextOnPartialInterfaceAndMember { [SecureContext] - void testSecureMethod(byte foo); + undefined testSecureMethod(byte foo); }; """) results = parser.finish() @@ -264,7 +264,7 @@ def WebIDLTest(parser, harness): }; partial interface TestSecureContextOnInterfaceAndPartialInterfaceMember { [SecureContext] - void testSecureMethod(byte foo); + undefined testSecureMethod(byte foo); }; """) results = parser.finish() @@ -280,7 +280,7 @@ def WebIDLTest(parser, harness): interface TestSecureContextOnInheritedInterface { }; interface TestSecureContextNotOnInheritingInterface : TestSecureContextOnInheritedInterface { - void testSecureMethod(byte foo); + undefined testSecureMethod(byte foo); }; """) results = parser.finish() @@ -298,7 +298,7 @@ def WebIDLTest(parser, harness): interface mixin TestNonSecureContextMixin { const octet TEST_CONSTANT_2 = 0; readonly attribute byte testAttribute2; - void testMethod2(byte foo); + undefined testMethod2(byte foo); }; TestSecureContextInterfaceThatIncludesNonSecureContextMixin includes TestNonSecureContextMixin; """) @@ -314,13 +314,13 @@ def WebIDLTest(parser, harness): "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] mixin should not be [SecureContext]") - + # Test SecureContext and NoInterfaceObject parser = parser.reset() parser.parse(""" [NoInterfaceObject, SecureContext] interface TestSecureContextNoInterfaceObject { - void testSecureMethod(byte foo); + undefined testSecureMethod(byte foo); }; """) results = parser.finish() diff --git a/components/script/dom/bindings/codegen/parser/tests/test_special_method_signature_mismatch.py b/components/script/dom/bindings/codegen/parser/tests/test_special_method_signature_mismatch.py index 52cfcb96817..b209c850d6b 100644 --- a/components/script/dom/bindings/codegen/parser/tests/test_special_method_signature_mismatch.py +++ b/components/script/dom/bindings/codegen/parser/tests/test_special_method_signature_mismatch.py @@ -17,7 +17,7 @@ def WebIDLTest(parser, harness): try: parser.parse(""" interface SpecialMethodSignatureMismatch2 { - getter void foo(unsigned long index); + getter undefined foo(unsigned long index); }; """) diff --git a/components/script/dom/bindings/codegen/parser/tests/test_special_methods.py b/components/script/dom/bindings/codegen/parser/tests/test_special_methods.py index 7f911733b62..c657c9c797d 100644 --- a/components/script/dom/bindings/codegen/parser/tests/test_special_methods.py +++ b/components/script/dom/bindings/codegen/parser/tests/test_special_methods.py @@ -61,7 +61,7 @@ def WebIDLTest(parser, harness): parser.parse( """ interface IndexedDeleter { - deleter void(unsigned long index); + deleter undefined(unsigned long index); }; """) parser.finish() @@ -69,5 +69,5 @@ def WebIDLTest(parser, harness): threw = True harness.ok(threw, "There are no indexed deleters") - - + + diff --git a/components/script/dom/bindings/codegen/parser/tests/test_typedef.py b/components/script/dom/bindings/codegen/parser/tests/test_typedef.py index b5fc1c68890..d98088380ba 100644 --- a/components/script/dom/bindings/codegen/parser/tests/test_typedef.py +++ b/components/script/dom/bindings/codegen/parser/tests/test_typedef.py @@ -4,9 +4,9 @@ def WebIDLTest(parser, harness): typedef long? mynullablelong; interface Foo { const mylong X = 5; - void foo(optional mynullablelong arg = 7); - void bar(optional mynullablelong arg = null); - void baz(mylong arg); + undefined foo(optional mynullablelong arg = 7); + undefined bar(optional mynullablelong arg = null); + undefined baz(mylong arg); }; """) @@ -21,7 +21,7 @@ def WebIDLTest(parser, harness): parser.parse(""" typedef long? mynullablelong; interface Foo { - void foo(mynullablelong? Y); + undefined foo(mynullablelong? Y); }; """) results = parser.finish() @@ -44,7 +44,7 @@ def WebIDLTest(parser, harness): threw = True harness.ok(threw, "Should have thrown on nullable inside nullable const.") - + parser = parser.reset() threw = False try: 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 770a9d3736f..e72548f637f 100644 --- a/components/script/dom/bindings/codegen/parser/tests/test_unforgeable.py +++ b/components/script/dom/bindings/codegen/parser/tests/test_unforgeable.py @@ -47,7 +47,7 @@ def WebIDLTest(parser, harness): parser = parser.reset(); parser.parse(""" interface Child : Parent { - static void foo(); + static undefined foo(); }; interface Parent { [Unforgeable] readonly attribute long foo; @@ -65,7 +65,7 @@ def WebIDLTest(parser, harness): try: parser.parse(""" interface Child : Parent { - void foo(); + undefined foo(); }; interface Parent { [Unforgeable] readonly attribute long foo; @@ -84,10 +84,10 @@ def WebIDLTest(parser, harness): try: parser.parse(""" interface Child : Parent { - void foo(); + undefined foo(); }; interface Parent { - [Unforgeable] void foo(); + [Unforgeable] undefined foo(); }; """) @@ -125,7 +125,7 @@ def WebIDLTest(parser, harness): attribute short foo; }; interface Parent { - [Unforgeable] void foo(); + [Unforgeable] undefined foo(); }; """) @@ -157,7 +157,7 @@ def WebIDLTest(parser, harness): try: parser.parse(""" interface Child : Parent { - void foo(); + undefined foo(); }; interface Parent {}; interface mixin Mixin { @@ -187,7 +187,7 @@ def WebIDLTest(parser, harness): }; GrandParent includes Mixin; interface mixin ChildMixin { - void foo(); + undefined foo(); }; Child includes ChildMixin; """) @@ -209,11 +209,11 @@ def WebIDLTest(parser, harness): interface Parent : GrandParent {}; interface GrandParent {}; interface mixin Mixin { - [Unforgeable] void foo(); + [Unforgeable] undefined foo(); }; GrandParent includes Mixin; interface mixin ChildMixin { - void foo(); + undefined foo(); }; Child includes ChildMixin; """) diff --git a/components/script/dom/bindings/codegen/parser/tests/test_union.py b/components/script/dom/bindings/codegen/parser/tests/test_union.py index 801314fd0bd..469208b264d 100644 --- a/components/script/dom/bindings/codegen/parser/tests/test_union.py +++ b/components/script/dom/bindings/codegen/parser/tests/test_union.py @@ -136,10 +136,10 @@ def WebIDLTest(parser, harness): """ for (i, type) in enumerate(validUnionTypes): interface += string.Template(""" - void method${i}(${type} arg); + undefined method${i}(${type} arg); ${type} returnMethod${i}(); attribute ${type} attr${i}; - void optionalMethod${i}(${type}? arg); + undefined optionalMethod${i}(${type}? arg); """).substitute(i=i, type=type) interface += """ }; @@ -152,7 +152,7 @@ def WebIDLTest(parser, harness): for invalid in invalidUnionTypes: interface = testPre + string.Template(""" interface TestUnion { - void method(${type} arg); + undefined method(${type} arg); }; """).substitute(type=invalid) diff --git a/components/script/dom/bindings/codegen/parser/tests/test_union_any.py b/components/script/dom/bindings/codegen/parser/tests/test_union_any.py index e34cadab470..3eb67648d56 100644 --- a/components/script/dom/bindings/codegen/parser/tests/test_union_any.py +++ b/components/script/dom/bindings/codegen/parser/tests/test_union_any.py @@ -3,7 +3,7 @@ def WebIDLTest(parser, harness): try: parser.parse(""" interface AnyNotInUnion { - void foo((any or DOMString) arg); + undefined foo((any or DOMString) arg); }; """) diff --git a/components/script/dom/bindings/codegen/parser/tests/test_union_nullable.py b/components/script/dom/bindings/codegen/parser/tests/test_union_nullable.py index 08430a94a2e..71da4349e6e 100644 --- a/components/script/dom/bindings/codegen/parser/tests/test_union_nullable.py +++ b/components/script/dom/bindings/codegen/parser/tests/test_union_nullable.py @@ -3,7 +3,7 @@ def WebIDLTest(parser, harness): try: parser.parse(""" interface OneNullableInUnion { - void foo((object? or DOMString?) arg); + undefined foo((object? or DOMString?) arg); }; """) @@ -20,7 +20,7 @@ def WebIDLTest(parser, harness): try: parser.parse(""" interface NullableInNullableUnion { - void foo((object? or DOMString)? arg); + undefined foo((object? or DOMString)? arg); }; """) @@ -40,7 +40,7 @@ def WebIDLTest(parser, harness): interface NullableInUnionNullableUnionHelper { }; interface NullableInUnionNullableUnion { - void foo(((object? or DOMString) or NullableInUnionNullableUnionHelper)? arg); + undefined foo(((object? or DOMString) or NullableInUnionNullableUnionHelper)? arg); }; """) diff --git a/components/script/dom/bindings/codegen/parser/tests/test_variadic_constraints.py b/components/script/dom/bindings/codegen/parser/tests/test_variadic_constraints.py index 7448e40d5a9..e36eff8b476 100644 --- a/components/script/dom/bindings/codegen/parser/tests/test_variadic_constraints.py +++ b/components/script/dom/bindings/codegen/parser/tests/test_variadic_constraints.py @@ -3,7 +3,7 @@ def WebIDLTest(parser, harness): try: parser.parse(""" interface VariadicConstraints1 { - void foo(byte... arg1, byte arg2); + undefined foo(byte... arg1, byte arg2); }; """) results = parser.finish() @@ -20,7 +20,7 @@ def WebIDLTest(parser, harness): try: parser.parse(""" interface VariadicConstraints2 { - void foo(byte... arg1, optional byte arg2); + undefined foo(byte... arg1, optional byte arg2); }; """) results = parser.finish(); @@ -36,7 +36,7 @@ def WebIDLTest(parser, harness): try: parser.parse(""" interface VariadicConstraints3 { - void foo(optional byte... arg1); + undefined foo(optional byte... arg1); }; """) results = parser.finish() @@ -53,7 +53,7 @@ def WebIDLTest(parser, harness): try: parser.parse(""" interface VariadicConstraints4 { - void foo(byte... arg1 = 0); + undefined foo(byte... arg1 = 0); }; """) results = parser.finish() diff --git a/components/script/dom/webidls/ANGLEInstancedArrays.webidl b/components/script/dom/webidls/ANGLEInstancedArrays.webidl index fc7e5d3efab..4ec6cdffc4e 100644 --- a/components/script/dom/webidls/ANGLEInstancedArrays.webidl +++ b/components/script/dom/webidls/ANGLEInstancedArrays.webidl @@ -9,7 +9,7 @@ [NoInterfaceObject, Exposed=Window] interface ANGLEInstancedArrays { const GLenum VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE = 0x88FE; - void drawArraysInstancedANGLE(GLenum mode, GLint first, GLsizei count, GLsizei primcount); - void drawElementsInstancedANGLE(GLenum mode, GLsizei count, GLenum type, GLintptr offset, GLsizei primcount); - void vertexAttribDivisorANGLE(GLuint index, GLuint divisor); + undefined drawArraysInstancedANGLE(GLenum mode, GLint first, GLsizei count, GLsizei primcount); + undefined drawElementsInstancedANGLE(GLenum mode, GLsizei count, GLenum type, GLintptr offset, GLsizei primcount); + undefined vertexAttribDivisorANGLE(GLuint index, GLuint divisor); }; diff --git a/components/script/dom/webidls/ActivatableElement.webidl b/components/script/dom/webidls/ActivatableElement.webidl index bce7730a833..e9d959c8470 100644 --- a/components/script/dom/webidls/ActivatableElement.webidl +++ b/components/script/dom/webidls/ActivatableElement.webidl @@ -8,8 +8,8 @@ [Exposed=(Window,Worker)] interface mixin ActivatableElement { [Throws, Pref="dom.testing.element.activation.enabled"] - void enterFormalActivationState(); + undefined enterFormalActivationState(); [Throws, Pref="dom.testing.element.activation.enabled"] - void exitFormalActivationState(); + undefined exitFormalActivationState(); }; diff --git a/components/script/dom/webidls/AnalyserNode.webidl b/components/script/dom/webidls/AnalyserNode.webidl index c1398d56378..5bde7c7eb5e 100644 --- a/components/script/dom/webidls/AnalyserNode.webidl +++ b/components/script/dom/webidls/AnalyserNode.webidl @@ -16,10 +16,10 @@ dictionary AnalyserOptions : AudioNodeOptions { [Exposed=Window] interface AnalyserNode : AudioNode { [Throws] constructor(BaseAudioContext context, optional AnalyserOptions options = {}); - void getFloatFrequencyData (Float32Array array); - void getByteFrequencyData (Uint8Array array); - void getFloatTimeDomainData (Float32Array array); - void getByteTimeDomainData (Uint8Array array); + undefined getFloatFrequencyData (Float32Array array); + undefined getByteFrequencyData (Uint8Array array); + undefined getFloatTimeDomainData (Float32Array array); + undefined getByteTimeDomainData (Uint8Array array); [SetterThrows] attribute unsigned long fftSize; readonly attribute unsigned long frequencyBinCount; [SetterThrows] attribute double minDecibels; diff --git a/components/script/dom/webidls/AudioBuffer.webidl b/components/script/dom/webidls/AudioBuffer.webidl index 75b3b470838..56a735ec3f3 100644 --- a/components/script/dom/webidls/AudioBuffer.webidl +++ b/components/script/dom/webidls/AudioBuffer.webidl @@ -20,10 +20,10 @@ interface AudioBuffer { readonly attribute double duration; readonly attribute unsigned long numberOfChannels; [Throws] Float32Array getChannelData(unsigned long channel); - [Throws] void copyFromChannel(Float32Array destination, + [Throws] undefined copyFromChannel(Float32Array destination, unsigned long channelNumber, optional unsigned long startInChannel = 0); - [Throws] void copyToChannel(Float32Array source, + [Throws] undefined copyToChannel(Float32Array source, unsigned long channelNumber, optional unsigned long startInChannel = 0); }; diff --git a/components/script/dom/webidls/AudioBufferSourceNode.webidl b/components/script/dom/webidls/AudioBufferSourceNode.webidl index 8744a521ddb..7c0d3538b1d 100644 --- a/components/script/dom/webidls/AudioBufferSourceNode.webidl +++ b/components/script/dom/webidls/AudioBufferSourceNode.webidl @@ -24,7 +24,7 @@ interface AudioBufferSourceNode : AudioScheduledSourceNode { attribute boolean loop; attribute double loopStart; attribute double loopEnd; - [Throws] void start(optional double when = 0, + [Throws] undefined start(optional double when = 0, optional double offset, optional double duration); }; diff --git a/components/script/dom/webidls/AudioContext.webidl b/components/script/dom/webidls/AudioContext.webidl index 09d6693b690..8f36c54d0fc 100644 --- a/components/script/dom/webidls/AudioContext.webidl +++ b/components/script/dom/webidls/AudioContext.webidl @@ -30,8 +30,8 @@ interface AudioContext : BaseAudioContext { AudioTimestamp getOutputTimestamp(); - Promise<void> suspend(); - Promise<void> close(); + Promise<undefined> suspend(); + Promise<undefined> close(); [Throws] MediaElementAudioSourceNode createMediaElementSource(HTMLMediaElement mediaElement); [Throws] MediaStreamAudioSourceNode createMediaStreamSource(MediaStream mediaStream); diff --git a/components/script/dom/webidls/AudioNode.webidl b/components/script/dom/webidls/AudioNode.webidl index bf4f88e02b6..45d97bc5762 100644 --- a/components/script/dom/webidls/AudioNode.webidl +++ b/components/script/dom/webidls/AudioNode.webidl @@ -30,24 +30,24 @@ interface AudioNode : EventTarget { optional unsigned long output = 0, optional unsigned long input = 0); [Throws] - void connect(AudioParam destinationParam, + undefined connect(AudioParam destinationParam, optional unsigned long output = 0); [Throws] - void disconnect(); + undefined disconnect(); [Throws] - void disconnect(unsigned long output); + undefined disconnect(unsigned long output); [Throws] - void disconnect(AudioNode destination); + undefined disconnect(AudioNode destination); [Throws] - void disconnect(AudioNode destination, unsigned long output); + undefined disconnect(AudioNode destination, unsigned long output); [Throws] - void disconnect(AudioNode destination, + undefined disconnect(AudioNode destination, unsigned long output, unsigned long input); [Throws] - void disconnect(AudioParam destination); + undefined disconnect(AudioParam destination); [Throws] - void disconnect(AudioParam destination, unsigned long output); + undefined disconnect(AudioParam destination, unsigned long output); readonly attribute BaseAudioContext context; readonly attribute unsigned long numberOfInputs; diff --git a/components/script/dom/webidls/AudioScheduledSourceNode.webidl b/components/script/dom/webidls/AudioScheduledSourceNode.webidl index 6be6373a7ec..32542cbfa51 100644 --- a/components/script/dom/webidls/AudioScheduledSourceNode.webidl +++ b/components/script/dom/webidls/AudioScheduledSourceNode.webidl @@ -9,6 +9,6 @@ [Exposed=Window] interface AudioScheduledSourceNode : AudioNode { attribute EventHandler onended; - [Throws] void start(optional double when = 0); - [Throws] void stop(optional double when = 0); + [Throws] undefined start(optional double when = 0); + [Throws] undefined stop(optional double when = 0); }; diff --git a/components/script/dom/webidls/BaseAudioContext.webidl b/components/script/dom/webidls/BaseAudioContext.webidl index 57fb677defd..46a7bb945b7 100644 --- a/components/script/dom/webidls/BaseAudioContext.webidl +++ b/components/script/dom/webidls/BaseAudioContext.webidl @@ -12,8 +12,8 @@ enum AudioContextState { "closed" }; -callback DecodeErrorCallback = void (DOMException error); -callback DecodeSuccessCallback = void (AudioBuffer decodedData); +callback DecodeErrorCallback = undefined (DOMException error); +callback DecodeSuccessCallback = undefined (AudioBuffer decodedData); [Exposed=Window] interface BaseAudioContext : EventTarget { @@ -22,7 +22,7 @@ interface BaseAudioContext : EventTarget { readonly attribute double currentTime; readonly attribute AudioListener listener; readonly attribute AudioContextState state; - Promise<void> resume(); + Promise<undefined> resume(); attribute EventHandler onstatechange; [Throws] AudioBuffer createBuffer(unsigned long numberOfChannels, unsigned long length, diff --git a/components/script/dom/webidls/BluetoothDevice.webidl b/components/script/dom/webidls/BluetoothDevice.webidl index 8ead2168146..c514132140d 100644 --- a/components/script/dom/webidls/BluetoothDevice.webidl +++ b/components/script/dom/webidls/BluetoothDevice.webidl @@ -10,8 +10,8 @@ interface BluetoothDevice : EventTarget { readonly attribute DOMString? name; readonly attribute BluetoothRemoteGATTServer? gatt; - Promise<void> watchAdvertisements(); - void unwatchAdvertisements(); + Promise<undefined> watchAdvertisements(); + undefined unwatchAdvertisements(); readonly attribute boolean watchingAdvertisements; }; diff --git a/components/script/dom/webidls/BluetoothRemoteGATTCharacteristic.webidl b/components/script/dom/webidls/BluetoothRemoteGATTCharacteristic.webidl index af85d1c1860..9f41d2450f9 100644 --- a/components/script/dom/webidls/BluetoothRemoteGATTCharacteristic.webidl +++ b/components/script/dom/webidls/BluetoothRemoteGATTCharacteristic.webidl @@ -16,7 +16,7 @@ interface BluetoothRemoteGATTCharacteristic : EventTarget { getDescriptors(optional BluetoothDescriptorUUID descriptor); Promise<ByteString> readValue(); //Promise<DataView> readValue(); - Promise<void> writeValue(BufferSource value); + Promise<undefined> writeValue(BufferSource value); Promise<BluetoothRemoteGATTCharacteristic> startNotifications(); Promise<BluetoothRemoteGATTCharacteristic> stopNotifications(); }; diff --git a/components/script/dom/webidls/BluetoothRemoteGATTDescriptor.webidl b/components/script/dom/webidls/BluetoothRemoteGATTDescriptor.webidl index 37c8722e224..29cbc3040a4 100644 --- a/components/script/dom/webidls/BluetoothRemoteGATTDescriptor.webidl +++ b/components/script/dom/webidls/BluetoothRemoteGATTDescriptor.webidl @@ -12,5 +12,5 @@ interface BluetoothRemoteGATTDescriptor { readonly attribute ByteString? value; Promise<ByteString> readValue(); //Promise<DataView> readValue(); - Promise<void> writeValue(BufferSource value); + Promise<undefined> writeValue(BufferSource value); }; diff --git a/components/script/dom/webidls/BluetoothRemoteGATTServer.webidl b/components/script/dom/webidls/BluetoothRemoteGATTServer.webidl index 324750dc39b..e46cef4a079 100644 --- a/components/script/dom/webidls/BluetoothRemoteGATTServer.webidl +++ b/components/script/dom/webidls/BluetoothRemoteGATTServer.webidl @@ -11,7 +11,7 @@ interface BluetoothRemoteGATTServer { readonly attribute boolean connected; Promise<BluetoothRemoteGATTServer> connect(); [Throws] - void disconnect(); + undefined disconnect(); Promise<BluetoothRemoteGATTService> getPrimaryService(BluetoothServiceUUID service); Promise<sequence<BluetoothRemoteGATTService>> getPrimaryServices(optional BluetoothServiceUUID service); }; diff --git a/components/script/dom/webidls/BroadcastChannel.webidl b/components/script/dom/webidls/BroadcastChannel.webidl index 6d72f3997cf..886ea5761c6 100644 --- a/components/script/dom/webidls/BroadcastChannel.webidl +++ b/components/script/dom/webidls/BroadcastChannel.webidl @@ -11,8 +11,8 @@ interface BroadcastChannel : EventTarget { constructor(DOMString name); readonly attribute DOMString name; - [Throws] void postMessage(any message); - void close(); + [Throws] undefined postMessage(any message); + undefined close(); attribute EventHandler onmessage; attribute EventHandler onmessageerror; }; diff --git a/components/script/dom/webidls/CSSGroupingRule.webidl b/components/script/dom/webidls/CSSGroupingRule.webidl index 3e21e85ecc4..7707f38d984 100644 --- a/components/script/dom/webidls/CSSGroupingRule.webidl +++ b/components/script/dom/webidls/CSSGroupingRule.webidl @@ -7,6 +7,6 @@ interface CSSGroupingRule : CSSRule { [SameObject] readonly attribute CSSRuleList cssRules; [Throws] unsigned long insertRule(DOMString rule, unsigned long index); - [Throws] void deleteRule(unsigned long index); + [Throws] undefined deleteRule(unsigned long index); }; diff --git a/components/script/dom/webidls/CSSKeyframesRule.webidl b/components/script/dom/webidls/CSSKeyframesRule.webidl index e1f30b19015..b812d124733 100644 --- a/components/script/dom/webidls/CSSKeyframesRule.webidl +++ b/components/script/dom/webidls/CSSKeyframesRule.webidl @@ -9,7 +9,7 @@ interface CSSKeyframesRule : CSSRule { attribute DOMString name; readonly attribute CSSRuleList cssRules; - void appendRule(DOMString rule); - void deleteRule(DOMString select); + undefined appendRule(DOMString rule); + undefined deleteRule(DOMString select); CSSKeyframeRule? findRule(DOMString select); }; diff --git a/components/script/dom/webidls/CSSStyleDeclaration.webidl b/components/script/dom/webidls/CSSStyleDeclaration.webidl index 7865195360f..1b67ec6a7fa 100644 --- a/components/script/dom/webidls/CSSStyleDeclaration.webidl +++ b/components/script/dom/webidls/CSSStyleDeclaration.webidl @@ -17,7 +17,7 @@ interface CSSStyleDeclaration { DOMString getPropertyValue(DOMString property); DOMString getPropertyPriority(DOMString property); [CEReactions, Throws] - void setProperty(DOMString property, [TreatNullAs=EmptyString] DOMString value, + undefined setProperty(DOMString property, [TreatNullAs=EmptyString] DOMString value, optional [TreatNullAs=EmptyString] DOMString priority = ""); [CEReactions, Throws] DOMString removeProperty(DOMString property); diff --git a/components/script/dom/webidls/CSSStyleSheet.webidl b/components/script/dom/webidls/CSSStyleSheet.webidl index c09f14a3e8a..0133eefd8a1 100644 --- a/components/script/dom/webidls/CSSStyleSheet.webidl +++ b/components/script/dom/webidls/CSSStyleSheet.webidl @@ -8,5 +8,5 @@ interface CSSStyleSheet : StyleSheet { // readonly attribute CSSRule? ownerRule; [Throws, SameObject] readonly attribute CSSRuleList cssRules; [Throws] unsigned long insertRule(DOMString rule, optional unsigned long index = 0); - [Throws] void deleteRule(unsigned long index); + [Throws] undefined deleteRule(unsigned long index); }; diff --git a/components/script/dom/webidls/CanvasGradient.webidl b/components/script/dom/webidls/CanvasGradient.webidl index ec00d4a73f2..46578087beb 100644 --- a/components/script/dom/webidls/CanvasGradient.webidl +++ b/components/script/dom/webidls/CanvasGradient.webidl @@ -7,7 +7,7 @@ interface CanvasGradient { // opaque object [Throws] - void addColorStop(double offset, DOMString color); + undefined addColorStop(double offset, DOMString color); }; diff --git a/components/script/dom/webidls/CanvasRenderingContext2D.webidl b/components/script/dom/webidls/CanvasRenderingContext2D.webidl index 6216ec50505..2c2cc0a8e5d 100644 --- a/components/script/dom/webidls/CanvasRenderingContext2D.webidl +++ b/components/script/dom/webidls/CanvasRenderingContext2D.webidl @@ -42,17 +42,17 @@ CanvasRenderingContext2D includes CanvasPath; [Exposed=(PaintWorklet, Window, Worker)] interface mixin CanvasState { // state - void save(); // push state on state stack - void restore(); // pop state stack and restore state + undefined save(); // push state on state stack + undefined restore(); // pop state stack and restore state }; [Exposed=(PaintWorklet, Window, Worker)] interface mixin CanvasTransform { // transformations (default transform is the identity matrix) - void scale(unrestricted double x, unrestricted double y); - void rotate(unrestricted double angle); - void translate(unrestricted double x, unrestricted double y); - void transform(unrestricted double a, + undefined scale(unrestricted double x, unrestricted double y); + undefined rotate(unrestricted double angle); + undefined translate(unrestricted double x, unrestricted double y); + undefined transform(unrestricted double a, unrestricted double b, unrestricted double c, unrestricted double d, @@ -60,14 +60,14 @@ interface mixin CanvasTransform { unrestricted double f); [NewObject] DOMMatrix getTransform(); - void setTransform(unrestricted double a, + undefined setTransform(unrestricted double a, unrestricted double b, unrestricted double c, unrestricted double d, unrestricted double e, unrestricted double f); // void setTransform(optional DOMMatrixInit matrix); - void resetTransform(); + undefined resetTransform(); }; [Exposed=(PaintWorklet, Window, Worker)] @@ -114,20 +114,20 @@ interface mixin CanvasFilters { [Exposed=(PaintWorklet, Window, Worker)] interface mixin CanvasRect { // rects - void clearRect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h); - void fillRect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h); - void strokeRect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h); + undefined clearRect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h); + undefined fillRect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h); + undefined strokeRect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h); }; [Exposed=(PaintWorklet, Window, Worker)] interface mixin CanvasDrawPath { // path API (see also CanvasPath) - void beginPath(); - void fill(optional CanvasFillRule fillRule = "nonzero"); + undefined beginPath(); + undefined fill(optional CanvasFillRule fillRule = "nonzero"); //void fill(Path2D path, optional CanvasFillRule fillRule = "nonzero"); - void stroke(); + undefined stroke(); //void stroke(Path2D path); - void clip(optional CanvasFillRule fillRule = "nonzero"); + undefined clip(optional CanvasFillRule fillRule = "nonzero"); //void clip(Path2D path, optional CanvasFillRule fillRule = "nonzero"); boolean isPointInPath(unrestricted double x, unrestricted double y, optional CanvasFillRule fillRule = "nonzero"); @@ -149,7 +149,7 @@ interface mixin CanvasUserInterface { interface mixin CanvasText { // text (see also the CanvasPathDrawingStyles and CanvasTextDrawingStyles interfaces) [Pref="dom.canvas_text.enabled"] - void fillText(DOMString text, unrestricted double x, unrestricted double y, + undefined fillText(DOMString text, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth); //void strokeText(DOMString text, unrestricted double x, unrestricted double y, // optional unrestricted double maxWidth); @@ -161,12 +161,12 @@ interface mixin CanvasText { interface mixin CanvasDrawImage { // drawing images [Throws] - void drawImage(CanvasImageSource image, unrestricted double dx, unrestricted double dy); + undefined drawImage(CanvasImageSource image, unrestricted double dx, unrestricted double dy); [Throws] - void drawImage(CanvasImageSource image, unrestricted double dx, unrestricted double dy, + undefined drawImage(CanvasImageSource image, unrestricted double dx, unrestricted double dy, unrestricted double dw, unrestricted double dh); [Throws] - void drawImage(CanvasImageSource image, unrestricted double sx, unrestricted double sy, + undefined drawImage(CanvasImageSource image, unrestricted double sx, unrestricted double sy, unrestricted double sw, unrestricted double sh, unrestricted double dx, unrestricted double dy, unrestricted double dw, unrestricted double dh); @@ -181,8 +181,8 @@ interface mixin CanvasImageData { ImageData createImageData(ImageData imagedata); [Throws] ImageData getImageData(long sx, long sy, long sw, long sh); - void putImageData(ImageData imagedata, long dx, long dy); - void putImageData(ImageData imagedata, + undefined putImageData(ImageData imagedata, long dx, long dy); + undefined putImageData(ImageData imagedata, long dx, long dy, long dirtyX, long dirtyY, long dirtyWidth, long dirtyHeight); @@ -221,13 +221,13 @@ interface mixin CanvasTextDrawingStyles { [Exposed=(PaintWorklet, Window, Worker)] interface mixin CanvasPath { // shared path API methods - void closePath(); - void moveTo(unrestricted double x, unrestricted double y); - void lineTo(unrestricted double x, unrestricted double y); - void quadraticCurveTo(unrestricted double cpx, unrestricted double cpy, + undefined closePath(); + undefined moveTo(unrestricted double x, unrestricted double y); + undefined lineTo(unrestricted double x, unrestricted double y); + undefined quadraticCurveTo(unrestricted double cpx, unrestricted double cpy, unrestricted double x, unrestricted double y); - void bezierCurveTo(unrestricted double cp1x, + undefined bezierCurveTo(unrestricted double cp1x, unrestricted double cp1y, unrestricted double cp2x, unrestricted double cp2y, @@ -235,18 +235,18 @@ interface mixin CanvasPath { unrestricted double y); [Throws] - void arcTo(unrestricted double x1, unrestricted double y1, + undefined arcTo(unrestricted double x1, unrestricted double y1, unrestricted double x2, unrestricted double y2, unrestricted double radius); - void rect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h); + undefined rect(unrestricted double x, unrestricted double y, unrestricted double w, unrestricted double h); [Throws] - void arc(unrestricted double x, unrestricted double y, unrestricted double radius, + undefined arc(unrestricted double x, unrestricted double y, unrestricted double radius, unrestricted double startAngle, unrestricted double endAngle, optional boolean anticlockwise = false); [Throws] - void ellipse(unrestricted double x, unrestricted double y, unrestricted double radius_x, + undefined ellipse(unrestricted double x, unrestricted double y, unrestricted double radius_x, unrestricted double radius_y, unrestricted double rotation, unrestricted double startAngle, unrestricted double endAngle, optional boolean anticlockwise = false); }; diff --git a/components/script/dom/webidls/CharacterData.webidl b/components/script/dom/webidls/CharacterData.webidl index e69f862afc9..34dc42c2db8 100644 --- a/components/script/dom/webidls/CharacterData.webidl +++ b/components/script/dom/webidls/CharacterData.webidl @@ -15,13 +15,13 @@ interface CharacterData : Node { [Pure] readonly attribute unsigned long length; [Pure, Throws] DOMString substringData(unsigned long offset, unsigned long count); - void appendData(DOMString data); + undefined appendData(DOMString data); [Throws] - void insertData(unsigned long offset, DOMString data); + undefined insertData(unsigned long offset, DOMString data); [Throws] - void deleteData(unsigned long offset, unsigned long count); + undefined deleteData(unsigned long offset, unsigned long count); [Throws] - void replaceData(unsigned long offset, unsigned long count, DOMString data); + undefined replaceData(unsigned long offset, unsigned long count, DOMString data); }; CharacterData includes ChildNode; diff --git a/components/script/dom/webidls/ChildNode.webidl b/components/script/dom/webidls/ChildNode.webidl index 8964653fffc..ec8ad17aa2f 100644 --- a/components/script/dom/webidls/ChildNode.webidl +++ b/components/script/dom/webidls/ChildNode.webidl @@ -8,13 +8,13 @@ interface mixin ChildNode { [Throws, CEReactions, Unscopable] - void before((Node or DOMString)... nodes); + undefined before((Node or DOMString)... nodes); [Throws, CEReactions, Unscopable] - void after((Node or DOMString)... nodes); + undefined after((Node or DOMString)... nodes); [Throws, CEReactions, Unscopable] - void replaceWith((Node or DOMString)... nodes); + undefined replaceWith((Node or DOMString)... nodes); [CEReactions, Unscopable] - void remove(); + undefined remove(); }; interface mixin NonDocumentTypeChildNode { diff --git a/components/script/dom/webidls/Console.webidl b/components/script/dom/webidls/Console.webidl index c41e46d8535..19cff567d6a 100644 --- a/components/script/dom/webidls/Console.webidl +++ b/components/script/dom/webidls/Console.webidl @@ -9,20 +9,20 @@ ProtoObjectHack] namespace console { // Logging - void log(DOMString... messages); - void debug(DOMString... messages); - void info(DOMString... messages); - void warn(DOMString... messages); - void error(DOMString... messages); - void assert(boolean condition, optional DOMString message); - void clear(); + undefined log(DOMString... messages); + undefined debug(DOMString... messages); + undefined info(DOMString... messages); + undefined warn(DOMString... messages); + undefined error(DOMString... messages); + undefined assert(boolean condition, optional DOMString message); + undefined clear(); // Grouping - void group(DOMString... data); - void groupCollapsed(DOMString... data); - void groupEnd(); + undefined group(DOMString... data); + undefined groupCollapsed(DOMString... data); + undefined groupEnd(); // Timing - void time(DOMString message); - void timeEnd(DOMString message); + undefined time(DOMString message); + undefined timeEnd(DOMString message); }; diff --git a/components/script/dom/webidls/CustomElementRegistry.webidl b/components/script/dom/webidls/CustomElementRegistry.webidl index 1d6f638d67e..8f9347296a9 100644 --- a/components/script/dom/webidls/CustomElementRegistry.webidl +++ b/components/script/dom/webidls/CustomElementRegistry.webidl @@ -6,13 +6,17 @@ [Exposed=Window, Pref="dom.custom_elements.enabled"] interface CustomElementRegistry { [Throws, CEReactions] - void define(DOMString name, CustomElementConstructor constructor_, optional ElementDefinitionOptions options = {}); + undefined define( + DOMString name, + CustomElementConstructor constructor_, + optional ElementDefinitionOptions options = {} + ); any get(DOMString name); Promise<CustomElementConstructor> whenDefined(DOMString name); - [CEReactions] void upgrade(Node root); + [CEReactions] undefined upgrade(Node root); }; callback CustomElementConstructor = HTMLElement(); diff --git a/components/script/dom/webidls/CustomEvent.webidl b/components/script/dom/webidls/CustomEvent.webidl index 604286881df..36e01e0d9b2 100644 --- a/components/script/dom/webidls/CustomEvent.webidl +++ b/components/script/dom/webidls/CustomEvent.webidl @@ -18,7 +18,7 @@ interface CustomEvent : Event { [Throws] constructor(DOMString type, optional CustomEventInit eventInitDict = {}); readonly attribute any detail; - void initCustomEvent(DOMString type, boolean bubbles, boolean cancelable, any detail); + undefined initCustomEvent(DOMString type, boolean bubbles, boolean cancelable, any detail); }; dictionary CustomEventInit : EventInit { diff --git a/components/script/dom/webidls/DOMStringMap.webidl b/components/script/dom/webidls/DOMStringMap.webidl index 0acf6f70228..39891f24096 100644 --- a/components/script/dom/webidls/DOMStringMap.webidl +++ b/components/script/dom/webidls/DOMStringMap.webidl @@ -7,7 +7,7 @@ interface DOMStringMap { getter DOMString (DOMString name); [CEReactions, Throws] - setter void (DOMString name, DOMString value); + setter undefined (DOMString name, DOMString value); [CEReactions] - deleter void (DOMString name); + deleter undefined (DOMString name); }; diff --git a/components/script/dom/webidls/DOMTokenList.webidl b/components/script/dom/webidls/DOMTokenList.webidl index b67dbb1a1dc..6be5eb4f232 100644 --- a/components/script/dom/webidls/DOMTokenList.webidl +++ b/components/script/dom/webidls/DOMTokenList.webidl @@ -13,9 +13,9 @@ interface DOMTokenList { [Pure] boolean contains(DOMString token); [CEReactions, Throws] - void add(DOMString... tokens); + undefined add(DOMString... tokens); [CEReactions, Throws] - void remove(DOMString... tokens); + undefined remove(DOMString... tokens); [CEReactions, Throws] boolean toggle(DOMString token, optional boolean force); [CEReactions, Throws] diff --git a/components/script/dom/webidls/DedicatedWorkerGlobalScope.webidl b/components/script/dom/webidls/DedicatedWorkerGlobalScope.webidl index 2df97dbacfe..43ff22b5f6d 100644 --- a/components/script/dom/webidls/DedicatedWorkerGlobalScope.webidl +++ b/components/script/dom/webidls/DedicatedWorkerGlobalScope.webidl @@ -5,9 +5,9 @@ // https://html.spec.whatwg.org/multipage/#dedicatedworkerglobalscope [Global=(Worker,DedicatedWorker), Exposed=DedicatedWorker] /*sealed*/ interface DedicatedWorkerGlobalScope : WorkerGlobalScope { - [Throws] void postMessage(any message, sequence<object> transfer); - [Throws] void postMessage(any message, optional PostMessageOptions options = {}); + [Throws] undefined postMessage(any message, sequence<object> transfer); + [Throws] undefined postMessage(any message, optional PostMessageOptions options = {}); attribute EventHandler onmessage; - void close(); + undefined close(); }; diff --git a/components/script/dom/webidls/DissimilarOriginLocation.webidl b/components/script/dom/webidls/DissimilarOriginLocation.webidl index 8c077665704..20821e48fc6 100644 --- a/components/script/dom/webidls/DissimilarOriginLocation.webidl +++ b/components/script/dom/webidls/DissimilarOriginLocation.webidl @@ -17,9 +17,9 @@ [Exposed=(Window,DissimilarOriginWindow), Unforgeable, NoInterfaceObject] interface DissimilarOriginLocation { [Throws] attribute USVString href; - [Throws] void assign(USVString url); - [Throws] void replace(USVString url); - [Throws] void reload(); + [Throws] undefined assign(USVString url); + [Throws] undefined replace(USVString url); + [Throws] undefined reload(); [Throws] stringifier; // TODO: finish this interface diff --git a/components/script/dom/webidls/DissimilarOriginWindow.webidl b/components/script/dom/webidls/DissimilarOriginWindow.webidl index b690736469a..755409c7964 100644 --- a/components/script/dom/webidls/DissimilarOriginWindow.webidl +++ b/components/script/dom/webidls/DissimilarOriginWindow.webidl @@ -23,11 +23,11 @@ interface DissimilarOriginWindow : GlobalScope { [Replaceable] readonly attribute unsigned long length; [Unforgeable] readonly attribute DissimilarOriginLocation location; - void close(); + undefined close(); readonly attribute boolean closed; - [Throws] void postMessage(any message, USVString targetOrigin, optional sequence<object> transfer = []); - [Throws] void postMessage(any message, optional WindowPostMessageOptions options = {}); + [Throws] undefined postMessage(any message, USVString targetOrigin, optional sequence<object> transfer = []); + [Throws] undefined postMessage(any message, optional WindowPostMessageOptions options = {}); attribute any opener; - void blur(); - void focus(); + undefined blur(); + undefined focus(); }; diff --git a/components/script/dom/webidls/Document.webidl b/components/script/dom/webidls/Document.webidl index d2429e51489..3f169a35153 100644 --- a/components/script/dom/webidls/Document.webidl +++ b/components/script/dom/webidls/Document.webidl @@ -126,11 +126,11 @@ partial /*sealed*/ interface Document { [CEReactions, Throws] WindowProxy? open(USVString url, DOMString name, DOMString features); [CEReactions, Throws] - void close(); + undefined close(); [CEReactions, Throws] - void write(DOMString... text); + undefined write(DOMString... text); [CEReactions, Throws] - void writeln(DOMString... text); + undefined writeln(DOMString... text); // user interaction readonly attribute Window?/*Proxy?*/ defaultView; @@ -179,9 +179,9 @@ partial interface Document { [SameObject] readonly attribute HTMLCollection applets; - void clear(); - void captureEvents(); - void releaseEvents(); + undefined clear(); + undefined captureEvents(); + undefined releaseEvents(); // Tracking issue for document.all: https://github.com/servo/servo/issues/7396 // readonly attribute HTMLAllCollection all; @@ -193,7 +193,7 @@ partial interface Document { [LenientSetter] readonly attribute Element? fullscreenElement; [LenientSetter] readonly attribute boolean fullscreen; // historical - Promise<void> exitFullscreen(); + Promise<undefined> exitFullscreen(); attribute EventHandler onfullscreenchange; attribute EventHandler onfullscreenerror; diff --git a/components/script/dom/webidls/Element.webidl b/components/script/dom/webidls/Element.webidl index 4c44b2cd431..319964a7e74 100644 --- a/components/script/dom/webidls/Element.webidl +++ b/components/script/dom/webidls/Element.webidl @@ -44,13 +44,13 @@ interface Element : Node { [CEReactions, Throws] boolean toggleAttribute(DOMString name, optional boolean force); [CEReactions, Throws] - void setAttribute(DOMString name, DOMString value); + undefined setAttribute(DOMString name, DOMString value); [CEReactions, Throws] - void setAttributeNS(DOMString? namespace, DOMString name, DOMString value); + undefined setAttributeNS(DOMString? namespace, DOMString name, DOMString value); [CEReactions] - void removeAttribute(DOMString name); + undefined removeAttribute(DOMString name); [CEReactions] - void removeAttributeNS(DOMString? namespace, DOMString localName); + undefined removeAttributeNS(DOMString? namespace, DOMString localName); boolean hasAttribute(DOMString name); boolean hasAttributeNS(DOMString? namespace, DOMString localName); @@ -79,9 +79,9 @@ interface Element : Node { [CEReactions, Throws] Element? insertAdjacentElement(DOMString where_, Element element); // historical [Throws] - void insertAdjacentText(DOMString where_, DOMString data); + undefined insertAdjacentText(DOMString where_, DOMString data); [CEReactions, Throws] - void insertAdjacentHTML(DOMString position, DOMString html); + undefined insertAdjacentHTML(DOMString position, DOMString html); [Throws, Pref="dom.shadowdom.enabled"] ShadowRoot attachShadow(); }; @@ -92,13 +92,13 @@ partial interface Element { [NewObject] DOMRect getBoundingClientRect(); - void scroll(optional ScrollToOptions options = {}); - void scroll(unrestricted double x, unrestricted double y); + undefined scroll(optional ScrollToOptions options = {}); + undefined scroll(unrestricted double x, unrestricted double y); - void scrollTo(optional ScrollToOptions options = {}); - void scrollTo(unrestricted double x, unrestricted double y); - void scrollBy(optional ScrollToOptions options = {}); - void scrollBy(unrestricted double x, unrestricted double y); + undefined scrollTo(optional ScrollToOptions options = {}); + undefined scrollTo(unrestricted double x, unrestricted double y); + undefined scrollBy(optional ScrollToOptions options = {}); + undefined scrollBy(unrestricted double x, unrestricted double y); attribute unrestricted double scrollTop; attribute unrestricted double scrollLeft; readonly attribute long scrollWidth; @@ -120,7 +120,7 @@ partial interface Element { // https://fullscreen.spec.whatwg.org/#api partial interface Element { - Promise<void> requestFullscreen(); + Promise<undefined> requestFullscreen(); }; Element includes ChildNode; diff --git a/components/script/dom/webidls/Event.webidl b/components/script/dom/webidls/Event.webidl index 0c2c122e044..e7888b38fb3 100644 --- a/components/script/dom/webidls/Event.webidl +++ b/components/script/dom/webidls/Event.webidl @@ -21,16 +21,16 @@ interface Event { const unsigned short BUBBLING_PHASE = 3; readonly attribute unsigned short eventPhase; - void stopPropagation(); + undefined stopPropagation(); attribute boolean cancelBubble; - void stopImmediatePropagation(); + undefined stopImmediatePropagation(); [Pure] readonly attribute boolean bubbles; [Pure] readonly attribute boolean cancelable; attribute boolean returnValue; // historical - void preventDefault(); + undefined preventDefault(); [Pure] readonly attribute boolean defaultPrevented; @@ -39,7 +39,7 @@ interface Event { [Constant] readonly attribute DOMHighResTimeStamp timeStamp; - void initEvent(DOMString type, optional boolean bubbles = false, optional boolean cancelable = false); + undefined initEvent(DOMString type, optional boolean bubbles = false, optional boolean cancelable = false); }; dictionary EventInit { diff --git a/components/script/dom/webidls/EventListener.webidl b/components/script/dom/webidls/EventListener.webidl index f384e661c63..13ed93be5ad 100644 --- a/components/script/dom/webidls/EventListener.webidl +++ b/components/script/dom/webidls/EventListener.webidl @@ -7,6 +7,6 @@ [Exposed=Window] callback interface EventListener { - void handleEvent(Event event); + undefined handleEvent(Event event); }; diff --git a/components/script/dom/webidls/EventSource.webidl b/components/script/dom/webidls/EventSource.webidl index 5525970891b..c76885bd2e0 100644 --- a/components/script/dom/webidls/EventSource.webidl +++ b/components/script/dom/webidls/EventSource.webidl @@ -22,7 +22,7 @@ interface EventSource : EventTarget { attribute EventHandler onopen; attribute EventHandler onmessage; attribute EventHandler onerror; - void close(); + undefined close(); }; dictionary EventSourceInit { diff --git a/components/script/dom/webidls/EventTarget.webidl b/components/script/dom/webidls/EventTarget.webidl index dd0236c910c..82e8c967483 100644 --- a/components/script/dom/webidls/EventTarget.webidl +++ b/components/script/dom/webidls/EventTarget.webidl @@ -8,13 +8,13 @@ [Exposed=(Window,Worker,Worklet,DissimilarOriginWindow)] interface EventTarget { [Throws] constructor(); - void addEventListener( + undefined addEventListener( DOMString type, EventListener? callback, optional (AddEventListenerOptions or boolean) options = {} ); - void removeEventListener( + undefined removeEventListener( DOMString type, EventListener? callback, optional (EventListenerOptions or boolean) options = {} diff --git a/components/script/dom/webidls/ExtendableEvent.webidl b/components/script/dom/webidls/ExtendableEvent.webidl index 99cafa305a6..0b030873fc5 100644 --- a/components/script/dom/webidls/ExtendableEvent.webidl +++ b/components/script/dom/webidls/ExtendableEvent.webidl @@ -9,7 +9,7 @@ interface ExtendableEvent : Event { [Throws] constructor(DOMString type, optional ExtendableEventInit eventInitDict = {}); - [Throws] void waitUntil(/*Promise<*/any/*>*/ f); + [Throws] undefined waitUntil(/*Promise<*/any/*>*/ f); }; dictionary ExtendableEventInit : EventInit { diff --git a/components/script/dom/webidls/FakeXRDevice.webidl b/components/script/dom/webidls/FakeXRDevice.webidl index 6349d70963b..617b18d12f3 100644 --- a/components/script/dom/webidls/FakeXRDevice.webidl +++ b/components/script/dom/webidls/FakeXRDevice.webidl @@ -8,27 +8,27 @@ interface FakeXRDevice { // Sets the values to be used for subsequent // requestAnimationFrame() callbacks. - [Throws] void setViews(sequence<FakeXRViewInit> views); + [Throws] undefined setViews(sequence<FakeXRViewInit> views); - [Throws] void setViewerOrigin(FakeXRRigidTransformInit origin, optional boolean emulatedPosition = false); - void clearViewerOrigin(); + [Throws] undefined setViewerOrigin(FakeXRRigidTransformInit origin, optional boolean emulatedPosition = false); + undefined clearViewerOrigin(); - [Throws] void setFloorOrigin(FakeXRRigidTransformInit origin); - void clearFloorOrigin(); + [Throws] undefined setFloorOrigin(FakeXRRigidTransformInit origin); + undefined clearFloorOrigin(); // // Simulates devices focusing and blurring sessions. - void simulateVisibilityChange(XRVisibilityState state); + undefined simulateVisibilityChange(XRVisibilityState state); // void setBoundsGeometry(sequence<FakeXRBoundsPoint> boundsCoodinates); [Throws] FakeXRInputController simulateInputSourceConnection(FakeXRInputSourceInit init); // behaves as if device was disconnected - Promise<void> disconnect(); + Promise<undefined> disconnect(); // Hit test extensions: - [Throws] void setWorld(FakeXRWorldInit world); - void clearWorld(); + [Throws] undefined setWorld(FakeXRWorldInit world); + undefined clearWorld(); }; // https://immersive-web.github.io/webxr/#dom-xrwebgllayer-getviewport diff --git a/components/script/dom/webidls/FakeXRInputController.webidl b/components/script/dom/webidls/FakeXRInputController.webidl index b8faad1038a..3fa4e2e02b2 100644 --- a/components/script/dom/webidls/FakeXRInputController.webidl +++ b/components/script/dom/webidls/FakeXRInputController.webidl @@ -6,19 +6,22 @@ [Exposed=Window, Pref="dom.webxr.test"] interface FakeXRInputController { - void setHandedness(XRHandedness handedness); - void setTargetRayMode(XRTargetRayMode targetRayMode); - void setProfiles(sequence<DOMString> profiles); - [Throws] void setGripOrigin(FakeXRRigidTransformInit gripOrigin, optional boolean emulatedPosition = false); - void clearGripOrigin(); - [Throws] void setPointerOrigin(FakeXRRigidTransformInit pointerOrigin, optional boolean emulatedPosition = false); - - void disconnect(); - void reconnect(); - - void startSelection(); - void endSelection(); - void simulateSelect(); + undefined setHandedness(XRHandedness handedness); + undefined setTargetRayMode(XRTargetRayMode targetRayMode); + undefined setProfiles(sequence<DOMString> profiles); + [Throws] undefined setGripOrigin(FakeXRRigidTransformInit gripOrigin, optional boolean emulatedPosition = false); + undefined clearGripOrigin(); + [Throws] undefined setPointerOrigin( + FakeXRRigidTransformInit pointerOrigin, + optional boolean emulatedPosition = false + ); + + undefined disconnect(); + undefined reconnect(); + + undefined startSelection(); + undefined endSelection(); + undefined simulateSelect(); // void setSupportedButtons(sequence<FakeXRButtonStateInit> supportedButtons); // void updateButtonState(FakeXRButtonStateInit buttonState); diff --git a/components/script/dom/webidls/FileReader.webidl b/components/script/dom/webidls/FileReader.webidl index a1c01fb716c..414958c625b 100644 --- a/components/script/dom/webidls/FileReader.webidl +++ b/components/script/dom/webidls/FileReader.webidl @@ -11,13 +11,13 @@ interface FileReader: EventTarget { // async read methods [Throws] - void readAsArrayBuffer(Blob blob); + undefined readAsArrayBuffer(Blob blob); [Throws] - void readAsText(Blob blob, optional DOMString label); + undefined readAsText(Blob blob, optional DOMString label); [Throws] - void readAsDataURL(Blob blob); + undefined readAsDataURL(Blob blob); - void abort(); + undefined abort(); // states const unsigned short EMPTY = 0; diff --git a/components/script/dom/webidls/FormData.webidl b/components/script/dom/webidls/FormData.webidl index 4e2f5de04ec..ea07dd4249c 100644 --- a/components/script/dom/webidls/FormData.webidl +++ b/components/script/dom/webidls/FormData.webidl @@ -11,13 +11,13 @@ typedef (File or USVString) FormDataEntryValue; [Exposed=(Window,Worker)] interface FormData { [Throws] constructor(optional HTMLFormElement form); - void append(USVString name, USVString value); - void append(USVString name, Blob value, optional USVString filename); - void delete(USVString name); + undefined append(USVString name, USVString value); + undefined append(USVString name, Blob value, optional USVString filename); + undefined delete(USVString name); FormDataEntryValue? get(USVString name); sequence<FormDataEntryValue> getAll(USVString name); boolean has(USVString name); - void set(USVString name, USVString value); - void set(USVString name, Blob value, optional USVString filename); + undefined set(USVString name, USVString value); + undefined set(USVString name, Blob value, optional USVString filename); iterable<USVString, FormDataEntryValue>; }; diff --git a/components/script/dom/webidls/GPUBuffer.webidl b/components/script/dom/webidls/GPUBuffer.webidl index 2097db233e9..819ebb27bab 100644 --- a/components/script/dom/webidls/GPUBuffer.webidl +++ b/components/script/dom/webidls/GPUBuffer.webidl @@ -5,11 +5,11 @@ // https://gpuweb.github.io/gpuweb/#gpubuffer [Exposed=(Window, DedicatedWorker), Serializable, Pref="dom.webgpu.enabled"] interface GPUBuffer { - Promise<void> mapAsync(GPUMapModeFlags mode, optional GPUSize64 offset = 0, optional GPUSize64 size); + Promise<undefined> mapAsync(GPUMapModeFlags mode, optional GPUSize64 offset = 0, optional GPUSize64 size); [Throws] ArrayBuffer getMappedRange(optional GPUSize64 offset = 0, optional GPUSize64 size); - void unmap(); + undefined unmap(); - void destroy(); + undefined destroy(); }; GPUBuffer includes GPUObjectBase; diff --git a/components/script/dom/webidls/GPUCommandEncoder.webidl b/components/script/dom/webidls/GPUCommandEncoder.webidl index 00a8e1ad537..a9395778c80 100644 --- a/components/script/dom/webidls/GPUCommandEncoder.webidl +++ b/components/script/dom/webidls/GPUCommandEncoder.webidl @@ -8,24 +8,24 @@ interface GPUCommandEncoder { GPURenderPassEncoder beginRenderPass(GPURenderPassDescriptor descriptor); GPUComputePassEncoder beginComputePass(optional GPUComputePassDescriptor descriptor = {}); - void copyBufferToBuffer( + undefined copyBufferToBuffer( GPUBuffer source, GPUSize64 sourceOffset, GPUBuffer destination, GPUSize64 destinationOffset, GPUSize64 size); - void copyBufferToTexture( + undefined copyBufferToTexture( GPUBufferCopyView source, GPUTextureCopyView destination, GPUExtent3D copySize); - void copyTextureToBuffer( + undefined copyTextureToBuffer( GPUTextureCopyView source, GPUBufferCopyView destination, GPUExtent3D copySize); - void copyTextureToTexture( + undefined copyTextureToTexture( GPUTextureCopyView source, GPUTextureCopyView destination, GPUExtent3D copySize); diff --git a/components/script/dom/webidls/GPUComputePassEncoder.webidl b/components/script/dom/webidls/GPUComputePassEncoder.webidl index f7c0eba2138..8fd3befe54b 100644 --- a/components/script/dom/webidls/GPUComputePassEncoder.webidl +++ b/components/script/dom/webidls/GPUComputePassEncoder.webidl @@ -5,16 +5,16 @@ // https://gpuweb.github.io/gpuweb/#gpucomputepassencoder [Exposed=(Window, DedicatedWorker), Serializable, Pref="dom.webgpu.enabled"] interface GPUComputePassEncoder { - void setPipeline(GPUComputePipeline pipeline); - void dispatch(GPUSize32 x, optional GPUSize32 y = 1, optional GPUSize32 z = 1); - void dispatchIndirect(GPUBuffer indirectBuffer, GPUSize64 indirectOffset); + undefined setPipeline(GPUComputePipeline pipeline); + undefined dispatch(GPUSize32 x, optional GPUSize32 y = 1, optional GPUSize32 z = 1); + undefined dispatchIndirect(GPUBuffer indirectBuffer, GPUSize64 indirectOffset); //void beginPipelineStatisticsQuery(GPUQuerySet querySet, GPUSize32 queryIndex); //void endPipelineStatisticsQuery(); //void writeTimestamp(GPUQuerySet querySet, GPUSize32 queryIndex); - void endPass(); + undefined endPass(); }; GPUComputePassEncoder includes GPUObjectBase; GPUComputePassEncoder includes GPUProgrammablePassEncoder; diff --git a/components/script/dom/webidls/GPUProgrammablePassEncoder.webidl b/components/script/dom/webidls/GPUProgrammablePassEncoder.webidl index 71bfdcb163e..0da804ed091 100644 --- a/components/script/dom/webidls/GPUProgrammablePassEncoder.webidl +++ b/components/script/dom/webidls/GPUProgrammablePassEncoder.webidl @@ -5,7 +5,7 @@ // https://gpuweb.github.io/gpuweb/#gpuprogrammablepassencoder [Exposed=(Window, DedicatedWorker)] interface mixin GPUProgrammablePassEncoder { - void setBindGroup(GPUIndex32 index, GPUBindGroup bindGroup, + undefined setBindGroup(GPUIndex32 index, GPUBindGroup bindGroup, optional sequence<GPUBufferDynamicOffset> dynamicOffsets = []); // void setBindGroup(GPUIndex32 index, GPUBindGroup bindGroup, diff --git a/components/script/dom/webidls/GPUQueue.webidl b/components/script/dom/webidls/GPUQueue.webidl index a0fede8415e..c6e7e66cb5d 100644 --- a/components/script/dom/webidls/GPUQueue.webidl +++ b/components/script/dom/webidls/GPUQueue.webidl @@ -5,19 +5,19 @@ // https://gpuweb.github.io/gpuweb/#gpuqueue [Exposed=(Window, DedicatedWorker), Serializable, Pref="dom.webgpu.enabled"] interface GPUQueue { - void submit(sequence<GPUCommandBuffer> commandBuffers); + undefined submit(sequence<GPUCommandBuffer> commandBuffers); //GPUFence createFence(optional GPUFenceDescriptor descriptor = {}); //void signal(GPUFence fence, GPUFenceValue signalValue); - [Throws] void writeBuffer( + [Throws] undefined writeBuffer( GPUBuffer buffer, GPUSize64 bufferOffset, /*[AllowShared]*/ BufferSource data, optional GPUSize64 dataOffset = 0, optional GPUSize64 size); - [Throws] void writeTexture( + [Throws] undefined writeTexture( GPUTextureCopyView destination, /*[AllowShared]*/ BufferSource data, GPUTextureDataLayout dataLayout, diff --git a/components/script/dom/webidls/GPURenderEncoderBase.webidl b/components/script/dom/webidls/GPURenderEncoderBase.webidl index f0c4532b446..945d59d718a 100644 --- a/components/script/dom/webidls/GPURenderEncoderBase.webidl +++ b/components/script/dom/webidls/GPURenderEncoderBase.webidl @@ -5,20 +5,25 @@ // https://gpuweb.github.io/gpuweb/#gpurenderencoderbase [Exposed=(Window, DedicatedWorker)] interface mixin GPURenderEncoderBase { - void setPipeline(GPURenderPipeline pipeline); + undefined setPipeline(GPURenderPipeline pipeline); - void setIndexBuffer(GPUBuffer buffer, optional GPUSize64 offset = 0, optional GPUSize64 size = 0); - void setVertexBuffer(GPUIndex32 slot, GPUBuffer buffer, optional GPUSize64 offset = 0, optional GPUSize64 size = 0); + undefined setIndexBuffer(GPUBuffer buffer, optional GPUSize64 offset = 0, optional GPUSize64 size = 0); + undefined setVertexBuffer( + GPUIndex32 slot, + GPUBuffer buffer, + optional GPUSize64 offset = 0, + optional GPUSize64 size = 0 + ); - void draw(GPUSize32 vertexCount, optional GPUSize32 instanceCount = 1, + undefined draw(GPUSize32 vertexCount, optional GPUSize32 instanceCount = 1, optional GPUSize32 firstVertex = 0, optional GPUSize32 firstInstance = 0); - void drawIndexed(GPUSize32 indexCount, optional GPUSize32 instanceCount = 1, + undefined drawIndexed(GPUSize32 indexCount, optional GPUSize32 instanceCount = 1, optional GPUSize32 firstIndex = 0, optional GPUSignedOffset32 baseVertex = 0, optional GPUSize32 firstInstance = 0); - void drawIndirect(GPUBuffer indirectBuffer, GPUSize64 indirectOffset); - void drawIndexedIndirect(GPUBuffer indirectBuffer, GPUSize64 indirectOffset); + undefined drawIndirect(GPUBuffer indirectBuffer, GPUSize64 indirectOffset); + undefined drawIndexedIndirect(GPUBuffer indirectBuffer, GPUSize64 indirectOffset); }; typedef [EnforceRange] long GPUSignedOffset32; diff --git a/components/script/dom/webidls/GPURenderPassEncoder.webidl b/components/script/dom/webidls/GPURenderPassEncoder.webidl index 6261cf89453..65d3fdf7976 100644 --- a/components/script/dom/webidls/GPURenderPassEncoder.webidl +++ b/components/script/dom/webidls/GPURenderPassEncoder.webidl @@ -5,15 +5,15 @@ // https://gpuweb.github.io/gpuweb/#gpurenderpassencoder [Exposed=(Window, DedicatedWorker), Pref="dom.webgpu.enabled"] interface GPURenderPassEncoder { - void setViewport(float x, float y, + undefined setViewport(float x, float y, float width, float height, float minDepth, float maxDepth); - void setScissorRect(GPUIntegerCoordinate x, GPUIntegerCoordinate y, + undefined setScissorRect(GPUIntegerCoordinate x, GPUIntegerCoordinate y, GPUIntegerCoordinate width, GPUIntegerCoordinate height); - void setBlendColor(GPUColor color); - void setStencilReference(GPUStencilValue reference); + undefined setBlendColor(GPUColor color); + undefined setStencilReference(GPUStencilValue reference); //void beginOcclusionQuery(GPUSize32 queryIndex); //void endOcclusionQuery(); @@ -23,8 +23,8 @@ interface GPURenderPassEncoder { //void writeTimestamp(GPUQuerySet querySet, GPUSize32 queryIndex); - void executeBundles(sequence<GPURenderBundle> bundles); - void endPass(); + undefined executeBundles(sequence<GPURenderBundle> bundles); + undefined endPass(); }; GPURenderPassEncoder includes GPUObjectBase; GPURenderPassEncoder includes GPUProgrammablePassEncoder; diff --git a/components/script/dom/webidls/GPUTexture.webidl b/components/script/dom/webidls/GPUTexture.webidl index 9a02a98d577..ad68a533c6c 100644 --- a/components/script/dom/webidls/GPUTexture.webidl +++ b/components/script/dom/webidls/GPUTexture.webidl @@ -7,7 +7,7 @@ interface GPUTexture { GPUTextureView createView(optional GPUTextureViewDescriptor descriptor = {}); - void destroy(); + undefined destroy(); }; GPUTexture includes GPUObjectBase; diff --git a/components/script/dom/webidls/GPUValidationError.webidl b/components/script/dom/webidls/GPUValidationError.webidl index 8e5d211d981..e62feeb7784 100644 --- a/components/script/dom/webidls/GPUValidationError.webidl +++ b/components/script/dom/webidls/GPUValidationError.webidl @@ -17,6 +17,6 @@ enum GPUErrorFilter { }; partial interface GPUDevice { - void pushErrorScope(GPUErrorFilter filter); + undefined pushErrorScope(GPUErrorFilter filter); Promise<GPUError?> popErrorScope(); }; diff --git a/components/script/dom/webidls/HTMLButtonElement.webidl b/components/script/dom/webidls/HTMLButtonElement.webidl index a221f6669cf..178c7bd3a94 100644 --- a/components/script/dom/webidls/HTMLButtonElement.webidl +++ b/components/script/dom/webidls/HTMLButtonElement.webidl @@ -35,7 +35,7 @@ interface HTMLButtonElement : HTMLElement { readonly attribute DOMString validationMessage; boolean checkValidity(); boolean reportValidity(); - void setCustomValidity(DOMString error); + undefined setCustomValidity(DOMString error); readonly attribute NodeList labels; }; diff --git a/components/script/dom/webidls/HTMLDialogElement.webidl b/components/script/dom/webidls/HTMLDialogElement.webidl index f83f2547a72..758839e9015 100644 --- a/components/script/dom/webidls/HTMLDialogElement.webidl +++ b/components/script/dom/webidls/HTMLDialogElement.webidl @@ -15,5 +15,5 @@ interface HTMLDialogElement : HTMLElement { // [CEReactions] // void showModal(); [CEReactions] - void close(optional DOMString returnValue); + undefined close(optional DOMString returnValue); }; diff --git a/components/script/dom/webidls/HTMLElement.webidl b/components/script/dom/webidls/HTMLElement.webidl index c743c0a7129..961e79ec405 100644 --- a/components/script/dom/webidls/HTMLElement.webidl +++ b/components/script/dom/webidls/HTMLElement.webidl @@ -32,11 +32,11 @@ interface HTMLElement : Element { // user interaction [CEReactions] attribute boolean hidden; - void click(); + undefined click(); // [CEReactions] // attribute long tabIndex; - void focus(); - void blur(); + undefined focus(); + undefined blur(); // [CEReactions] // attribute DOMString accessKey; //readonly attribute DOMString accessKeyLabel; diff --git a/components/script/dom/webidls/HTMLFieldSetElement.webidl b/components/script/dom/webidls/HTMLFieldSetElement.webidl index 1257540adb3..8774d75a537 100644 --- a/components/script/dom/webidls/HTMLFieldSetElement.webidl +++ b/components/script/dom/webidls/HTMLFieldSetElement.webidl @@ -22,5 +22,5 @@ interface HTMLFieldSetElement : HTMLElement { readonly attribute DOMString validationMessage; boolean checkValidity(); boolean reportValidity(); - void setCustomValidity(DOMString error); + undefined setCustomValidity(DOMString error); }; diff --git a/components/script/dom/webidls/HTMLFormElement.webidl b/components/script/dom/webidls/HTMLFormElement.webidl index 8bd872eba95..21d23b68d9b 100644 --- a/components/script/dom/webidls/HTMLFormElement.webidl +++ b/components/script/dom/webidls/HTMLFormElement.webidl @@ -34,10 +34,10 @@ interface HTMLFormElement : HTMLElement { getter Element? (unsigned long index); getter (RadioNodeList or Element) (DOMString name); - void submit(); - [Throws] void requestSubmit(optional HTMLElement? submitter = null); + undefined submit(); + [Throws] undefined requestSubmit(optional HTMLElement? submitter = null); [CEReactions] - void reset(); + undefined reset(); boolean checkValidity(); boolean reportValidity(); }; diff --git a/components/script/dom/webidls/HTMLInputElement.webidl b/components/script/dom/webidls/HTMLInputElement.webidl index 6b8c557e83d..3c9f2516717 100644 --- a/components/script/dom/webidls/HTMLInputElement.webidl +++ b/components/script/dom/webidls/HTMLInputElement.webidl @@ -79,19 +79,19 @@ interface HTMLInputElement : HTMLElement { // [CEReactions] // attribute unsigned long width; - [Throws] void stepUp(optional long n = 1); - [Throws] void stepDown(optional long n = 1); + [Throws] undefined stepUp(optional long n = 1); + [Throws] undefined stepDown(optional long n = 1); readonly attribute boolean willValidate; readonly attribute ValidityState validity; readonly attribute DOMString validationMessage; boolean checkValidity(); boolean reportValidity(); - void setCustomValidity(DOMString error); + undefined setCustomValidity(DOMString error); readonly attribute NodeList? labels; - void select(); + undefined select(); [SetterThrows] attribute unsigned long? selectionStart; [SetterThrows] @@ -99,18 +99,18 @@ interface HTMLInputElement : HTMLElement { [SetterThrows] attribute DOMString? selectionDirection; [Throws] - void setRangeText(DOMString replacement); + undefined setRangeText(DOMString replacement); [Throws] - void setRangeText(DOMString replacement, unsigned long start, unsigned long end, + undefined setRangeText(DOMString replacement, unsigned long start, unsigned long end, optional SelectionMode selectionMode = "preserve"); [Throws] - void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction); + undefined setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction); // also has obsolete members // Select with file-system paths for testing purpose [Pref="dom.testing.htmlinputelement.select_files.enabled"] - void selectFiles(sequence<DOMString> path); + undefined selectFiles(sequence<DOMString> path); }; // https://html.spec.whatwg.org/multipage/#HTMLInputElement-partial diff --git a/components/script/dom/webidls/HTMLMediaElement.webidl b/components/script/dom/webidls/HTMLMediaElement.webidl index fd658913ca5..a2c7866a3fe 100644 --- a/components/script/dom/webidls/HTMLMediaElement.webidl +++ b/components/script/dom/webidls/HTMLMediaElement.webidl @@ -24,7 +24,7 @@ interface HTMLMediaElement : HTMLElement { readonly attribute unsigned short networkState; [CEReactions] attribute DOMString preload; readonly attribute TimeRanges buffered; - void load(); + undefined load(); CanPlayTypeResult canPlayType(DOMString type); // ready state @@ -38,7 +38,7 @@ interface HTMLMediaElement : HTMLElement { // playback state attribute double currentTime; - void fastSeek(double time); + undefined fastSeek(double time); readonly attribute unrestricted double duration; // Date getStartDate(); readonly attribute boolean paused; @@ -49,8 +49,8 @@ interface HTMLMediaElement : HTMLElement { readonly attribute boolean ended; [CEReactions] attribute boolean autoplay; [CEReactions] attribute boolean loop; - Promise<void> play(); - void pause(); + Promise<undefined> play(); + undefined pause(); // controls [CEReactions] attribute boolean controls; diff --git a/components/script/dom/webidls/HTMLObjectElement.webidl b/components/script/dom/webidls/HTMLObjectElement.webidl index 9d60c4a4f92..4c47fcfb93f 100644 --- a/components/script/dom/webidls/HTMLObjectElement.webidl +++ b/components/script/dom/webidls/HTMLObjectElement.webidl @@ -30,7 +30,7 @@ interface HTMLObjectElement : HTMLElement { readonly attribute DOMString validationMessage; boolean checkValidity(); boolean reportValidity(); - void setCustomValidity(DOMString error); + undefined setCustomValidity(DOMString error); //legacycaller any (any... arguments); diff --git a/components/script/dom/webidls/HTMLOptionsCollection.webidl b/components/script/dom/webidls/HTMLOptionsCollection.webidl index 91906b785fb..c2b8baa24d6 100644 --- a/components/script/dom/webidls/HTMLOptionsCollection.webidl +++ b/components/script/dom/webidls/HTMLOptionsCollection.webidl @@ -9,10 +9,10 @@ interface HTMLOptionsCollection : HTMLCollection { [CEReactions] attribute unsigned long length; // shadows inherited length [CEReactions, Throws] - setter void (unsigned long index, HTMLOptionElement? option); + setter undefined (unsigned long index, HTMLOptionElement? option); [CEReactions, Throws] - void add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null); + undefined add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null); [CEReactions] - void remove(long index); + undefined remove(long index); attribute long selectedIndex; }; diff --git a/components/script/dom/webidls/HTMLOutputElement.webidl b/components/script/dom/webidls/HTMLOutputElement.webidl index c44f2a7f44c..403938ad8f8 100644 --- a/components/script/dom/webidls/HTMLOutputElement.webidl +++ b/components/script/dom/webidls/HTMLOutputElement.webidl @@ -23,7 +23,7 @@ interface HTMLOutputElement : HTMLElement { readonly attribute DOMString validationMessage; boolean checkValidity(); boolean reportValidity(); - void setCustomValidity(DOMString error); + undefined setCustomValidity(DOMString error); readonly attribute NodeList labels; }; diff --git a/components/script/dom/webidls/HTMLSelectElement.webidl b/components/script/dom/webidls/HTMLSelectElement.webidl index 91258f88ee8..d73c1737c8d 100644 --- a/components/script/dom/webidls/HTMLSelectElement.webidl +++ b/components/script/dom/webidls/HTMLSelectElement.webidl @@ -30,12 +30,12 @@ interface HTMLSelectElement : HTMLElement { HTMLOptionElement? namedItem(DOMString name); [CEReactions, Throws] - void add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null); + undefined add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null); [CEReactions] - void remove(); // ChildNode overload + undefined remove(); // ChildNode overload [CEReactions] - void remove(long index); - [CEReactions, Throws] setter void (unsigned long index, HTMLOptionElement? option); + undefined remove(long index); + [CEReactions, Throws] setter undefined (unsigned long index, HTMLOptionElement? option); // readonly attribute HTMLCollection selectedOptions; attribute long selectedIndex; @@ -46,7 +46,7 @@ interface HTMLSelectElement : HTMLElement { readonly attribute DOMString validationMessage; boolean checkValidity(); boolean reportValidity(); - void setCustomValidity(DOMString error); + undefined setCustomValidity(DOMString error); readonly attribute NodeList labels; }; diff --git a/components/script/dom/webidls/HTMLTableElement.webidl b/components/script/dom/webidls/HTMLTableElement.webidl index 05acced2e57..bc389bfb796 100644 --- a/components/script/dom/webidls/HTMLTableElement.webidl +++ b/components/script/dom/webidls/HTMLTableElement.webidl @@ -11,26 +11,26 @@ interface HTMLTableElement : HTMLElement { attribute HTMLTableCaptionElement? caption; HTMLTableCaptionElement createCaption(); [CEReactions] - void deleteCaption(); + undefined deleteCaption(); [CEReactions, SetterThrows] attribute HTMLTableSectionElement? tHead; HTMLTableSectionElement createTHead(); [CEReactions] - void deleteTHead(); + undefined deleteTHead(); [CEReactions, SetterThrows] attribute HTMLTableSectionElement? tFoot; HTMLTableSectionElement createTFoot(); [CEReactions] - void deleteTFoot(); + undefined deleteTFoot(); readonly attribute HTMLCollection tBodies; HTMLTableSectionElement createTBody(); readonly attribute HTMLCollection rows; [Throws] HTMLTableRowElement insertRow(optional long index = -1); - [CEReactions, Throws] void deleteRow(long index); + [CEReactions, Throws] undefined deleteRow(long index); // also has obsolete members }; diff --git a/components/script/dom/webidls/HTMLTableRowElement.webidl b/components/script/dom/webidls/HTMLTableRowElement.webidl index c51e06e6fdc..3f2db6fb720 100644 --- a/components/script/dom/webidls/HTMLTableRowElement.webidl +++ b/components/script/dom/webidls/HTMLTableRowElement.webidl @@ -13,7 +13,7 @@ interface HTMLTableRowElement : HTMLElement { [Throws] HTMLElement insertCell(optional long index = -1); [CEReactions, Throws] - void deleteCell(long index); + undefined deleteCell(long index); // also has obsolete members }; diff --git a/components/script/dom/webidls/HTMLTableSectionElement.webidl b/components/script/dom/webidls/HTMLTableSectionElement.webidl index e73d16020dc..acb8f89865e 100644 --- a/components/script/dom/webidls/HTMLTableSectionElement.webidl +++ b/components/script/dom/webidls/HTMLTableSectionElement.webidl @@ -11,7 +11,7 @@ interface HTMLTableSectionElement : HTMLElement { [Throws] HTMLElement insertRow(optional long index = -1); [CEReactions, Throws] - void deleteRow(long index); + undefined deleteRow(long index); // also has obsolete members }; diff --git a/components/script/dom/webidls/HTMLTextAreaElement.webidl b/components/script/dom/webidls/HTMLTextAreaElement.webidl index b726946bc48..e9ffbd0a9e6 100644 --- a/components/script/dom/webidls/HTMLTextAreaElement.webidl +++ b/components/script/dom/webidls/HTMLTextAreaElement.webidl @@ -48,11 +48,11 @@ interface HTMLTextAreaElement : HTMLElement { readonly attribute DOMString validationMessage; boolean checkValidity(); boolean reportValidity(); - void setCustomValidity(DOMString error); + undefined setCustomValidity(DOMString error); readonly attribute NodeList labels; - void select(); + undefined select(); [SetterThrows] attribute unsigned long? selectionStart; [SetterThrows] @@ -60,10 +60,10 @@ interface HTMLTextAreaElement : HTMLElement { [SetterThrows] attribute DOMString? selectionDirection; [Throws] - void setRangeText(DOMString replacement); + undefined setRangeText(DOMString replacement); [Throws] - void setRangeText(DOMString replacement, unsigned long start, unsigned long end, + undefined setRangeText(DOMString replacement, unsigned long start, unsigned long end, optional SelectionMode selectionMode = "preserve"); [Throws] - void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction); + undefined setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction); }; diff --git a/components/script/dom/webidls/Headers.webidl b/components/script/dom/webidls/Headers.webidl index dac3d860154..16e35060b90 100644 --- a/components/script/dom/webidls/Headers.webidl +++ b/components/script/dom/webidls/Headers.webidl @@ -10,14 +10,14 @@ typedef (sequence<sequence<ByteString>> or record<ByteString, ByteString>) Heade interface Headers { [Throws] constructor(optional HeadersInit init); [Throws] - void append(ByteString name, ByteString value); + undefined append(ByteString name, ByteString value); [Throws] - void delete(ByteString name); + undefined delete(ByteString name); [Throws] ByteString? get(ByteString name); [Throws] boolean has(ByteString name); [Throws] - void set(ByteString name, ByteString value); + undefined set(ByteString name, ByteString value); iterable<ByteString, ByteString>; }; diff --git a/components/script/dom/webidls/History.webidl b/components/script/dom/webidls/History.webidl index 95248cbcd9b..b54ec98723f 100644 --- a/components/script/dom/webidls/History.webidl +++ b/components/script/dom/webidls/History.webidl @@ -14,13 +14,13 @@ interface History { [Throws] readonly attribute any state; [Throws] - void go(optional long delta = 0); + undefined go(optional long delta = 0); [Throws] - void back(); + undefined back(); [Throws] - void forward(); + undefined forward(); [Throws] - void pushState(any data, DOMString title, optional USVString? url = null); + undefined pushState(any data, DOMString title, optional USVString? url = null); [Throws] - void replaceState(any data, DOMString title, optional USVString? url = null); + undefined replaceState(any data, DOMString title, optional USVString? url = null); }; diff --git a/components/script/dom/webidls/KeyboardEvent.webidl b/components/script/dom/webidls/KeyboardEvent.webidl index 6933a0105ed..9bddcb03a56 100644 --- a/components/script/dom/webidls/KeyboardEvent.webidl +++ b/components/script/dom/webidls/KeyboardEvent.webidl @@ -30,7 +30,7 @@ interface KeyboardEvent : UIEvent { // https://w3c.github.io/uievents/#idl-interface-KeyboardEvent-initializers partial interface KeyboardEvent { // Originally introduced (and deprecated) in DOM Level 3 - void initKeyboardEvent (DOMString typeArg, boolean bubblesArg, boolean cancelableArg, Window? viewArg, + undefined initKeyboardEvent (DOMString typeArg, boolean bubblesArg, boolean cancelableArg, Window? viewArg, DOMString keyArg, unsigned long locationArg, DOMString modifiersListArg, boolean repeat, DOMString locale); }; diff --git a/components/script/dom/webidls/Location.webidl b/components/script/dom/webidls/Location.webidl index 4d9fe2239f2..b56cc220932 100644 --- a/components/script/dom/webidls/Location.webidl +++ b/components/script/dom/webidls/Location.webidl @@ -15,10 +15,10 @@ [Throws] attribute USVString search; [Throws] attribute USVString hash; - [Throws] void assign(USVString url); + [Throws] undefined assign(USVString url); [Throws, CrossOriginCallable] - void replace(USVString url); - [Throws] void reload(); + undefined replace(USVString url); + [Throws] undefined reload(); //[SameObject] readonly attribute USVString[] ancestorOrigins; }; diff --git a/components/script/dom/webidls/MediaList.webidl b/components/script/dom/webidls/MediaList.webidl index b2ba10f0d7a..e3c9cd6e680 100644 --- a/components/script/dom/webidls/MediaList.webidl +++ b/components/script/dom/webidls/MediaList.webidl @@ -8,6 +8,6 @@ interface MediaList { stringifier attribute [TreatNullAs=EmptyString] DOMString mediaText; readonly attribute unsigned long length; getter DOMString? item(unsigned long index); - void appendMedium(DOMString medium); - void deleteMedium(DOMString medium); + undefined appendMedium(DOMString medium); + undefined deleteMedium(DOMString medium); }; diff --git a/components/script/dom/webidls/MediaQueryList.webidl b/components/script/dom/webidls/MediaQueryList.webidl index 3818382645a..2a5c0ac2db0 100644 --- a/components/script/dom/webidls/MediaQueryList.webidl +++ b/components/script/dom/webidls/MediaQueryList.webidl @@ -8,7 +8,7 @@ interface MediaQueryList : EventTarget { readonly attribute DOMString media; readonly attribute boolean matches; - void addListener(EventListener? listener); - void removeListener(EventListener? listener); + undefined addListener(EventListener? listener); + undefined removeListener(EventListener? listener); attribute EventHandler onchange; }; diff --git a/components/script/dom/webidls/MediaSession.webidl b/components/script/dom/webidls/MediaSession.webidl index 2680ea0c40b..f8954fb4a06 100644 --- a/components/script/dom/webidls/MediaSession.webidl +++ b/components/script/dom/webidls/MediaSession.webidl @@ -48,7 +48,7 @@ dictionary MediaPositionState { double position; }; -callback MediaSessionActionHandler = void(/*MediaSessionActionDetails details*/); +callback MediaSessionActionHandler = undefined(/*MediaSessionActionDetails details*/); [Exposed=Window] interface MediaSession { @@ -56,7 +56,7 @@ interface MediaSession { attribute MediaSessionPlaybackState playbackState; - void setActionHandler(MediaSessionAction action, MediaSessionActionHandler? handler); + undefined setActionHandler(MediaSessionAction action, MediaSessionActionHandler? handler); - [Throws] void setPositionState(optional MediaPositionState state = {}); + [Throws] undefined setPositionState(optional MediaPositionState state = {}); }; diff --git a/components/script/dom/webidls/MediaStream.webidl b/components/script/dom/webidls/MediaStream.webidl index 3df07a22454..0fd5a6a846d 100644 --- a/components/script/dom/webidls/MediaStream.webidl +++ b/components/script/dom/webidls/MediaStream.webidl @@ -14,8 +14,8 @@ interface MediaStream : EventTarget { sequence<MediaStreamTrack> getVideoTracks(); sequence<MediaStreamTrack> getTracks(); MediaStreamTrack? getTrackById(DOMString trackId); - void addTrack(MediaStreamTrack track); - void removeTrack(MediaStreamTrack track); + undefined addTrack(MediaStreamTrack track); + undefined removeTrack(MediaStreamTrack track); MediaStream clone(); // readonly attribute boolean active; // attribute EventHandler onaddtrack; diff --git a/components/script/dom/webidls/MessageEvent.webidl b/components/script/dom/webidls/MessageEvent.webidl index b37d725b793..3b546cc1b93 100644 --- a/components/script/dom/webidls/MessageEvent.webidl +++ b/components/script/dom/webidls/MessageEvent.webidl @@ -12,7 +12,7 @@ interface MessageEvent : Event { readonly attribute MessageEventSource? source; readonly attribute /*FrozenArray<MessagePort>*/any ports; - void initMessageEvent( + undefined initMessageEvent( DOMString type, optional boolean bubbles = false, optional boolean cancelable = false, diff --git a/components/script/dom/webidls/MessagePort.webidl b/components/script/dom/webidls/MessagePort.webidl index 58a3f06a960..2ba531ce5b2 100644 --- a/components/script/dom/webidls/MessagePort.webidl +++ b/components/script/dom/webidls/MessagePort.webidl @@ -8,10 +8,10 @@ [Exposed=(Window,Worker)] interface MessagePort : EventTarget { - [Throws] void postMessage(any message, sequence<object> transfer); - [Throws] void postMessage(any message, optional PostMessageOptions options = {}); - void start(); - void close(); + [Throws] undefined postMessage(any message, sequence<object> transfer); + [Throws] undefined postMessage(any message, optional PostMessageOptions options = {}); + undefined start(); + undefined close(); // event handlers attribute EventHandler onmessage; diff --git a/components/script/dom/webidls/MouseEvent.webidl b/components/script/dom/webidls/MouseEvent.webidl index 0b7cb644368..ba717f724a4 100644 --- a/components/script/dom/webidls/MouseEvent.webidl +++ b/components/script/dom/webidls/MouseEvent.webidl @@ -44,7 +44,7 @@ dictionary MouseEventInit : EventModifierInit { // https://w3c.github.io/uievents/#idl-interface-MouseEvent-initializers partial interface MouseEvent { // Deprecated in DOM Level 3 - void initMouseEvent (DOMString typeArg, boolean bubblesArg, boolean cancelableArg, + undefined initMouseEvent (DOMString typeArg, boolean bubblesArg, boolean cancelableArg, Window? viewArg, long detailArg, long screenXArg, long screenYArg, long clientXArg, long clientYArg, diff --git a/components/script/dom/webidls/MutationObserver.webidl b/components/script/dom/webidls/MutationObserver.webidl index 7d75c5ed0c4..baa9a1a79b0 100644 --- a/components/script/dom/webidls/MutationObserver.webidl +++ b/components/script/dom/webidls/MutationObserver.webidl @@ -11,12 +11,12 @@ interface MutationObserver { [Throws] constructor(MutationCallback callback); [Throws] - void observe(Node target, optional MutationObserverInit options = {}); - void disconnect(); + undefined observe(Node target, optional MutationObserverInit options = {}); + undefined disconnect(); sequence<MutationRecord> takeRecords(); }; -callback MutationCallback = void (sequence<MutationRecord> mutations, MutationObserver observer); +callback MutationCallback = undefined (sequence<MutationRecord> mutations, MutationObserver observer); dictionary MutationObserverInit { boolean childList = false; diff --git a/components/script/dom/webidls/NavigationPreloadManager.webidl b/components/script/dom/webidls/NavigationPreloadManager.webidl index ba8d329769e..1c2e4d09189 100644 --- a/components/script/dom/webidls/NavigationPreloadManager.webidl +++ b/components/script/dom/webidls/NavigationPreloadManager.webidl @@ -5,9 +5,9 @@ // https://w3c.github.io/ServiceWorker/#navigation-preload-manager [Pref="dom.serviceworker.enabled", SecureContext, Exposed=(Window,Worker)] interface NavigationPreloadManager { - Promise<void> enable(); - Promise<void> disable(); - Promise<void> setHeaderValue(ByteString value); + Promise<undefined> enable(); + Promise<undefined> disable(); + Promise<undefined> setHeaderValue(ByteString value); Promise<NavigationPreloadState> getState(); }; diff --git a/components/script/dom/webidls/Node.webidl b/components/script/dom/webidls/Node.webidl index c8a71dbebb7..0e5624a34f9 100644 --- a/components/script/dom/webidls/Node.webidl +++ b/components/script/dom/webidls/Node.webidl @@ -59,7 +59,7 @@ interface Node : EventTarget { [CEReactions, Pure] attribute DOMString? textContent; [CEReactions] - void normalize(); + undefined normalize(); [CEReactions, Throws] Node cloneNode(optional boolean deep = false); diff --git a/components/script/dom/webidls/NodeIterator.webidl b/components/script/dom/webidls/NodeIterator.webidl index 9c9e1f41e80..ca433fbcfe7 100644 --- a/components/script/dom/webidls/NodeIterator.webidl +++ b/components/script/dom/webidls/NodeIterator.webidl @@ -25,5 +25,5 @@ interface NodeIterator { Node? previousNode(); [Pure] - void detach(); + undefined detach(); }; diff --git a/components/script/dom/webidls/OESVertexArrayObject.webidl b/components/script/dom/webidls/OESVertexArrayObject.webidl index 21c59fd7a88..0996ef45d91 100644 --- a/components/script/dom/webidls/OESVertexArrayObject.webidl +++ b/components/script/dom/webidls/OESVertexArrayObject.webidl @@ -11,7 +11,7 @@ interface OESVertexArrayObject { const unsigned long VERTEX_ARRAY_BINDING_OES = 0x85B5; WebGLVertexArrayObjectOES? createVertexArrayOES(); - void deleteVertexArrayOES(WebGLVertexArrayObjectOES? arrayObject); + undefined deleteVertexArrayOES(WebGLVertexArrayObjectOES? arrayObject); boolean isVertexArrayOES(WebGLVertexArrayObjectOES? arrayObject); - void bindVertexArrayOES(WebGLVertexArrayObjectOES? arrayObject); + undefined bindVertexArrayOES(WebGLVertexArrayObjectOES? arrayObject); }; diff --git a/components/script/dom/webidls/PaintWorkletGlobalScope.webidl b/components/script/dom/webidls/PaintWorkletGlobalScope.webidl index b80bf92dce5..981df09321f 100644 --- a/components/script/dom/webidls/PaintWorkletGlobalScope.webidl +++ b/components/script/dom/webidls/PaintWorkletGlobalScope.webidl @@ -5,9 +5,9 @@ // https://drafts.css-houdini.org/css-paint-api/#paintworkletglobalscope [Global=(Worklet,PaintWorklet), Pref="dom.worklet.enabled", Exposed=PaintWorklet] interface PaintWorkletGlobalScope : WorkletGlobalScope { - [Throws] void registerPaint(DOMString name, VoidFunction paintCtor); + [Throws] undefined registerPaint(DOMString name, VoidFunction paintCtor); // This function is to be used only for testing, and should not be // accessible outside of that use. [Pref="dom.worklet.blockingsleep.enabled"] - void sleep(unsigned long long ms); + undefined sleep(unsigned long long ms); }; diff --git a/components/script/dom/webidls/PannerNode.webidl b/components/script/dom/webidls/PannerNode.webidl index c692a97e278..a5119040b64 100644 --- a/components/script/dom/webidls/PannerNode.webidl +++ b/components/script/dom/webidls/PannerNode.webidl @@ -51,6 +51,6 @@ interface PannerNode : AudioNode { attribute double coneInnerAngle; attribute double coneOuterAngle; [SetterThrows] attribute double coneOuterGain; - void setPosition (float x, float y, float z); - void setOrientation (float x, float y, float z); + undefined setPosition (float x, float y, float z); + undefined setOrientation (float x, float y, float z); }; diff --git a/components/script/dom/webidls/ParentNode.webidl b/components/script/dom/webidls/ParentNode.webidl index a7bcc64cd23..3a35b77dc13 100644 --- a/components/script/dom/webidls/ParentNode.webidl +++ b/components/script/dom/webidls/ParentNode.webidl @@ -17,11 +17,11 @@ interface mixin ParentNode { readonly attribute unsigned long childElementCount; [CEReactions, Throws, Unscopable] - void prepend((Node or DOMString)... nodes); + undefined prepend((Node or DOMString)... nodes); [CEReactions, Throws, Unscopable] - void append((Node or DOMString)... nodes); + undefined append((Node or DOMString)... nodes); [CEReactions, Throws, Unscopable] - void replaceChildren((Node or DOMString)... nodes); + undefined replaceChildren((Node or DOMString)... nodes); [Pure, Throws] Element? querySelector(DOMString selectors); diff --git a/components/script/dom/webidls/Performance.webidl b/components/script/dom/webidls/Performance.webidl index 5db6551ff96..46f751cb4ab 100644 --- a/components/script/dom/webidls/Performance.webidl +++ b/components/script/dom/webidls/Performance.webidl @@ -29,17 +29,17 @@ partial interface Performance { [Exposed=(Window,Worker)] partial interface Performance { [Throws] - void mark(DOMString markName); - void clearMarks(optional DOMString markName); + undefined mark(DOMString markName); + undefined clearMarks(optional DOMString markName); [Throws] - void measure(DOMString measureName, optional DOMString startMark, optional DOMString endMark); - void clearMeasures(optional DOMString measureName); + undefined measure(DOMString measureName, optional DOMString startMark, optional DOMString endMark); + undefined clearMeasures(optional DOMString measureName); }; //https://w3c.github.io/resource-timing/#sec-extensions-performance-interface partial interface Performance { - void clearResourceTimings (); - void setResourceTimingBufferSize (unsigned long maxSize); + undefined clearResourceTimings (); + undefined setResourceTimingBufferSize (unsigned long maxSize); attribute EventHandler onresourcetimingbufferfull; }; diff --git a/components/script/dom/webidls/PerformanceObserver.webidl b/components/script/dom/webidls/PerformanceObserver.webidl index db511a7b4b7..806020eb70f 100644 --- a/components/script/dom/webidls/PerformanceObserver.webidl +++ b/components/script/dom/webidls/PerformanceObserver.webidl @@ -12,14 +12,14 @@ dictionary PerformanceObserverInit { boolean buffered; }; -callback PerformanceObserverCallback = void (PerformanceObserverEntryList entries, PerformanceObserver observer); +callback PerformanceObserverCallback = undefined (PerformanceObserverEntryList entries, PerformanceObserver observer); [Exposed=(Window,Worker)] interface PerformanceObserver { [Throws] constructor(PerformanceObserverCallback callback); [Throws] - void observe(optional PerformanceObserverInit options = {}); - void disconnect(); + undefined observe(optional PerformanceObserverInit options = {}); + undefined disconnect(); PerformanceEntryList takeRecords(); // codegen doesn't like SameObject+static and doesn't know FrozenArray /*[SameObject]*/ static readonly attribute /*FrozenArray<DOMString>*/ any supportedEntryTypes; diff --git a/components/script/dom/webidls/PluginArray.webidl b/components/script/dom/webidls/PluginArray.webidl index 09883cbfad4..53abc12b027 100644 --- a/components/script/dom/webidls/PluginArray.webidl +++ b/components/script/dom/webidls/PluginArray.webidl @@ -5,7 +5,7 @@ // https://html.spec.whatwg.org/multipage/#pluginarray [LegacyUnenumerableNamedProperties, Exposed=Window] interface PluginArray { - void refresh(optional boolean reload = false); + undefined refresh(optional boolean reload = false); readonly attribute unsigned long length; getter Plugin? item(unsigned long index); getter Plugin? namedItem(DOMString name); diff --git a/components/script/dom/webidls/Promise.webidl b/components/script/dom/webidls/Promise.webidl index 6cfbfb68bb0..f4f6616f107 100644 --- a/components/script/dom/webidls/Promise.webidl +++ b/components/script/dom/webidls/Promise.webidl @@ -5,7 +5,7 @@ // This interface is entirely internal to Servo, and should not be accessible to // web pages. -callback PromiseJobCallback = void(); +callback PromiseJobCallback = undefined(); [TreatNonCallableAsNull] callback AnyCallback = any (any value); diff --git a/components/script/dom/webidls/RTCDataChannel.webidl b/components/script/dom/webidls/RTCDataChannel.webidl index cdc3b9fdd48..e67c299bcea 100644 --- a/components/script/dom/webidls/RTCDataChannel.webidl +++ b/components/script/dom/webidls/RTCDataChannel.webidl @@ -21,13 +21,13 @@ interface RTCDataChannel : EventTarget { attribute EventHandler onerror; attribute EventHandler onclosing; attribute EventHandler onclose; - void close(); + undefined close(); attribute EventHandler onmessage; [SetterThrows] attribute DOMString binaryType; - [Throws] void send(USVString data); - [Throws] void send(Blob data); - [Throws] void send(ArrayBuffer data); - [Throws] void send(ArrayBufferView data); + [Throws] undefined send(USVString data); + [Throws] undefined send(Blob data); + [Throws] undefined send(ArrayBuffer data); + [Throws] undefined send(ArrayBufferView data); }; // https://www.w3.org/TR/webrtc/#dom-rtcdatachannelinit diff --git a/components/script/dom/webidls/RTCPeerConnection.webidl b/components/script/dom/webidls/RTCPeerConnection.webidl index d75f2f9c14c..85a7297fce1 100644 --- a/components/script/dom/webidls/RTCPeerConnection.webidl +++ b/components/script/dom/webidls/RTCPeerConnection.webidl @@ -9,15 +9,15 @@ interface RTCPeerConnection : EventTarget { [Throws] constructor(optional RTCConfiguration configuration = {}); Promise<RTCSessionDescriptionInit> createOffer(optional RTCOfferOptions options = {}); Promise<RTCSessionDescriptionInit> createAnswer(optional RTCAnswerOptions options = {}); - Promise<void> setLocalDescription(RTCSessionDescriptionInit description); + Promise<undefined> setLocalDescription(RTCSessionDescriptionInit description); readonly attribute RTCSessionDescription? localDescription; // readonly attribute RTCSessionDescription? currentLocalDescription; // readonly attribute RTCSessionDescription? pendingLocalDescription; - Promise<void> setRemoteDescription(RTCSessionDescriptionInit description); + Promise<undefined> setRemoteDescription(RTCSessionDescriptionInit description); readonly attribute RTCSessionDescription? remoteDescription; // readonly attribute RTCSessionDescription? currentRemoteDescription; // readonly attribute RTCSessionDescription? pendingRemoteDescription; - Promise<void> addIceCandidate(optional RTCIceCandidateInit candidate = {}); + Promise<undefined> addIceCandidate(optional RTCIceCandidateInit candidate = {}); readonly attribute RTCSignalingState signalingState; readonly attribute RTCIceGatheringState iceGatheringState; readonly attribute RTCIceConnectionState iceConnectionState; @@ -26,7 +26,7 @@ interface RTCPeerConnection : EventTarget { // static sequence<RTCIceServer> getDefaultIceServers(); // RTCConfiguration getConfiguration(); // void setConfiguration(RTCConfiguration configuration); - void close(); + undefined close(); attribute EventHandler onnegotiationneeded; attribute EventHandler onicecandidate; // attribute EventHandler onicecandidateerror; @@ -36,7 +36,7 @@ interface RTCPeerConnection : EventTarget { // attribute EventHandler onconnectionstatechange; // removed from spec, but still shipped by browsers - void addStream (MediaStream stream); + undefined addStream (MediaStream stream); }; dictionary RTCConfiguration { diff --git a/components/script/dom/webidls/RTCRtpSender.webidl b/components/script/dom/webidls/RTCRtpSender.webidl index d804b1bb3b7..752ab7682b8 100644 --- a/components/script/dom/webidls/RTCRtpSender.webidl +++ b/components/script/dom/webidls/RTCRtpSender.webidl @@ -39,7 +39,7 @@ interface RTCRtpSender { //readonly attribute MediaStreamTrack? track; //readonly attribute RTCDtlsTransport? transport; //static RTCRtpCapabilities? getCapabilities(DOMString kind); - Promise<void> setParameters(RTCRtpSendParameters parameters); + Promise<undefined> setParameters(RTCRtpSendParameters parameters); RTCRtpSendParameters getParameters(); //Promise<void> replaceTrack(MediaStreamTrack? withTrack); //void setStreams(MediaStream... streams); diff --git a/components/script/dom/webidls/Range.webidl b/components/script/dom/webidls/Range.webidl index 84cd80da0ef..037093a0762 100644 --- a/components/script/dom/webidls/Range.webidl +++ b/components/script/dom/webidls/Range.webidl @@ -25,22 +25,22 @@ interface Range { readonly attribute Node commonAncestorContainer; [Throws] - void setStart(Node refNode, unsigned long offset); + undefined setStart(Node refNode, unsigned long offset); [Throws] - void setEnd(Node refNode, unsigned long offset); + undefined setEnd(Node refNode, unsigned long offset); [Throws] - void setStartBefore(Node refNode); + undefined setStartBefore(Node refNode); [Throws] - void setStartAfter(Node refNode); + undefined setStartAfter(Node refNode); [Throws] - void setEndBefore(Node refNode); + undefined setEndBefore(Node refNode); [Throws] - void setEndAfter(Node refNode); - void collapse(optional boolean toStart = false); + undefined setEndAfter(Node refNode); + undefined collapse(optional boolean toStart = false); [Throws] - void selectNode(Node refNode); + undefined selectNode(Node refNode); [Throws] - void selectNodeContents(Node refNode); + undefined selectNodeContents(Node refNode); const unsigned short START_TO_START = 0; const unsigned short START_TO_END = 1; @@ -49,20 +49,20 @@ interface Range { [Pure, Throws] short compareBoundaryPoints(unsigned short how, Range sourceRange); [CEReactions, Throws] - void deleteContents(); + undefined deleteContents(); [CEReactions, NewObject, Throws] DocumentFragment extractContents(); [CEReactions, NewObject, Throws] DocumentFragment cloneContents(); [CEReactions, Throws] - void insertNode(Node node); + undefined insertNode(Node node); [CEReactions, Throws] - void surroundContents(Node newParent); + undefined surroundContents(Node newParent); [NewObject] Range cloneRange(); [Pure] - void detach(); + undefined detach(); [Pure, Throws] boolean isPointInRange(Node node, unsigned long offset); diff --git a/components/script/dom/webidls/Selection.webidl b/components/script/dom/webidls/Selection.webidl index 38c874e3bf7..b51181286c1 100644 --- a/components/script/dom/webidls/Selection.webidl +++ b/components/script/dom/webidls/Selection.webidl @@ -13,20 +13,20 @@ readonly attribute Node? anchorNode; readonly attribute unsigned long rangeCount; readonly attribute DOMString type; [Throws] Range getRangeAt(unsigned long index); - void addRange(Range range); - [Throws] void removeRange(Range range); - void removeAllRanges(); - void empty(); - [Throws] void collapse(Node? node, optional unsigned long offset = 0); - [Throws] void setPosition(Node? node, optional unsigned long offset = 0); - [Throws] void collapseToStart(); - [Throws] void collapseToEnd(); - [Throws] void extend(Node node, optional unsigned long offset = 0); + undefined addRange(Range range); + [Throws] undefined removeRange(Range range); + undefined removeAllRanges(); + undefined empty(); + [Throws] undefined collapse(Node? node, optional unsigned long offset = 0); + [Throws] undefined setPosition(Node? node, optional unsigned long offset = 0); + [Throws] undefined collapseToStart(); + [Throws] undefined collapseToEnd(); + [Throws] undefined extend(Node node, optional unsigned long offset = 0); [Throws] - void setBaseAndExtent(Node anchorNode, unsigned long anchorOffset, Node focusNode, unsigned long focusOffset); - [Throws] void selectAllChildren(Node node); + undefined setBaseAndExtent(Node anchorNode, unsigned long anchorOffset, Node focusNode, unsigned long focusOffset); + [Throws] undefined selectAllChildren(Node node); [CEReactions, Throws] - void deleteFromDocument(); + undefined deleteFromDocument(); boolean containsNode(Node node, optional boolean allowPartialContainment = false); stringifier DOMString (); }; diff --git a/components/script/dom/webidls/ServiceWorker.webidl b/components/script/dom/webidls/ServiceWorker.webidl index 60bb6dfc4b9..b91a4c55b51 100644 --- a/components/script/dom/webidls/ServiceWorker.webidl +++ b/components/script/dom/webidls/ServiceWorker.webidl @@ -7,8 +7,8 @@ interface ServiceWorker : EventTarget { readonly attribute USVString scriptURL; readonly attribute ServiceWorkerState state; - [Throws] void postMessage(any message, sequence<object> transfer); - [Throws] void postMessage(any message, optional PostMessageOptions options = {}); + [Throws] undefined postMessage(any message, sequence<object> transfer); + [Throws] undefined postMessage(any message, optional PostMessageOptions options = {}); // event attribute EventHandler onstatechange; diff --git a/components/script/dom/webidls/Storage.webidl b/components/script/dom/webidls/Storage.webidl index 380eb72d265..a4912e35f5f 100644 --- a/components/script/dom/webidls/Storage.webidl +++ b/components/script/dom/webidls/Storage.webidl @@ -17,9 +17,9 @@ interface Storage { getter DOMString? getItem(DOMString name); [Throws] - setter void setItem(DOMString name, DOMString value); + setter undefined setItem(DOMString name, DOMString value); - deleter void removeItem(DOMString name); + deleter undefined removeItem(DOMString name); - void clear(); + undefined clear(); }; diff --git a/components/script/dom/webidls/StorageEvent.webidl b/components/script/dom/webidls/StorageEvent.webidl index dbc60b23036..42ce914e49f 100644 --- a/components/script/dom/webidls/StorageEvent.webidl +++ b/components/script/dom/webidls/StorageEvent.webidl @@ -19,7 +19,7 @@ interface StorageEvent : Event { readonly attribute Storage? storageArea; - void initStorageEvent(DOMString type, optional boolean bubbles = false, + undefined initStorageEvent(DOMString type, optional boolean bubbles = false, optional boolean cancelable = false, optional DOMString? key = null, optional DOMString? oldValue = null, optional DOMString? newValue = null, optional USVString url = "", optional Storage? storageArea = null); diff --git a/components/script/dom/webidls/TestBinding.webidl b/components/script/dom/webidls/TestBinding.webidl index 14ab146d8be..7b105f238ab 100644 --- a/components/script/dom/webidls/TestBinding.webidl +++ b/components/script/dom/webidls/TestBinding.webidl @@ -176,8 +176,8 @@ interface TestBinding { [PutForwards=booleanAttribute] readonly attribute TestBinding forwardedAttribute; - [BinaryName="BinaryRenamedMethod"] void methToBinaryRename(); - void receiveVoid(); + [BinaryName="BinaryRenamedMethod"] undefined methToBinaryRename(); + undefined receiveVoid(); boolean receiveBoolean(); byte receiveByte(); octet receiveOctet(); @@ -243,262 +243,262 @@ interface TestBinding { (DOMString or object) receiveUnionIdentity((DOMString or object) arg); - void passBoolean(boolean arg); - void passByte(byte arg); - void passOctet(octet arg); - void passShort(short arg); - void passUnsignedShort(unsigned short arg); - void passLong(long arg); - void passUnsignedLong(unsigned long arg); - void passLongLong(long long arg); - void passUnsignedLongLong(unsigned long long arg); - void passUnrestrictedFloat(unrestricted float arg); - void passFloat(float arg); - void passUnrestrictedDouble(unrestricted double arg); - void passDouble(double arg); - void passString(DOMString arg); - void passUsvstring(USVString arg); - void passByteString(ByteString arg); - void passEnum(TestEnum arg); - void passInterface(Blob arg); - void passTypedArray(Int8Array arg); - void passTypedArray2(ArrayBuffer arg); - void passTypedArray3(ArrayBufferView arg); - void passUnion((HTMLElement or long) arg); - void passUnion2((Event or DOMString) data); - void passUnion3((Blob or DOMString) data); - void passUnion4((DOMString or sequence<DOMString>) seq); - void passUnion5((DOMString or boolean) data); - void passUnion6((unsigned long or boolean) bool); - void passUnion7((sequence<DOMString> or unsigned long) arg); - void passUnion8((sequence<ByteString> or long) arg); - void passUnion9((TestDictionary or long) arg); - void passUnion10((DOMString or object) arg); - void passUnion11((ArrayBuffer or ArrayBufferView) arg); - void passUnionWithTypedef((Document or TestTypedef) arg); - void passUnionWithTypedef2((sequence<long> or TestTypedef) arg); - void passAny(any arg); - void passObject(object arg); - void passCallbackFunction(Function fun); - void passCallbackInterface(EventListener listener); - void passSequence(sequence<long> seq); - void passAnySequence(sequence<any> seq); + undefined passBoolean(boolean arg); + undefined passByte(byte arg); + undefined passOctet(octet arg); + undefined passShort(short arg); + undefined passUnsignedShort(unsigned short arg); + undefined passLong(long arg); + undefined passUnsignedLong(unsigned long arg); + undefined passLongLong(long long arg); + undefined passUnsignedLongLong(unsigned long long arg); + undefined passUnrestrictedFloat(unrestricted float arg); + undefined passFloat(float arg); + undefined passUnrestrictedDouble(unrestricted double arg); + undefined passDouble(double arg); + undefined passString(DOMString arg); + undefined passUsvstring(USVString arg); + undefined passByteString(ByteString arg); + undefined passEnum(TestEnum arg); + undefined passInterface(Blob arg); + undefined passTypedArray(Int8Array arg); + undefined passTypedArray2(ArrayBuffer arg); + undefined passTypedArray3(ArrayBufferView arg); + undefined passUnion((HTMLElement or long) arg); + undefined passUnion2((Event or DOMString) data); + undefined passUnion3((Blob or DOMString) data); + undefined passUnion4((DOMString or sequence<DOMString>) seq); + undefined passUnion5((DOMString or boolean) data); + undefined passUnion6((unsigned long or boolean) bool); + undefined passUnion7((sequence<DOMString> or unsigned long) arg); + undefined passUnion8((sequence<ByteString> or long) arg); + undefined passUnion9((TestDictionary or long) arg); + undefined passUnion10((DOMString or object) arg); + undefined passUnion11((ArrayBuffer or ArrayBufferView) arg); + undefined passUnionWithTypedef((Document or TestTypedef) arg); + undefined passUnionWithTypedef2((sequence<long> or TestTypedef) arg); + undefined passAny(any arg); + undefined passObject(object arg); + undefined passCallbackFunction(Function fun); + undefined passCallbackInterface(EventListener listener); + undefined passSequence(sequence<long> seq); + undefined passAnySequence(sequence<any> seq); sequence<any> anySequencePassthrough(sequence<any> seq); - void passObjectSequence(sequence<object> seq); - void passStringSequence(sequence<DOMString> seq); - void passInterfaceSequence(sequence<Blob> seq); + undefined passObjectSequence(sequence<object> seq); + undefined passStringSequence(sequence<DOMString> seq); + undefined passInterfaceSequence(sequence<Blob> seq); - void passOverloaded(ArrayBuffer arg); - void passOverloaded(DOMString arg); + undefined passOverloaded(ArrayBuffer arg); + undefined passOverloaded(DOMString arg); // https://github.com/servo/servo/pull/26154 DOMString passOverloadedDict(Node arg); DOMString passOverloadedDict(TestURLLike arg); - void passNullableBoolean(boolean? arg); - void passNullableByte(byte? arg); - void passNullableOctet(octet? arg); - void passNullableShort(short? arg); - void passNullableUnsignedShort(unsigned short? arg); - void passNullableLong(long? arg); - void passNullableUnsignedLong(unsigned long? arg); - void passNullableLongLong(long long? arg); - void passNullableUnsignedLongLong(unsigned long long? arg); - void passNullableUnrestrictedFloat(unrestricted float? arg); - void passNullableFloat(float? arg); - void passNullableUnrestrictedDouble(unrestricted double? arg); - void passNullableDouble(double? arg); - void passNullableString(DOMString? arg); - void passNullableUsvstring(USVString? arg); - void passNullableByteString(ByteString? arg); + undefined passNullableBoolean(boolean? arg); + undefined passNullableByte(byte? arg); + undefined passNullableOctet(octet? arg); + undefined passNullableShort(short? arg); + undefined passNullableUnsignedShort(unsigned short? arg); + undefined passNullableLong(long? arg); + undefined passNullableUnsignedLong(unsigned long? arg); + undefined passNullableLongLong(long long? arg); + undefined passNullableUnsignedLongLong(unsigned long long? arg); + undefined passNullableUnrestrictedFloat(unrestricted float? arg); + undefined passNullableFloat(float? arg); + undefined passNullableUnrestrictedDouble(unrestricted double? arg); + undefined passNullableDouble(double? arg); + undefined passNullableString(DOMString? arg); + undefined passNullableUsvstring(USVString? arg); + undefined passNullableByteString(ByteString? arg); // void passNullableEnum(TestEnum? arg); - void passNullableInterface(Blob? arg); - void passNullableObject(object? arg); - void passNullableTypedArray(Int8Array? arg); - void passNullableUnion((HTMLElement or long)? arg); - void passNullableUnion2((Event or DOMString)? data); - void passNullableUnion3((DOMString or sequence<long>)? data); - void passNullableUnion4((sequence<long> or boolean)? bool); - void passNullableUnion5((unsigned long or boolean)? arg); - void passNullableUnion6((ByteString or long)? arg); - void passNullableCallbackFunction(Function? fun); - void passNullableCallbackInterface(EventListener? listener); - void passNullableSequence(sequence<long>? seq); - - void passOptionalBoolean(optional boolean arg); - void passOptionalByte(optional byte arg); - void passOptionalOctet(optional octet arg); - void passOptionalShort(optional short arg); - void passOptionalUnsignedShort(optional unsigned short arg); - void passOptionalLong(optional long arg); - void passOptionalUnsignedLong(optional unsigned long arg); - void passOptionalLongLong(optional long long arg); - void passOptionalUnsignedLongLong(optional unsigned long long arg); - void passOptionalUnrestrictedFloat(optional unrestricted float arg); - void passOptionalFloat(optional float arg); - void passOptionalUnrestrictedDouble(optional unrestricted double arg); - void passOptionalDouble(optional double arg); - void passOptionalString(optional DOMString arg); - void passOptionalUsvstring(optional USVString arg); - void passOptionalByteString(optional ByteString arg); - void passOptionalEnum(optional TestEnum arg); - void passOptionalInterface(optional Blob arg); - void passOptionalUnion(optional (HTMLElement or long) arg); - void passOptionalUnion2(optional (Event or DOMString) data); - void passOptionalUnion3(optional (DOMString or sequence<long>) arg); - void passOptionalUnion4(optional (sequence<long> or boolean) data); - void passOptionalUnion5(optional (unsigned long or boolean) bool); - void passOptionalUnion6(optional (ByteString or long) arg); - void passOptionalAny(optional any arg); - void passOptionalObject(optional object arg); - void passOptionalCallbackFunction(optional Function fun); - void passOptionalCallbackInterface(optional EventListener listener); - void passOptionalSequence(optional sequence<long> seq); - - void passOptionalNullableBoolean(optional boolean? arg); - void passOptionalNullableByte(optional byte? arg); - void passOptionalNullableOctet(optional octet? arg); - void passOptionalNullableShort(optional short? arg); - void passOptionalNullableUnsignedShort(optional unsigned short? arg); - void passOptionalNullableLong(optional long? arg); - void passOptionalNullableUnsignedLong(optional unsigned long? arg); - void passOptionalNullableLongLong(optional long long? arg); - void passOptionalNullableUnsignedLongLong(optional unsigned long long? arg); - void passOptionalNullableUnrestrictedFloat(optional unrestricted float? arg); - void passOptionalNullableFloat(optional float? arg); - void passOptionalNullableUnrestrictedDouble(optional unrestricted double? arg); - void passOptionalNullableDouble(optional double? arg); - void passOptionalNullableString(optional DOMString? arg); - void passOptionalNullableUsvstring(optional USVString? arg); - void passOptionalNullableByteString(optional ByteString? arg); + undefined passNullableInterface(Blob? arg); + undefined passNullableObject(object? arg); + undefined passNullableTypedArray(Int8Array? arg); + undefined passNullableUnion((HTMLElement or long)? arg); + undefined passNullableUnion2((Event or DOMString)? data); + undefined passNullableUnion3((DOMString or sequence<long>)? data); + undefined passNullableUnion4((sequence<long> or boolean)? bool); + undefined passNullableUnion5((unsigned long or boolean)? arg); + undefined passNullableUnion6((ByteString or long)? arg); + undefined passNullableCallbackFunction(Function? fun); + undefined passNullableCallbackInterface(EventListener? listener); + undefined passNullableSequence(sequence<long>? seq); + + undefined passOptionalBoolean(optional boolean arg); + undefined passOptionalByte(optional byte arg); + undefined passOptionalOctet(optional octet arg); + undefined passOptionalShort(optional short arg); + undefined passOptionalUnsignedShort(optional unsigned short arg); + undefined passOptionalLong(optional long arg); + undefined passOptionalUnsignedLong(optional unsigned long arg); + undefined passOptionalLongLong(optional long long arg); + undefined passOptionalUnsignedLongLong(optional unsigned long long arg); + undefined passOptionalUnrestrictedFloat(optional unrestricted float arg); + undefined passOptionalFloat(optional float arg); + undefined passOptionalUnrestrictedDouble(optional unrestricted double arg); + undefined passOptionalDouble(optional double arg); + undefined passOptionalString(optional DOMString arg); + undefined passOptionalUsvstring(optional USVString arg); + undefined passOptionalByteString(optional ByteString arg); + undefined passOptionalEnum(optional TestEnum arg); + undefined passOptionalInterface(optional Blob arg); + undefined passOptionalUnion(optional (HTMLElement or long) arg); + undefined passOptionalUnion2(optional (Event or DOMString) data); + undefined passOptionalUnion3(optional (DOMString or sequence<long>) arg); + undefined passOptionalUnion4(optional (sequence<long> or boolean) data); + undefined passOptionalUnion5(optional (unsigned long or boolean) bool); + undefined passOptionalUnion6(optional (ByteString or long) arg); + undefined passOptionalAny(optional any arg); + undefined passOptionalObject(optional object arg); + undefined passOptionalCallbackFunction(optional Function fun); + undefined passOptionalCallbackInterface(optional EventListener listener); + undefined passOptionalSequence(optional sequence<long> seq); + + undefined passOptionalNullableBoolean(optional boolean? arg); + undefined passOptionalNullableByte(optional byte? arg); + undefined passOptionalNullableOctet(optional octet? arg); + undefined passOptionalNullableShort(optional short? arg); + undefined passOptionalNullableUnsignedShort(optional unsigned short? arg); + undefined passOptionalNullableLong(optional long? arg); + undefined passOptionalNullableUnsignedLong(optional unsigned long? arg); + undefined passOptionalNullableLongLong(optional long long? arg); + undefined passOptionalNullableUnsignedLongLong(optional unsigned long long? arg); + undefined passOptionalNullableUnrestrictedFloat(optional unrestricted float? arg); + undefined passOptionalNullableFloat(optional float? arg); + undefined passOptionalNullableUnrestrictedDouble(optional unrestricted double? arg); + undefined passOptionalNullableDouble(optional double? arg); + undefined passOptionalNullableString(optional DOMString? arg); + undefined passOptionalNullableUsvstring(optional USVString? arg); + undefined passOptionalNullableByteString(optional ByteString? arg); // void passOptionalNullableEnum(optional TestEnum? arg); - void passOptionalNullableInterface(optional Blob? arg); - void passOptionalNullableObject(optional object? arg); - void passOptionalNullableUnion(optional (HTMLElement or long)? arg); - void passOptionalNullableUnion2(optional (Event or DOMString)? data); - void passOptionalNullableUnion3(optional (DOMString or sequence<long>)? arg); - void passOptionalNullableUnion4(optional (sequence<long> or boolean)? data); - void passOptionalNullableUnion5(optional (unsigned long or boolean)? bool); - void passOptionalNullableUnion6(optional (ByteString or long)? arg); - void passOptionalNullableCallbackFunction(optional Function? fun); - void passOptionalNullableCallbackInterface(optional EventListener? listener); - void passOptionalNullableSequence(optional sequence<long>? seq); - - void passOptionalBooleanWithDefault(optional boolean arg = false); - void passOptionalByteWithDefault(optional byte arg = 0); - void passOptionalOctetWithDefault(optional octet arg = 19); - void passOptionalShortWithDefault(optional short arg = 5); - void passOptionalUnsignedShortWithDefault(optional unsigned short arg = 2); - void passOptionalLongWithDefault(optional long arg = 7); - void passOptionalUnsignedLongWithDefault(optional unsigned long arg = 6); - void passOptionalLongLongWithDefault(optional long long arg = -12); - void passOptionalUnsignedLongLongWithDefault(optional unsigned long long arg = 17); - void passOptionalBytestringWithDefault(optional ByteString arg = "x"); - void passOptionalStringWithDefault(optional DOMString arg = "x"); - void passOptionalUsvstringWithDefault(optional USVString arg = "x"); - void passOptionalEnumWithDefault(optional TestEnum arg = "foo"); - void passOptionalSequenceWithDefault(optional sequence<long> seq = []); + undefined passOptionalNullableInterface(optional Blob? arg); + undefined passOptionalNullableObject(optional object? arg); + undefined passOptionalNullableUnion(optional (HTMLElement or long)? arg); + undefined passOptionalNullableUnion2(optional (Event or DOMString)? data); + undefined passOptionalNullableUnion3(optional (DOMString or sequence<long>)? arg); + undefined passOptionalNullableUnion4(optional (sequence<long> or boolean)? data); + undefined passOptionalNullableUnion5(optional (unsigned long or boolean)? bool); + undefined passOptionalNullableUnion6(optional (ByteString or long)? arg); + undefined passOptionalNullableCallbackFunction(optional Function? fun); + undefined passOptionalNullableCallbackInterface(optional EventListener? listener); + undefined passOptionalNullableSequence(optional sequence<long>? seq); + + undefined passOptionalBooleanWithDefault(optional boolean arg = false); + undefined passOptionalByteWithDefault(optional byte arg = 0); + undefined passOptionalOctetWithDefault(optional octet arg = 19); + undefined passOptionalShortWithDefault(optional short arg = 5); + undefined passOptionalUnsignedShortWithDefault(optional unsigned short arg = 2); + undefined passOptionalLongWithDefault(optional long arg = 7); + undefined passOptionalUnsignedLongWithDefault(optional unsigned long arg = 6); + undefined passOptionalLongLongWithDefault(optional long long arg = -12); + undefined passOptionalUnsignedLongLongWithDefault(optional unsigned long long arg = 17); + undefined passOptionalBytestringWithDefault(optional ByteString arg = "x"); + undefined passOptionalStringWithDefault(optional DOMString arg = "x"); + undefined passOptionalUsvstringWithDefault(optional USVString arg = "x"); + undefined passOptionalEnumWithDefault(optional TestEnum arg = "foo"); + undefined passOptionalSequenceWithDefault(optional sequence<long> seq = []); // void passOptionalUnionWithDefault(optional (HTMLElement or long) arg = 9); // void passOptionalUnion2WithDefault(optional(Event or DOMString)? data = "foo"); - void passOptionalNullableBooleanWithDefault(optional boolean? arg = null); - void passOptionalNullableByteWithDefault(optional byte? arg = null); - void passOptionalNullableOctetWithDefault(optional octet? arg = null); - void passOptionalNullableShortWithDefault(optional short? arg = null); - void passOptionalNullableUnsignedShortWithDefault(optional unsigned short? arg = null); - void passOptionalNullableLongWithDefault(optional long? arg = null); - void passOptionalNullableUnsignedLongWithDefault(optional unsigned long? arg = null); - void passOptionalNullableLongLongWithDefault(optional long long? arg = null); - void passOptionalNullableUnsignedLongLongWithDefault(optional unsigned long long? arg = null); - void passOptionalNullableStringWithDefault(optional DOMString? arg = null); - void passOptionalNullableUsvstringWithDefault(optional USVString? arg = null); - void passOptionalNullableByteStringWithDefault(optional ByteString? arg = null); + undefined passOptionalNullableBooleanWithDefault(optional boolean? arg = null); + undefined passOptionalNullableByteWithDefault(optional byte? arg = null); + undefined passOptionalNullableOctetWithDefault(optional octet? arg = null); + undefined passOptionalNullableShortWithDefault(optional short? arg = null); + undefined passOptionalNullableUnsignedShortWithDefault(optional unsigned short? arg = null); + undefined passOptionalNullableLongWithDefault(optional long? arg = null); + undefined passOptionalNullableUnsignedLongWithDefault(optional unsigned long? arg = null); + undefined passOptionalNullableLongLongWithDefault(optional long long? arg = null); + undefined passOptionalNullableUnsignedLongLongWithDefault(optional unsigned long long? arg = null); + undefined passOptionalNullableStringWithDefault(optional DOMString? arg = null); + undefined passOptionalNullableUsvstringWithDefault(optional USVString? arg = null); + undefined passOptionalNullableByteStringWithDefault(optional ByteString? arg = null); // void passOptionalNullableEnumWithDefault(optional TestEnum? arg = null); - void passOptionalNullableInterfaceWithDefault(optional Blob? arg = null); - void passOptionalNullableObjectWithDefault(optional object? arg = null); - void passOptionalNullableUnionWithDefault(optional (HTMLElement or long)? arg = null); - void passOptionalNullableUnion2WithDefault(optional (Event or DOMString)? data = null); + undefined passOptionalNullableInterfaceWithDefault(optional Blob? arg = null); + undefined passOptionalNullableObjectWithDefault(optional object? arg = null); + undefined passOptionalNullableUnionWithDefault(optional (HTMLElement or long)? arg = null); + undefined passOptionalNullableUnion2WithDefault(optional (Event or DOMString)? data = null); // void passOptionalNullableCallbackFunctionWithDefault(optional Function? fun = null); - void passOptionalNullableCallbackInterfaceWithDefault(optional EventListener? listener = null); - void passOptionalAnyWithDefault(optional any arg = null); - - void passOptionalNullableBooleanWithNonNullDefault(optional boolean? arg = false); - void passOptionalNullableByteWithNonNullDefault(optional byte? arg = 7); - void passOptionalNullableOctetWithNonNullDefault(optional octet? arg = 7); - void passOptionalNullableShortWithNonNullDefault(optional short? arg = 7); - void passOptionalNullableUnsignedShortWithNonNullDefault(optional unsigned short? arg = 7); - void passOptionalNullableLongWithNonNullDefault(optional long? arg = 7); - void passOptionalNullableUnsignedLongWithNonNullDefault(optional unsigned long? arg = 7); - void passOptionalNullableLongLongWithNonNullDefault(optional long long? arg = 7); - void passOptionalNullableUnsignedLongLongWithNonNullDefault(optional unsigned long long? arg = 7); + undefined passOptionalNullableCallbackInterfaceWithDefault(optional EventListener? listener = null); + undefined passOptionalAnyWithDefault(optional any arg = null); + + undefined passOptionalNullableBooleanWithNonNullDefault(optional boolean? arg = false); + undefined passOptionalNullableByteWithNonNullDefault(optional byte? arg = 7); + undefined passOptionalNullableOctetWithNonNullDefault(optional octet? arg = 7); + undefined passOptionalNullableShortWithNonNullDefault(optional short? arg = 7); + undefined passOptionalNullableUnsignedShortWithNonNullDefault(optional unsigned short? arg = 7); + undefined passOptionalNullableLongWithNonNullDefault(optional long? arg = 7); + undefined passOptionalNullableUnsignedLongWithNonNullDefault(optional unsigned long? arg = 7); + undefined passOptionalNullableLongLongWithNonNullDefault(optional long long? arg = 7); + undefined passOptionalNullableUnsignedLongLongWithNonNullDefault(optional unsigned long long? arg = 7); // void passOptionalNullableUnrestrictedFloatWithNonNullDefault(optional unrestricted float? arg = 0.0); // void passOptionalNullableFloatWithNonNullDefault(optional float? arg = 0.0); // void passOptionalNullableUnrestrictedDoubleWithNonNullDefault(optional unrestricted double? arg = 0.0); // void passOptionalNullableDoubleWithNonNullDefault(optional double? arg = 0.0); - void passOptionalNullableStringWithNonNullDefault(optional DOMString? arg = "x"); - void passOptionalNullableUsvstringWithNonNullDefault(optional USVString? arg = "x"); + undefined passOptionalNullableStringWithNonNullDefault(optional DOMString? arg = "x"); + undefined passOptionalNullableUsvstringWithNonNullDefault(optional USVString? arg = "x"); // void passOptionalNullableEnumWithNonNullDefault(optional TestEnum? arg = "foo"); // void passOptionalNullableUnionWithNonNullDefault(optional (HTMLElement or long)? arg = 7); // void passOptionalNullableUnion2WithNonNullDefault(optional (Event or DOMString)? data = "foo"); TestBinding passOptionalOverloaded(TestBinding arg0, optional unsigned long arg1 = 0, optional unsigned long arg2 = 0); - void passOptionalOverloaded(Blob arg0, optional unsigned long arg1 = 0); - - void passVariadicBoolean(boolean... args); - void passVariadicBooleanAndDefault(optional boolean arg = true, boolean... args); - void passVariadicByte(byte... args); - void passVariadicOctet(octet... args); - void passVariadicShort(short... args); - void passVariadicUnsignedShort(unsigned short... args); - void passVariadicLong(long... args); - void passVariadicUnsignedLong(unsigned long... args); - void passVariadicLongLong(long long... args); - void passVariadicUnsignedLongLong(unsigned long long... args); - void passVariadicUnrestrictedFloat(unrestricted float... args); - void passVariadicFloat(float... args); - void passVariadicUnrestrictedDouble(unrestricted double... args); - void passVariadicDouble(double... args); - void passVariadicString(DOMString... args); - void passVariadicUsvstring(USVString... args); - void passVariadicByteString(ByteString... args); - void passVariadicEnum(TestEnum... args); - void passVariadicInterface(Blob... args); - void passVariadicUnion((HTMLElement or long)... args); - void passVariadicUnion2((Event or DOMString)... args); - void passVariadicUnion3((Blob or DOMString)... args); - void passVariadicUnion4((Blob or boolean)... args); - void passVariadicUnion5((DOMString or unsigned long)... args); - void passVariadicUnion6((unsigned long or boolean)... args); - void passVariadicUnion7((ByteString or long)... args); - void passVariadicAny(any... args); - void passVariadicObject(object... args); - - void passSequenceSequence(sequence<sequence<long>> seq); + undefined passOptionalOverloaded(Blob arg0, optional unsigned long arg1 = 0); + + undefined passVariadicBoolean(boolean... args); + undefined passVariadicBooleanAndDefault(optional boolean arg = true, boolean... args); + undefined passVariadicByte(byte... args); + undefined passVariadicOctet(octet... args); + undefined passVariadicShort(short... args); + undefined passVariadicUnsignedShort(unsigned short... args); + undefined passVariadicLong(long... args); + undefined passVariadicUnsignedLong(unsigned long... args); + undefined passVariadicLongLong(long long... args); + undefined passVariadicUnsignedLongLong(unsigned long long... args); + undefined passVariadicUnrestrictedFloat(unrestricted float... args); + undefined passVariadicFloat(float... args); + undefined passVariadicUnrestrictedDouble(unrestricted double... args); + undefined passVariadicDouble(double... args); + undefined passVariadicString(DOMString... args); + undefined passVariadicUsvstring(USVString... args); + undefined passVariadicByteString(ByteString... args); + undefined passVariadicEnum(TestEnum... args); + undefined passVariadicInterface(Blob... args); + undefined passVariadicUnion((HTMLElement or long)... args); + undefined passVariadicUnion2((Event or DOMString)... args); + undefined passVariadicUnion3((Blob or DOMString)... args); + undefined passVariadicUnion4((Blob or boolean)... args); + undefined passVariadicUnion5((DOMString or unsigned long)... args); + undefined passVariadicUnion6((unsigned long or boolean)... args); + undefined passVariadicUnion7((ByteString or long)... args); + undefined passVariadicAny(any... args); + undefined passVariadicObject(object... args); + + undefined passSequenceSequence(sequence<sequence<long>> seq); sequence<sequence<long>> returnSequenceSequence(); - void passUnionSequenceSequence((long or sequence<sequence<long>>) seq); - - void passRecord(record<DOMString, long> arg); - void passRecordWithUSVStringKey(record<USVString, long> arg); - void passRecordWithByteStringKey(record<ByteString, long> arg); - void passNullableRecord(record<DOMString, long>? arg); - void passRecordOfNullableInts(record<DOMString, long?> arg); - void passOptionalRecordOfNullableInts(optional record<DOMString, long?> arg); - void passOptionalNullableRecordOfNullableInts(optional record<DOMString, long?>? arg); - void passCastableObjectRecord(record<DOMString, TestBinding> arg); - void passNullableCastableObjectRecord(record<DOMString, TestBinding?> arg); - void passCastableObjectNullableRecord(record<DOMString, TestBinding>? arg); - void passNullableCastableObjectNullableRecord(record<DOMString, TestBinding?>? arg); - void passOptionalRecord(optional record<DOMString, long> arg); - void passOptionalNullableRecord(optional record<DOMString, long>? arg); - void passOptionalNullableRecordWithDefaultValue(optional record<DOMString, long>? arg = null); - void passOptionalObjectRecord(optional record<DOMString, TestBinding> arg); - void passStringRecord(record<DOMString, DOMString> arg); - void passByteStringRecord(record<DOMString, ByteString> arg); - void passRecordOfRecords(record<DOMString, record<DOMString, long>> arg); - - void passRecordUnion((long or record<DOMString, ByteString>) init); - void passRecordUnion2((TestBinding or record<DOMString, ByteString>) init); - void passRecordUnion3((TestBinding or sequence<sequence<ByteString>> or record<DOMString, ByteString>) init); + undefined passUnionSequenceSequence((long or sequence<sequence<long>>) seq); + + undefined passRecord(record<DOMString, long> arg); + undefined passRecordWithUSVStringKey(record<USVString, long> arg); + undefined passRecordWithByteStringKey(record<ByteString, long> arg); + undefined passNullableRecord(record<DOMString, long>? arg); + undefined passRecordOfNullableInts(record<DOMString, long?> arg); + undefined passOptionalRecordOfNullableInts(optional record<DOMString, long?> arg); + undefined passOptionalNullableRecordOfNullableInts(optional record<DOMString, long?>? arg); + undefined passCastableObjectRecord(record<DOMString, TestBinding> arg); + undefined passNullableCastableObjectRecord(record<DOMString, TestBinding?> arg); + undefined passCastableObjectNullableRecord(record<DOMString, TestBinding>? arg); + undefined passNullableCastableObjectNullableRecord(record<DOMString, TestBinding?>? arg); + undefined passOptionalRecord(optional record<DOMString, long> arg); + undefined passOptionalNullableRecord(optional record<DOMString, long>? arg); + undefined passOptionalNullableRecordWithDefaultValue(optional record<DOMString, long>? arg = null); + undefined passOptionalObjectRecord(optional record<DOMString, TestBinding> arg); + undefined passStringRecord(record<DOMString, DOMString> arg); + undefined passByteStringRecord(record<DOMString, ByteString> arg); + undefined passRecordOfRecords(record<DOMString, record<DOMString, long>> arg); + + undefined passRecordUnion((long or record<DOMString, ByteString>) init); + undefined passRecordUnion2((TestBinding or record<DOMString, ByteString>) init); + undefined passRecordUnion3((TestBinding or sequence<sequence<ByteString>> or record<DOMString, ByteString>) init); record<DOMString, long> receiveRecord(); record<USVString, long> receiveRecordWithUSVStringKey(); @@ -510,7 +510,7 @@ interface TestBinding { record<DOMString, any> receiveAnyRecord(); static attribute boolean booleanAttributeStatic; - static void receiveVoidStatic(); + static undefined receiveVoidStatic(); boolean BooleanMozPreference(DOMString pref_name); DOMString StringMozPreference(DOMString pref_name); @@ -519,22 +519,22 @@ interface TestBinding { [Pref="dom.testbinding.prefcontrolled.enabled"] static readonly attribute boolean prefControlledStaticAttributeDisabled; [Pref="dom.testbinding.prefcontrolled.enabled"] - void prefControlledMethodDisabled(); + undefined prefControlledMethodDisabled(); [Pref="dom.testbinding.prefcontrolled.enabled"] - static void prefControlledStaticMethodDisabled(); + static undefined prefControlledStaticMethodDisabled(); [Pref="dom.testbinding.prefcontrolled.enabled"] const unsigned short prefControlledConstDisabled = 0; [Pref="layout.animations.test.enabled"] - void advanceClock(long millis); + undefined advanceClock(long millis); [Pref="dom.testbinding.prefcontrolled2.enabled"] readonly attribute boolean prefControlledAttributeEnabled; [Pref="dom.testbinding.prefcontrolled2.enabled"] static readonly attribute boolean prefControlledStaticAttributeEnabled; [Pref="dom.testbinding.prefcontrolled2.enabled"] - void prefControlledMethodEnabled(); + undefined prefControlledMethodEnabled(); [Pref="dom.testbinding.prefcontrolled2.enabled"] - static void prefControlledStaticMethodEnabled(); + static undefined prefControlledStaticMethodEnabled(); [Pref="dom.testbinding.prefcontrolled2.enabled"] const unsigned short prefControlledConstEnabled = 0; @@ -543,9 +543,9 @@ interface TestBinding { [Func="TestBinding::condition_unsatisfied"] static readonly attribute boolean funcControlledStaticAttributeDisabled; [Func="TestBinding::condition_unsatisfied"] - void funcControlledMethodDisabled(); + undefined funcControlledMethodDisabled(); [Func="TestBinding::condition_unsatisfied"] - static void funcControlledStaticMethodDisabled(); + static undefined funcControlledStaticMethodDisabled(); [Func="TestBinding::condition_unsatisfied"] const unsigned short funcControlledConstDisabled = 0; @@ -554,9 +554,9 @@ interface TestBinding { [Func="TestBinding::condition_satisfied"] static readonly attribute boolean funcControlledStaticAttributeEnabled; [Func="TestBinding::condition_satisfied"] - void funcControlledMethodEnabled(); + undefined funcControlledMethodEnabled(); [Func="TestBinding::condition_satisfied"] - static void funcControlledStaticMethodEnabled(); + static undefined funcControlledStaticMethodEnabled(); [Func="TestBinding::condition_satisfied"] const unsigned short funcControlledConstEnabled = 0; @@ -565,14 +565,14 @@ interface TestBinding { [Throws] Promise<any> returnRejectedPromise(any value); readonly attribute Promise<boolean> promiseAttribute; - void acceptPromise(Promise<DOMString> string); + undefined acceptPromise(Promise<DOMString> string); Promise<any> promiseNativeHandler(SimpleCallback? resolve, SimpleCallback? reject); - void promiseResolveNative(Promise<any> p, any value); - void promiseRejectNative(Promise<any> p, any value); - void promiseRejectWithTypeError(Promise<any> p, USVString message); - void resolvePromiseDelayed(Promise<any> p, DOMString value, unsigned long long ms); + undefined promiseResolveNative(Promise<any> p, any value); + undefined promiseRejectNative(Promise<any> p, any value); + undefined promiseRejectWithTypeError(Promise<any> p, USVString message); + undefined resolvePromiseDelayed(Promise<any> p, DOMString value, unsigned long long ms); - void panic(); + undefined panic(); GlobalScope entryGlobal(); GlobalScope incumbentGlobal(); @@ -593,9 +593,9 @@ partial interface TestBinding { readonly attribute boolean semiExposedBoolFromPartialInterface; }; -callback SimpleCallback = void(any value); +callback SimpleCallback = undefined(any value); partial interface TestBinding { [Pref="dom.testable_crash.enabled"] - void crashHard(); + undefined crashHard(); }; diff --git a/components/script/dom/webidls/TestBindingIterable.webidl b/components/script/dom/webidls/TestBindingIterable.webidl index d74c43d8f5f..46a2d319e3d 100644 --- a/components/script/dom/webidls/TestBindingIterable.webidl +++ b/components/script/dom/webidls/TestBindingIterable.webidl @@ -8,7 +8,7 @@ [Pref="dom.testbinding.enabled", Exposed=(Window,Worker)] interface TestBindingIterable { [Throws] constructor(); - void add(DOMString arg); + undefined add(DOMString arg); readonly attribute unsigned long length; getter DOMString getItem(unsigned long index); iterable<DOMString>; diff --git a/components/script/dom/webidls/TestBindingPairIterable.webidl b/components/script/dom/webidls/TestBindingPairIterable.webidl index 5d19fbe9f32..64499e7464c 100644 --- a/components/script/dom/webidls/TestBindingPairIterable.webidl +++ b/components/script/dom/webidls/TestBindingPairIterable.webidl @@ -8,6 +8,6 @@ [Pref="dom.testbinding.enabled", Exposed=(Window,Worker)] interface TestBindingPairIterable { [Throws] constructor(); - void add(DOMString key, unsigned long value); + undefined add(DOMString key, unsigned long value); iterable<DOMString, unsigned long>; }; diff --git a/components/script/dom/webidls/TestBindingProxy.webidl b/components/script/dom/webidls/TestBindingProxy.webidl index 211a4f3a9f7..b16d5104242 100644 --- a/components/script/dom/webidls/TestBindingProxy.webidl +++ b/components/script/dom/webidls/TestBindingProxy.webidl @@ -17,13 +17,13 @@ interface TestBindingProxy : TestBinding { getter DOMString getNamedItem(DOMString item_name); - setter void setNamedItem(DOMString item_name, DOMString value); + setter undefined setNamedItem(DOMString item_name, DOMString value); getter DOMString getItem(unsigned long index); - setter void setItem(unsigned long index, DOMString value); + setter undefined setItem(unsigned long index, DOMString value); - deleter void removeItem(DOMString name); + deleter undefined removeItem(DOMString name); stringifier; }; diff --git a/components/script/dom/webidls/TestRunner.webidl b/components/script/dom/webidls/TestRunner.webidl index bea35374bd6..448be17c4d4 100644 --- a/components/script/dom/webidls/TestRunner.webidl +++ b/components/script/dom/webidls/TestRunner.webidl @@ -9,7 +9,7 @@ [Pref="dom.bluetooth.testing.enabled", Exposed=Window] interface TestRunner { [Throws] - void setBluetoothMockDataSet(DOMString dataSetName); + undefined setBluetoothMockDataSet(DOMString dataSetName); // void setBluetoothManualChooser(); // void getBluetoothManualChooserEvents(BluetoothManualChooserEventsCallback callback); // void sendBluetoothManualChooserEvent(DOMString event, DOMString argument); diff --git a/components/script/dom/webidls/TestWorklet.webidl b/components/script/dom/webidls/TestWorklet.webidl index be254a3d079..81b02da0731 100644 --- a/components/script/dom/webidls/TestWorklet.webidl +++ b/components/script/dom/webidls/TestWorklet.webidl @@ -8,6 +8,6 @@ [Pref="dom.worklet.testing.enabled", Exposed=(Window)] interface TestWorklet { [Throws] constructor(); - [NewObject] Promise<void> addModule(USVString moduleURL, optional WorkletOptions options = {}); + [NewObject] Promise<undefined> addModule(USVString moduleURL, optional WorkletOptions options = {}); DOMString? lookup(DOMString key); }; diff --git a/components/script/dom/webidls/TestWorkletGlobalScope.webidl b/components/script/dom/webidls/TestWorkletGlobalScope.webidl index e3cbec7c052..1c2735dbc65 100644 --- a/components/script/dom/webidls/TestWorkletGlobalScope.webidl +++ b/components/script/dom/webidls/TestWorkletGlobalScope.webidl @@ -7,5 +7,5 @@ [Global=(Worklet,TestWorklet), Pref="dom.worklet.enabled", Exposed=TestWorklet] interface TestWorkletGlobalScope : WorkletGlobalScope { - void registerKeyValue(DOMString key, DOMString value); + undefined registerKeyValue(DOMString key, DOMString value); }; diff --git a/components/script/dom/webidls/TextTrack.webidl b/components/script/dom/webidls/TextTrack.webidl index d51d9b0dc67..c0016ca6ed9 100644 --- a/components/script/dom/webidls/TextTrack.webidl +++ b/components/script/dom/webidls/TextTrack.webidl @@ -22,9 +22,9 @@ interface TextTrack : EventTarget { readonly attribute TextTrackCueList? activeCues; [Throws] - void addCue(TextTrackCue cue); + undefined addCue(TextTrackCue cue); [Throws] - void removeCue(TextTrackCue cue); + undefined removeCue(TextTrackCue cue); attribute EventHandler oncuechange; }; diff --git a/components/script/dom/webidls/UIEvent.webidl b/components/script/dom/webidls/UIEvent.webidl index 12850f70e45..04eb12c2083 100644 --- a/components/script/dom/webidls/UIEvent.webidl +++ b/components/script/dom/webidls/UIEvent.webidl @@ -21,5 +21,11 @@ dictionary UIEventInit : EventInit { // https://w3c.github.io/uievents/#idl-interface-UIEvent-initializers partial interface UIEvent { // Deprecated in DOM Level 3 - void initUIEvent (DOMString typeArg, boolean bubblesArg, boolean cancelableArg, Window? viewArg, long detailArg); + undefined initUIEvent ( + DOMString typeArg, + boolean bubblesArg, + boolean cancelableArg, + Window? viewArg, + long detailArg + ); }; diff --git a/components/script/dom/webidls/URL.webidl b/components/script/dom/webidls/URL.webidl index 47a1ef53129..7059fe43ea5 100644 --- a/components/script/dom/webidls/URL.webidl +++ b/components/script/dom/webidls/URL.webidl @@ -24,7 +24,7 @@ interface URL { // https://w3c.github.io/FileAPI/#creating-revoking static DOMString createObjectURL(Blob blob); // static DOMString createFor(Blob blob); - static void revokeObjectURL(DOMString url); + static undefined revokeObjectURL(DOMString url); USVString toJSON(); }; diff --git a/components/script/dom/webidls/URLSearchParams.webidl b/components/script/dom/webidls/URLSearchParams.webidl index 33ba9253624..8d1d2a48392 100644 --- a/components/script/dom/webidls/URLSearchParams.webidl +++ b/components/script/dom/webidls/URLSearchParams.webidl @@ -9,14 +9,14 @@ [Exposed=(Window,Worker)] interface URLSearchParams { [Throws] constructor(optional (sequence<sequence<USVString>> or record<USVString, USVString> or USVString) init = ""); - void append(USVString name, USVString value); - void delete(USVString name); + undefined append(USVString name, USVString value); + undefined delete(USVString name); USVString? get(USVString name); sequence<USVString> getAll(USVString name); boolean has(USVString name); - void set(USVString name, USVString value); + undefined set(USVString name, USVString value); - void sort(); + undefined sort(); // Be careful with implementing iterable interface. // Search params might be mutated by URL::SetSearch while iterating (discussed in PR #10351). diff --git a/components/script/dom/webidls/VoidFunction.webidl b/components/script/dom/webidls/VoidFunction.webidl index 6c219ff9380..551a69d87e0 100644 --- a/components/script/dom/webidls/VoidFunction.webidl +++ b/components/script/dom/webidls/VoidFunction.webidl @@ -10,4 +10,4 @@ * and create derivative works of this document. */ -callback VoidFunction = void (); +callback VoidFunction = undefined (); diff --git a/components/script/dom/webidls/WebGL2RenderingContext.webidl b/components/script/dom/webidls/WebGL2RenderingContext.webidl index 632f1ce5cc6..3d5d086f554 100644 --- a/components/script/dom/webidls/WebGL2RenderingContext.webidl +++ b/components/script/dom/webidls/WebGL2RenderingContext.webidl @@ -286,33 +286,33 @@ interface mixin WebGL2RenderingContextBase const GLenum MAX_CLIENT_WAIT_TIMEOUT_WEBGL = 0x9247; /* Buffer objects */ - void copyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, + undefined copyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); // MapBufferRange, in particular its read-only and write-only modes, // can not be exposed safely to JavaScript. GetBufferSubData // replaces it for the purpose of fetching data back from the GPU. - void getBufferSubData(GLenum target, GLintptr srcByteOffset, /*[AllowShared]*/ ArrayBufferView dstBuffer, + undefined getBufferSubData(GLenum target, GLintptr srcByteOffset, /*[AllowShared]*/ ArrayBufferView dstBuffer, optional GLuint dstOffset = 0, optional GLuint length = 0); /* Framebuffer objects */ // void blitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, // GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); - void framebufferTextureLayer(GLenum target, GLenum attachment, WebGLTexture? texture, GLint level, + undefined framebufferTextureLayer(GLenum target, GLenum attachment, WebGLTexture? texture, GLint level, GLint layer); - void invalidateFramebuffer(GLenum target, sequence<GLenum> attachments); - void invalidateSubFramebuffer(GLenum target, sequence<GLenum> attachments, + undefined invalidateFramebuffer(GLenum target, sequence<GLenum> attachments); + undefined invalidateSubFramebuffer(GLenum target, sequence<GLenum> attachments, GLint x, GLint y, GLsizei width, GLsizei height); - void readBuffer(GLenum src); + undefined readBuffer(GLenum src); /* Renderbuffer objects */ any getInternalformatParameter(GLenum target, GLenum internalformat, GLenum pname); - void renderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, + undefined renderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); /* Texture objects */ - void texStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, + undefined texStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); - void texStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, + undefined texStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); //[Throws] @@ -365,155 +365,155 @@ interface mixin WebGL2RenderingContextBase [WebGLHandlesContextLoss] GLint getFragDataLocation(WebGLProgram program, DOMString name); /* Uniforms */ - void uniform1ui(WebGLUniformLocation? location, GLuint v0); - void uniform2ui(WebGLUniformLocation? location, GLuint v0, GLuint v1); - void uniform3ui(WebGLUniformLocation? location, GLuint v0, GLuint v1, GLuint v2); - void uniform4ui(WebGLUniformLocation? location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); + undefined uniform1ui(WebGLUniformLocation? location, GLuint v0); + undefined uniform2ui(WebGLUniformLocation? location, GLuint v0, GLuint v1); + undefined uniform3ui(WebGLUniformLocation? location, GLuint v0, GLuint v1, GLuint v2); + undefined uniform4ui(WebGLUniformLocation? location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); - void uniform1uiv(WebGLUniformLocation? location, Uint32List data, optional GLuint srcOffset = 0, + undefined uniform1uiv(WebGLUniformLocation? location, Uint32List data, optional GLuint srcOffset = 0, optional GLuint srcLength = 0); - void uniform2uiv(WebGLUniformLocation? location, Uint32List data, optional GLuint srcOffset = 0, + undefined uniform2uiv(WebGLUniformLocation? location, Uint32List data, optional GLuint srcOffset = 0, optional GLuint srcLength = 0); - void uniform3uiv(WebGLUniformLocation? location, Uint32List data, optional GLuint srcOffset = 0, + undefined uniform3uiv(WebGLUniformLocation? location, Uint32List data, optional GLuint srcOffset = 0, optional GLuint srcLength = 0); - void uniform4uiv(WebGLUniformLocation? location, Uint32List data, optional GLuint srcOffset = 0, + undefined uniform4uiv(WebGLUniformLocation? location, Uint32List data, optional GLuint srcOffset = 0, optional GLuint srcLength = 0); - void uniformMatrix3x2fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data, + undefined uniformMatrix3x2fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data, optional GLuint srcOffset = 0, optional GLuint srcLength = 0); - void uniformMatrix4x2fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data, + undefined uniformMatrix4x2fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data, optional GLuint srcOffset = 0, optional GLuint srcLength = 0); - void uniformMatrix2x3fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data, + undefined uniformMatrix2x3fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data, optional GLuint srcOffset = 0, optional GLuint srcLength = 0); - void uniformMatrix4x3fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data, + undefined uniformMatrix4x3fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data, optional GLuint srcOffset = 0, optional GLuint srcLength = 0); - void uniformMatrix2x4fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data, + undefined uniformMatrix2x4fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data, optional GLuint srcOffset = 0, optional GLuint srcLength = 0); - void uniformMatrix3x4fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data, + undefined uniformMatrix3x4fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data, optional GLuint srcOffset = 0, optional GLuint srcLength = 0); /* Vertex attribs */ - void vertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w); - void vertexAttribI4iv(GLuint index, Int32List values); - void vertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); - void vertexAttribI4uiv(GLuint index, Uint32List values); - void vertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); + undefined vertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w); + undefined vertexAttribI4iv(GLuint index, Int32List values); + undefined vertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); + undefined vertexAttribI4uiv(GLuint index, Uint32List values); + undefined vertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); /* Writing to the drawing buffer */ - void vertexAttribDivisor(GLuint index, GLuint divisor); - void drawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount); - void drawElementsInstanced(GLenum mode, GLsizei count, GLenum type, GLintptr offset, GLsizei instanceCount); - void drawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, GLintptr offset); + undefined vertexAttribDivisor(GLuint index, GLuint divisor); + undefined drawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount); + undefined drawElementsInstanced(GLenum mode, GLsizei count, GLenum type, GLintptr offset, GLsizei instanceCount); + undefined drawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, GLintptr offset); /* Multiple Render Targets */ - void drawBuffers(sequence<GLenum> buffers); + undefined drawBuffers(sequence<GLenum> buffers); - void clearBufferfv(GLenum buffer, GLint drawbuffer, Float32List values, + undefined clearBufferfv(GLenum buffer, GLint drawbuffer, Float32List values, optional GLuint srcOffset = 0); - void clearBufferiv(GLenum buffer, GLint drawbuffer, Int32List values, + undefined clearBufferiv(GLenum buffer, GLint drawbuffer, Int32List values, optional GLuint srcOffset = 0); - void clearBufferuiv(GLenum buffer, GLint drawbuffer, Uint32List values, + undefined clearBufferuiv(GLenum buffer, GLint drawbuffer, Uint32List values, optional GLuint srcOffset = 0); - void clearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); + undefined clearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); /* Query Objects */ WebGLQuery? createQuery(); - void deleteQuery(WebGLQuery? query); + undefined deleteQuery(WebGLQuery? query); /*[WebGLHandlesContextLoss]*/ GLboolean isQuery(WebGLQuery? query); - void beginQuery(GLenum target, WebGLQuery query); - void endQuery(GLenum target); + undefined beginQuery(GLenum target, WebGLQuery query); + undefined endQuery(GLenum target); WebGLQuery? getQuery(GLenum target, GLenum pname); any getQueryParameter(WebGLQuery query, GLenum pname); /* Sampler Objects */ WebGLSampler? createSampler(); - void deleteSampler(WebGLSampler? sampler); + undefined deleteSampler(WebGLSampler? sampler); [WebGLHandlesContextLoss] GLboolean isSampler(WebGLSampler? sampler); - void bindSampler(GLuint unit, WebGLSampler? sampler); - void samplerParameteri(WebGLSampler sampler, GLenum pname, GLint param); - void samplerParameterf(WebGLSampler sampler, GLenum pname, GLfloat param); + undefined bindSampler(GLuint unit, WebGLSampler? sampler); + undefined samplerParameteri(WebGLSampler sampler, GLenum pname, GLint param); + undefined samplerParameterf(WebGLSampler sampler, GLenum pname, GLfloat param); any getSamplerParameter(WebGLSampler sampler, GLenum pname); /* Sync objects */ WebGLSync? fenceSync(GLenum condition, GLbitfield flags); [WebGLHandlesContextLoss] GLboolean isSync(WebGLSync? sync); - void deleteSync(WebGLSync? sync); + undefined deleteSync(WebGLSync? sync); GLenum clientWaitSync(WebGLSync sync, GLbitfield flags, GLuint64 timeout); - void waitSync(WebGLSync sync, GLbitfield flags, GLint64 timeout); + undefined waitSync(WebGLSync sync, GLbitfield flags, GLint64 timeout); any getSyncParameter(WebGLSync sync, GLenum pname); /* Transform Feedback */ WebGLTransformFeedback? createTransformFeedback(); - void deleteTransformFeedback(WebGLTransformFeedback? tf); + undefined deleteTransformFeedback(WebGLTransformFeedback? tf); [WebGLHandlesContextLoss] GLboolean isTransformFeedback(WebGLTransformFeedback? tf); - void bindTransformFeedback (GLenum target, WebGLTransformFeedback? tf); - void beginTransformFeedback(GLenum primitiveMode); - void endTransformFeedback(); - void transformFeedbackVaryings(WebGLProgram program, sequence<DOMString> varyings, GLenum bufferMode); + undefined bindTransformFeedback (GLenum target, WebGLTransformFeedback? tf); + undefined beginTransformFeedback(GLenum primitiveMode); + undefined endTransformFeedback(); + undefined transformFeedbackVaryings(WebGLProgram program, sequence<DOMString> varyings, GLenum bufferMode); WebGLActiveInfo? getTransformFeedbackVarying(WebGLProgram program, GLuint index); - void pauseTransformFeedback(); - void resumeTransformFeedback(); + undefined pauseTransformFeedback(); + undefined resumeTransformFeedback(); /* Uniform Buffer Objects and Transform Feedback Buffers */ - void bindBufferBase(GLenum target, GLuint index, WebGLBuffer? buffer); - void bindBufferRange(GLenum target, GLuint index, WebGLBuffer? buffer, GLintptr offset, GLsizeiptr size); + undefined bindBufferBase(GLenum target, GLuint index, WebGLBuffer? buffer); + undefined bindBufferRange(GLenum target, GLuint index, WebGLBuffer? buffer, GLintptr offset, GLsizeiptr size); any getIndexedParameter(GLenum target, GLuint index); sequence<GLuint>? getUniformIndices(WebGLProgram program, sequence<DOMString> uniformNames); any getActiveUniforms(WebGLProgram program, sequence<GLuint> uniformIndices, GLenum pname); GLuint getUniformBlockIndex(WebGLProgram program, DOMString uniformBlockName); any getActiveUniformBlockParameter(WebGLProgram program, GLuint uniformBlockIndex, GLenum pname); DOMString? getActiveUniformBlockName(WebGLProgram program, GLuint uniformBlockIndex); - void uniformBlockBinding(WebGLProgram program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); + undefined uniformBlockBinding(WebGLProgram program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); /* Vertex Array Objects */ WebGLVertexArrayObject? createVertexArray(); - void deleteVertexArray(WebGLVertexArrayObject? vertexArray); + undefined deleteVertexArray(WebGLVertexArrayObject? vertexArray); [WebGLHandlesContextLoss] GLboolean isVertexArray(WebGLVertexArrayObject? vertexArray); - void bindVertexArray(WebGLVertexArrayObject? array); + undefined bindVertexArray(WebGLVertexArrayObject? array); }; interface mixin WebGL2RenderingContextOverloads { // WebGL1: - void bufferData(GLenum target, GLsizeiptr size, GLenum usage); - void bufferData(GLenum target, /*[AllowShared]*/ BufferSource? srcData, GLenum usage); - void bufferSubData(GLenum target, GLintptr dstByteOffset, /*[AllowShared]*/ BufferSource srcData); + undefined bufferData(GLenum target, GLsizeiptr size, GLenum usage); + undefined bufferData(GLenum target, /*[AllowShared]*/ BufferSource? srcData, GLenum usage); + undefined bufferSubData(GLenum target, GLintptr dstByteOffset, /*[AllowShared]*/ BufferSource srcData); // WebGL2: - void bufferData(GLenum target, /*[AllowShared]*/ ArrayBufferView srcData, GLenum usage, GLuint srcOffset, + undefined bufferData(GLenum target, /*[AllowShared]*/ ArrayBufferView srcData, GLenum usage, GLuint srcOffset, optional GLuint length = 0); - void bufferSubData(GLenum target, GLintptr dstByteOffset, /*[AllowShared]*/ ArrayBufferView srcData, + undefined bufferSubData(GLenum target, GLintptr dstByteOffset, /*[AllowShared]*/ ArrayBufferView srcData, GLuint srcOffset, optional GLuint length = 0); // WebGL1 legacy entrypoints: [Throws] - void texImage2D(GLenum target, GLint level, GLint internalformat, + undefined texImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, /*[AllowShared]*/ ArrayBufferView? pixels); [Throws] - void texImage2D(GLenum target, GLint level, GLint internalformat, + undefined texImage2D(GLenum target, GLint level, GLint internalformat, GLenum format, GLenum type, TexImageSource source); // May throw DOMException [Throws] - void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, + undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, /*[AllowShared]*/ ArrayBufferView? pixels); [Throws] - void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, + undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLenum format, GLenum type, TexImageSource source); // May throw DOMException // WebGL2 entrypoints: [Throws] - void texImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, + undefined texImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, GLintptr pboOffset); [Throws] - void texImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, + undefined texImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, TexImageSource source); // May throw DOMException [Throws] - void texImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, + undefined texImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, /*[AllowShared]*/ ArrayBufferView srcData, GLuint srcOffset); @@ -531,51 +531,51 @@ interface mixin WebGL2RenderingContextOverloads //void compressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, // GLsizei height, GLint border, GLsizei imageSize, GLintptr offset); - void compressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, + undefined compressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, /*[AllowShared]*/ ArrayBufferView srcData, optional GLuint srcOffset = 0, optional GLuint srcLengthOverride = 0); //void compressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, // GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, GLintptr offset); - void compressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, + undefined compressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, /*[AllowShared]*/ ArrayBufferView srcData, optional GLuint srcOffset = 0, optional GLuint srcLengthOverride = 0); - void uniform1fv(WebGLUniformLocation? location, Float32List data, optional GLuint srcOffset = 0, + undefined uniform1fv(WebGLUniformLocation? location, Float32List data, optional GLuint srcOffset = 0, optional GLuint srcLength = 0); - void uniform2fv(WebGLUniformLocation? location, Float32List data, optional GLuint srcOffset = 0, + undefined uniform2fv(WebGLUniformLocation? location, Float32List data, optional GLuint srcOffset = 0, optional GLuint srcLength = 0); - void uniform3fv(WebGLUniformLocation? location, Float32List data, optional GLuint srcOffset = 0, + undefined uniform3fv(WebGLUniformLocation? location, Float32List data, optional GLuint srcOffset = 0, optional GLuint srcLength = 0); - void uniform4fv(WebGLUniformLocation? location, Float32List data, optional GLuint srcOffset = 0, + undefined uniform4fv(WebGLUniformLocation? location, Float32List data, optional GLuint srcOffset = 0, optional GLuint srcLength = 0); - void uniform1iv(WebGLUniformLocation? location, Int32List data, optional GLuint srcOffset = 0, + undefined uniform1iv(WebGLUniformLocation? location, Int32List data, optional GLuint srcOffset = 0, optional GLuint srcLength = 0); - void uniform2iv(WebGLUniformLocation? location, Int32List data, optional GLuint srcOffset = 0, + undefined uniform2iv(WebGLUniformLocation? location, Int32List data, optional GLuint srcOffset = 0, optional GLuint srcLength = 0); - void uniform3iv(WebGLUniformLocation? location, Int32List data, optional GLuint srcOffset = 0, + undefined uniform3iv(WebGLUniformLocation? location, Int32List data, optional GLuint srcOffset = 0, optional GLuint srcLength = 0); - void uniform4iv(WebGLUniformLocation? location, Int32List data, optional GLuint srcOffset = 0, + undefined uniform4iv(WebGLUniformLocation? location, Int32List data, optional GLuint srcOffset = 0, optional GLuint srcLength = 0); - void uniformMatrix2fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data, + undefined uniformMatrix2fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data, optional GLuint srcOffset = 0, optional GLuint srcLength = 0); - void uniformMatrix3fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data, + undefined uniformMatrix3fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data, optional GLuint srcOffset = 0, optional GLuint srcLength = 0); - void uniformMatrix4fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data, + undefined uniformMatrix4fv(WebGLUniformLocation? location, GLboolean transpose, Float32List data, optional GLuint srcOffset = 0, optional GLuint srcLength = 0); /* Reading back pixels */ // WebGL1: - void readPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, + undefined readPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, /*[AllowShared]*/ ArrayBufferView? dstData); // WebGL2: - void readPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, + undefined readPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLintptr offset); - void readPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, + undefined readPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, /*[AllowShared]*/ ArrayBufferView dstData, GLuint dstOffset); }; diff --git a/components/script/dom/webidls/WebGLRenderingContext.webidl b/components/script/dom/webidls/WebGLRenderingContext.webidl index 4003ab86ba5..f54dfd67507 100644 --- a/components/script/dom/webidls/WebGLRenderingContext.webidl +++ b/components/script/dom/webidls/WebGLRenderingContext.webidl @@ -475,32 +475,32 @@ interface mixin WebGLRenderingContextBase sequence<DOMString>? getSupportedExtensions(); object? getExtension(DOMString name); - void activeTexture(GLenum texture); - void attachShader(WebGLProgram program, WebGLShader shader); - void bindAttribLocation(WebGLProgram program, GLuint index, DOMString name); - void bindBuffer(GLenum target, WebGLBuffer? buffer); - void bindFramebuffer(GLenum target, WebGLFramebuffer? framebuffer); - void bindRenderbuffer(GLenum target, WebGLRenderbuffer? renderbuffer); - void bindTexture(GLenum target, WebGLTexture? texture); - void blendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); - void blendEquation(GLenum mode); - void blendEquationSeparate(GLenum modeRGB, GLenum modeAlpha); - void blendFunc(GLenum sfactor, GLenum dfactor); - void blendFuncSeparate(GLenum srcRGB, GLenum dstRGB, + undefined activeTexture(GLenum texture); + undefined attachShader(WebGLProgram program, WebGLShader shader); + undefined bindAttribLocation(WebGLProgram program, GLuint index, DOMString name); + undefined bindBuffer(GLenum target, WebGLBuffer? buffer); + undefined bindFramebuffer(GLenum target, WebGLFramebuffer? framebuffer); + undefined bindRenderbuffer(GLenum target, WebGLRenderbuffer? renderbuffer); + undefined bindTexture(GLenum target, WebGLTexture? texture); + undefined blendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); + undefined blendEquation(GLenum mode); + undefined blendEquationSeparate(GLenum modeRGB, GLenum modeAlpha); + undefined blendFunc(GLenum sfactor, GLenum dfactor); + undefined blendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); [WebGLHandlesContextLoss] GLenum checkFramebufferStatus(GLenum target); - void clear(GLbitfield mask); - void clearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); - void clearDepth(GLclampf depth); - void clearStencil(GLint s); - void colorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); - void compileShader(WebGLShader shader); - - void copyTexImage2D(GLenum target, GLint level, GLenum internalformat, + undefined clear(GLbitfield mask); + undefined clearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); + undefined clearDepth(GLclampf depth); + undefined clearStencil(GLint s); + undefined colorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); + undefined compileShader(WebGLShader shader); + + undefined copyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); - void copyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, + undefined copyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); WebGLBuffer? createBuffer(); @@ -510,36 +510,36 @@ interface mixin WebGLRenderingContextBase WebGLShader? createShader(GLenum type); WebGLTexture? createTexture(); - void cullFace(GLenum mode); - - void deleteBuffer(WebGLBuffer? buffer); - void deleteFramebuffer(WebGLFramebuffer? framebuffer); - void deleteProgram(WebGLProgram? program); - void deleteRenderbuffer(WebGLRenderbuffer? renderbuffer); - void deleteShader(WebGLShader? shader); - void deleteTexture(WebGLTexture? texture); - - void depthFunc(GLenum func); - void depthMask(GLboolean flag); - void depthRange(GLclampf zNear, GLclampf zFar); - void detachShader(WebGLProgram program, WebGLShader shader); - void disable(GLenum cap); - void disableVertexAttribArray(GLuint index); - void drawArrays(GLenum mode, GLint first, GLsizei count); - void drawElements(GLenum mode, GLsizei count, GLenum type, GLintptr offset); - - void enable(GLenum cap); - void enableVertexAttribArray(GLuint index); - void finish(); - void flush(); - void framebufferRenderbuffer(GLenum target, GLenum attachment, + undefined cullFace(GLenum mode); + + undefined deleteBuffer(WebGLBuffer? buffer); + undefined deleteFramebuffer(WebGLFramebuffer? framebuffer); + undefined deleteProgram(WebGLProgram? program); + undefined deleteRenderbuffer(WebGLRenderbuffer? renderbuffer); + undefined deleteShader(WebGLShader? shader); + undefined deleteTexture(WebGLTexture? texture); + + undefined depthFunc(GLenum func); + undefined depthMask(GLboolean flag); + undefined depthRange(GLclampf zNear, GLclampf zFar); + undefined detachShader(WebGLProgram program, WebGLShader shader); + undefined disable(GLenum cap); + undefined disableVertexAttribArray(GLuint index); + undefined drawArrays(GLenum mode, GLint first, GLsizei count); + undefined drawElements(GLenum mode, GLsizei count, GLenum type, GLintptr offset); + + undefined enable(GLenum cap); + undefined enableVertexAttribArray(GLuint index); + undefined finish(); + undefined flush(); + undefined framebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, WebGLRenderbuffer? renderbuffer); - void framebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, + undefined framebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, WebGLTexture? texture, GLint level); - void frontFace(GLenum mode); + undefined frontFace(GLenum mode); - void generateMipmap(GLenum target); + undefined generateMipmap(GLenum target); WebGLActiveInfo? getActiveAttrib(WebGLProgram program, GLuint index); WebGLActiveInfo? getActiveUniform(WebGLProgram program, GLuint index); @@ -573,7 +573,7 @@ interface mixin WebGLRenderingContextBase [WebGLHandlesContextLoss] GLsizeiptr getVertexAttribOffset(GLuint index, GLenum pname); - void hint(GLenum target, GLenum mode); + undefined hint(GLenum target, GLenum mode); [WebGLHandlesContextLoss] GLboolean isBuffer(WebGLBuffer? buffer); [WebGLHandlesContextLoss] GLboolean isEnabled(GLenum cap); [WebGLHandlesContextLoss] GLboolean isFramebuffer(WebGLFramebuffer? framebuffer); @@ -581,108 +581,108 @@ interface mixin WebGLRenderingContextBase [WebGLHandlesContextLoss] GLboolean isRenderbuffer(WebGLRenderbuffer? renderbuffer); [WebGLHandlesContextLoss] GLboolean isShader(WebGLShader? shader); [WebGLHandlesContextLoss] GLboolean isTexture(WebGLTexture? texture); - void lineWidth(GLfloat width); - void linkProgram(WebGLProgram program); - void pixelStorei(GLenum pname, GLint param); - void polygonOffset(GLfloat factor, GLfloat units); + undefined lineWidth(GLfloat width); + undefined linkProgram(WebGLProgram program); + undefined pixelStorei(GLenum pname, GLint param); + undefined polygonOffset(GLfloat factor, GLfloat units); - void renderbufferStorage(GLenum target, GLenum internalformat, + undefined renderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height); - void sampleCoverage(GLclampf value, GLboolean invert); - void scissor(GLint x, GLint y, GLsizei width, GLsizei height); + undefined sampleCoverage(GLclampf value, GLboolean invert); + undefined scissor(GLint x, GLint y, GLsizei width, GLsizei height); - void shaderSource(WebGLShader shader, DOMString source); + undefined shaderSource(WebGLShader shader, DOMString source); - void stencilFunc(GLenum func, GLint ref, GLuint mask); - void stencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask); - void stencilMask(GLuint mask); - void stencilMaskSeparate(GLenum face, GLuint mask); - void stencilOp(GLenum fail, GLenum zfail, GLenum zpass); - void stencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass); + undefined stencilFunc(GLenum func, GLint ref, GLuint mask); + undefined stencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask); + undefined stencilMask(GLuint mask); + undefined stencilMaskSeparate(GLenum face, GLuint mask); + undefined stencilOp(GLenum fail, GLenum zfail, GLenum zpass); + undefined stencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass); - void texParameterf(GLenum target, GLenum pname, GLfloat param); - void texParameteri(GLenum target, GLenum pname, GLint param); + undefined texParameterf(GLenum target, GLenum pname, GLfloat param); + undefined texParameteri(GLenum target, GLenum pname, GLint param); - void uniform1f(WebGLUniformLocation? location, GLfloat x); - void uniform2f(WebGLUniformLocation? location, GLfloat x, GLfloat y); - void uniform3f(WebGLUniformLocation? location, GLfloat x, GLfloat y, GLfloat z); - void uniform4f(WebGLUniformLocation? location, GLfloat x, GLfloat y, GLfloat z, GLfloat w); + undefined uniform1f(WebGLUniformLocation? location, GLfloat x); + undefined uniform2f(WebGLUniformLocation? location, GLfloat x, GLfloat y); + undefined uniform3f(WebGLUniformLocation? location, GLfloat x, GLfloat y, GLfloat z); + undefined uniform4f(WebGLUniformLocation? location, GLfloat x, GLfloat y, GLfloat z, GLfloat w); - void uniform1i(WebGLUniformLocation? location, GLint x); - void uniform2i(WebGLUniformLocation? location, GLint x, GLint y); - void uniform3i(WebGLUniformLocation? location, GLint x, GLint y, GLint z); - void uniform4i(WebGLUniformLocation? location, GLint x, GLint y, GLint z, GLint w); + undefined uniform1i(WebGLUniformLocation? location, GLint x); + undefined uniform2i(WebGLUniformLocation? location, GLint x, GLint y); + undefined uniform3i(WebGLUniformLocation? location, GLint x, GLint y, GLint z); + undefined uniform4i(WebGLUniformLocation? location, GLint x, GLint y, GLint z, GLint w); - void useProgram(WebGLProgram? program); - void validateProgram(WebGLProgram program); + undefined useProgram(WebGLProgram? program); + undefined validateProgram(WebGLProgram program); - void vertexAttrib1f(GLuint indx, GLfloat x); - void vertexAttrib2f(GLuint indx, GLfloat x, GLfloat y); - void vertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z); - void vertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w); + undefined vertexAttrib1f(GLuint indx, GLfloat x); + undefined vertexAttrib2f(GLuint indx, GLfloat x, GLfloat y); + undefined vertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z); + undefined vertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w); - void vertexAttrib1fv(GLuint indx, Float32List values); - void vertexAttrib2fv(GLuint indx, Float32List values); - void vertexAttrib3fv(GLuint indx, Float32List values); - void vertexAttrib4fv(GLuint indx, Float32List values); + undefined vertexAttrib1fv(GLuint indx, Float32List values); + undefined vertexAttrib2fv(GLuint indx, Float32List values); + undefined vertexAttrib3fv(GLuint indx, Float32List values); + undefined vertexAttrib4fv(GLuint indx, Float32List values); - void vertexAttribPointer(GLuint indx, GLint size, GLenum type, + undefined vertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLintptr offset); - void viewport(GLint x, GLint y, GLsizei width, GLsizei height); + undefined viewport(GLint x, GLint y, GLsizei width, GLsizei height); }; interface mixin WebGLRenderingContextOverloads { - void bufferData(GLenum target, GLsizeiptr size, GLenum usage); - void bufferData(GLenum target, /*[AllowShared]*/ BufferSource? data, GLenum usage); - void bufferSubData(GLenum target, GLintptr offset, /*[AllowShared]*/ BufferSource data); + undefined bufferData(GLenum target, GLsizeiptr size, GLenum usage); + undefined bufferData(GLenum target, /*[AllowShared]*/ BufferSource? data, GLenum usage); + undefined bufferSubData(GLenum target, GLintptr offset, /*[AllowShared]*/ BufferSource data); - void compressedTexImage2D(GLenum target, GLint level, GLenum internalformat, + undefined compressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, /*[AllowShared]*/ ArrayBufferView data); - void compressedTexSubImage2D(GLenum target, GLint level, + undefined compressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, /*[AllowShared]*/ ArrayBufferView data); - void readPixels(GLint x, GLint y, GLsizei width, GLsizei height, + undefined readPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, /*[AllowShared]*/ ArrayBufferView? pixels); [Throws] - void texImage2D(GLenum target, GLint level, GLint internalformat, + undefined texImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, /*[AllowShared]*/ ArrayBufferView? pixels); [Throws] - void texImage2D(GLenum target, GLint level, GLint internalformat, + undefined texImage2D(GLenum target, GLint level, GLint internalformat, GLenum format, GLenum type, TexImageSource source); // May throw DOMException [Throws] - void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, + undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, /*[AllowShared]*/ ArrayBufferView? pixels); [Throws] - void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, + undefined texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLenum format, GLenum type, TexImageSource source); // May throw DOMException - void uniform1fv(WebGLUniformLocation? location, Float32List v); - void uniform2fv(WebGLUniformLocation? location, Float32List v); - void uniform3fv(WebGLUniformLocation? location, Float32List v); - void uniform4fv(WebGLUniformLocation? location, Float32List v); + undefined uniform1fv(WebGLUniformLocation? location, Float32List v); + undefined uniform2fv(WebGLUniformLocation? location, Float32List v); + undefined uniform3fv(WebGLUniformLocation? location, Float32List v); + undefined uniform4fv(WebGLUniformLocation? location, Float32List v); - void uniform1iv(WebGLUniformLocation? location, Int32List v); - void uniform2iv(WebGLUniformLocation? location, Int32List v); - void uniform3iv(WebGLUniformLocation? location, Int32List v); - void uniform4iv(WebGLUniformLocation? location, Int32List v); + undefined uniform1iv(WebGLUniformLocation? location, Int32List v); + undefined uniform2iv(WebGLUniformLocation? location, Int32List v); + undefined uniform3iv(WebGLUniformLocation? location, Int32List v); + undefined uniform4iv(WebGLUniformLocation? location, Int32List v); - void uniformMatrix2fv(WebGLUniformLocation? location, GLboolean transpose, Float32List value); - void uniformMatrix3fv(WebGLUniformLocation? location, GLboolean transpose, Float32List value); - void uniformMatrix4fv(WebGLUniformLocation? location, GLboolean transpose, Float32List value); + undefined uniformMatrix2fv(WebGLUniformLocation? location, GLboolean transpose, Float32List value); + undefined uniformMatrix3fv(WebGLUniformLocation? location, GLboolean transpose, Float32List value); + undefined uniformMatrix4fv(WebGLUniformLocation? location, GLboolean transpose, Float32List value); }; interface mixin WebGLRenderingContextExtensions { [Throws, Pref="dom.webgl.dom_to_texture.enabled"] - void texImageDOM(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, + undefined texImageDOM(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, HTMLIFrameElement source); // May throw DOMException }; diff --git a/components/script/dom/webidls/WebSocket.webidl b/components/script/dom/webidls/WebSocket.webidl index 089b2c5a378..9fff327fc6f 100644 --- a/components/script/dom/webidls/WebSocket.webidl +++ b/components/script/dom/webidls/WebSocket.webidl @@ -24,13 +24,13 @@ interface WebSocket : EventTarget { attribute EventHandler onclose; //readonly attribute DOMString extensions; readonly attribute DOMString protocol; - [Throws] void close(optional [Clamp] unsigned short code, optional USVString reason); + [Throws] undefined close(optional [Clamp] unsigned short code, optional USVString reason); //messaging attribute EventHandler onmessage; attribute BinaryType binaryType; - [Throws] void send(USVString data); - [Throws] void send(Blob data); - [Throws] void send(ArrayBuffer data); - [Throws] void send(ArrayBufferView data); + [Throws] undefined send(USVString data); + [Throws] undefined send(Blob data); + [Throws] undefined send(ArrayBuffer data); + [Throws] undefined send(ArrayBufferView data); }; diff --git a/components/script/dom/webidls/WheelEvent.webidl b/components/script/dom/webidls/WheelEvent.webidl index 15fc033a21b..7667aa81560 100644 --- a/components/script/dom/webidls/WheelEvent.webidl +++ b/components/script/dom/webidls/WheelEvent.webidl @@ -26,7 +26,7 @@ dictionary WheelEventInit : MouseEventInit { // https://w3c.github.io/uievents/#idl-interface-WheelEvent-initializers partial interface WheelEvent { // Deprecated in DOM Level 3 - void initWheelEvent (DOMString typeArg, boolean bubblesArg, boolean cancelableArg, + undefined initWheelEvent (DOMString typeArg, boolean bubblesArg, boolean cancelableArg, Window? viewArg, long detailArg, double deltaX, double deltaY, double deltaZ, unsigned long deltaMode); diff --git a/components/script/dom/webidls/Window.webidl b/components/script/dom/webidls/Window.webidl index 289aa52cfb8..23aaa8fa07d 100644 --- a/components/script/dom/webidls/Window.webidl +++ b/components/script/dom/webidls/Window.webidl @@ -24,9 +24,9 @@ //[Replaceable] readonly attribute BarProp statusbar; //[Replaceable] readonly attribute BarProp toolbar; attribute DOMString status; - [CrossOriginCallable] void close(); + [CrossOriginCallable] undefined close(); [CrossOriginReadable] readonly attribute boolean closed; - void stop(); + undefined stop(); //[CrossOriginCallable] void focus(); //[CrossOriginCallable] void blur(); @@ -54,20 +54,20 @@ //readonly attribute ApplicationCache applicationCache; // user prompts - void alert(DOMString message); - void alert(); + undefined alert(DOMString message); + undefined alert(); boolean confirm(optional DOMString message = ""); DOMString? prompt(optional DOMString message = "", optional DOMString default = ""); //void print(); //any showModalDialog(DOMString url, optional any argument); unsigned long requestAnimationFrame(FrameRequestCallback callback); - void cancelAnimationFrame(unsigned long handle); + undefined cancelAnimationFrame(unsigned long handle); [Throws, CrossOriginCallable] - void postMessage(any message, USVString targetOrigin, optional sequence<object> transfer = []); + undefined postMessage(any message, USVString targetOrigin, optional sequence<object> transfer = []); [Throws, CrossOriginCallable] - void postMessage(any message, optional WindowPostMessageOptions options = {}); + undefined postMessage(any message, optional WindowPostMessageOptions options = {}); // also has obsolete members }; @@ -76,8 +76,8 @@ Window includes WindowEventHandlers; // https://html.spec.whatwg.org/multipage/#Window-partial partial interface Window { - void captureEvents(); - void releaseEvents(); + undefined captureEvents(); + undefined releaseEvents(); }; // https://drafts.csswg.org/cssom/#extensions-to-the-window-interface @@ -106,10 +106,10 @@ partial interface Window { [SameObject, Replaceable] readonly attribute Screen screen; // browsing context - void moveTo(long x, long y); - void moveBy(long x, long y); - void resizeTo(long x, long y); - void resizeBy(long x, long y); + undefined moveTo(long x, long y); + undefined moveBy(long x, long y); + undefined resizeTo(long x, long y); + undefined resizeBy(long x, long y); // viewport [Replaceable] readonly attribute long innerWidth; @@ -120,12 +120,12 @@ partial interface Window { [Replaceable] readonly attribute long pageXOffset; [Replaceable] readonly attribute long scrollY; [Replaceable] readonly attribute long pageYOffset; - void scroll(optional ScrollToOptions options = {}); - void scroll(unrestricted double x, unrestricted double y); - void scrollTo(optional ScrollToOptions options = {}); - void scrollTo(unrestricted double x, unrestricted double y); - void scrollBy(optional ScrollToOptions options = {}); - void scrollBy(unrestricted double x, unrestricted double y); + undefined scroll(optional ScrollToOptions options = {}); + undefined scroll(unrestricted double x, unrestricted double y); + undefined scrollTo(optional ScrollToOptions options = {}); + undefined scrollTo(unrestricted double x, unrestricted double y); + undefined scrollBy(optional ScrollToOptions options = {}); + undefined scrollBy(unrestricted double x, unrestricted double y); // client [Replaceable] readonly attribute long screenX; @@ -138,20 +138,20 @@ partial interface Window { // Proprietary extensions. partial interface Window { [Pref="dom.servo_helpers.enabled"] - void debug(DOMString arg); + undefined debug(DOMString arg); [Pref="dom.servo_helpers.enabled"] - void gc(); + undefined gc(); [Pref="dom.servo_helpers.enabled"] - void trap(); + undefined trap(); [Pref="dom.servo_helpers.enabled"] - void js_backtrace(); + undefined js_backtrace(); }; // WebDriver extensions partial interface Window { // Shouldn't be public, but just to make things work for now - void webdriverCallback(optional any result); - void webdriverTimeout(); + undefined webdriverCallback(optional any result); + undefined webdriverTimeout(); }; // https://html.spec.whatwg.org/multipage/#dom-sessionstorage @@ -167,7 +167,7 @@ interface mixin WindowLocalStorage { Window includes WindowLocalStorage; // http://w3c.github.io/animation-timing/#framerequestcallback -callback FrameRequestCallback = void (DOMHighResTimeStamp time); +callback FrameRequestCallback = undefined (DOMHighResTimeStamp time); // https://webbluetoothcg.github.io/web-bluetooth/tests#test-interfaces partial interface Window { diff --git a/components/script/dom/webidls/WindowOrWorkerGlobalScope.webidl b/components/script/dom/webidls/WindowOrWorkerGlobalScope.webidl index 2ab8ba2c25d..0d28857ec58 100644 --- a/components/script/dom/webidls/WindowOrWorkerGlobalScope.webidl +++ b/components/script/dom/webidls/WindowOrWorkerGlobalScope.webidl @@ -16,12 +16,12 @@ interface mixin WindowOrWorkerGlobalScope { // timers long setTimeout(TimerHandler handler, optional long timeout = 0, any... arguments); - void clearTimeout(optional long handle = 0); + undefined clearTimeout(optional long handle = 0); long setInterval(TimerHandler handler, optional long timeout = 0, any... arguments); - void clearInterval(optional long handle = 0); + undefined clearInterval(optional long handle = 0); // microtask queuing - void queueMicrotask(VoidFunction callback); + undefined queueMicrotask(VoidFunction callback); // ImageBitmap [Pref="dom.imagebitmap.enabled"] diff --git a/components/script/dom/webidls/Worker.webidl b/components/script/dom/webidls/Worker.webidl index 93df577ec32..b391d65b2ab 100644 --- a/components/script/dom/webidls/Worker.webidl +++ b/components/script/dom/webidls/Worker.webidl @@ -12,10 +12,10 @@ interface mixin AbstractWorker { [Exposed=(Window,Worker)] interface Worker : EventTarget { [Throws] constructor(USVString scriptURL, optional WorkerOptions options = {}); - void terminate(); + undefined terminate(); - [Throws] void postMessage(any message, sequence<object> transfer); - [Throws] void postMessage(any message, optional PostMessageOptions options = {}); + [Throws] undefined postMessage(any message, sequence<object> transfer); + [Throws] undefined postMessage(any message, optional PostMessageOptions options = {}); attribute EventHandler onmessage; attribute EventHandler onmessageerror; }; diff --git a/components/script/dom/webidls/WorkerGlobalScope.webidl b/components/script/dom/webidls/WorkerGlobalScope.webidl index 191ab63967d..05301fb28e6 100644 --- a/components/script/dom/webidls/WorkerGlobalScope.webidl +++ b/components/script/dom/webidls/WorkerGlobalScope.webidl @@ -19,6 +19,6 @@ interface WorkerGlobalScope : GlobalScope { [Exposed=Worker] partial interface WorkerGlobalScope { // not obsolete [Throws] - void importScripts(DOMString... urls); + undefined importScripts(DOMString... urls); readonly attribute WorkerNavigator navigator; }; diff --git a/components/script/dom/webidls/Worklet.webidl b/components/script/dom/webidls/Worklet.webidl index 16ec8e8d7c9..249f9c9d470 100644 --- a/components/script/dom/webidls/Worklet.webidl +++ b/components/script/dom/webidls/Worklet.webidl @@ -5,7 +5,7 @@ // https://drafts.css-houdini.org/worklets/#worklet [Pref="dom.worklet.enabled", Exposed=(Window)] interface Worklet { - [NewObject] Promise<void> addModule(USVString moduleURL, optional WorkletOptions options = {}); + [NewObject] Promise<undefined> addModule(USVString moduleURL, optional WorkletOptions options = {}); }; dictionary WorkletOptions { diff --git a/components/script/dom/webidls/XMLHttpRequest.webidl b/components/script/dom/webidls/XMLHttpRequest.webidl index 2c043b9407a..c7225cff112 100644 --- a/components/script/dom/webidls/XMLHttpRequest.webidl +++ b/components/script/dom/webidls/XMLHttpRequest.webidl @@ -43,22 +43,22 @@ interface XMLHttpRequest : XMLHttpRequestEventTarget { // request [Throws] - void open(ByteString method, USVString url); + undefined open(ByteString method, USVString url); [Throws] - void open(ByteString method, USVString url, boolean async, + undefined open(ByteString method, USVString url, boolean async, optional USVString? username = null, optional USVString? password = null); [Throws] - void setRequestHeader(ByteString name, ByteString value); + undefined setRequestHeader(ByteString name, ByteString value); [SetterThrows] attribute unsigned long timeout; [SetterThrows] attribute boolean withCredentials; readonly attribute XMLHttpRequestUpload upload; [Throws] - void send(optional (Document or XMLHttpRequestBodyInit)? data = null); - void abort(); + undefined send(optional (Document or XMLHttpRequestBodyInit)? data = null); + undefined abort(); // response readonly attribute USVString responseURL; @@ -67,7 +67,7 @@ interface XMLHttpRequest : XMLHttpRequestEventTarget { ByteString? getResponseHeader(ByteString name); ByteString getAllResponseHeaders(); [Throws] - void overrideMimeType(DOMString mime); + undefined overrideMimeType(DOMString mime); [SetterThrows] attribute XMLHttpRequestResponseType responseType; readonly attribute any response; diff --git a/components/script/dom/webidls/XRHitTestSource.webidl b/components/script/dom/webidls/XRHitTestSource.webidl index a3a56cebed4..e2a11768158 100644 --- a/components/script/dom/webidls/XRHitTestSource.webidl +++ b/components/script/dom/webidls/XRHitTestSource.webidl @@ -18,5 +18,5 @@ dictionary XRHitTestOptionsInit { [SecureContext, Exposed=Window] interface XRHitTestSource { - void cancel(); + undefined cancel(); }; diff --git a/components/script/dom/webidls/XRSession.webidl b/components/script/dom/webidls/XRSession.webidl index 45cdbe2339e..89e6dc5c68c 100644 --- a/components/script/dom/webidls/XRSession.webidl +++ b/components/script/dom/webidls/XRSession.webidl @@ -16,7 +16,7 @@ enum XRVisibilityState { "hidden", }; -callback XRFrameRequestCallback = void (DOMHighResTimeStamp time, XRFrame frame); +callback XRFrameRequestCallback = undefined (DOMHighResTimeStamp time, XRFrame frame); [SecureContext, Exposed=Window, Pref="dom.webxr.enabled"] interface XRSession : EventTarget { @@ -28,13 +28,13 @@ interface XRSession : EventTarget { [SameObject] readonly attribute XRInputSourceArray inputSources; // // Methods - [Throws] void updateRenderState(optional XRRenderStateInit state = {}); + [Throws] undefined updateRenderState(optional XRRenderStateInit state = {}); Promise<XRReferenceSpace> requestReferenceSpace(XRReferenceSpaceType type); long requestAnimationFrame(XRFrameRequestCallback callback); - void cancelAnimationFrame(long handle); + undefined cancelAnimationFrame(long handle); - Promise<void> end(); + Promise<undefined> end(); // hit test module Promise<XRHitTestSource> requestHitTestSource(XRHitTestOptionsInit options); diff --git a/components/script/dom/webidls/XRTest.webidl b/components/script/dom/webidls/XRTest.webidl index 1ae98f703bf..b65fb1c7485 100644 --- a/components/script/dom/webidls/XRTest.webidl +++ b/components/script/dom/webidls/XRTest.webidl @@ -13,10 +13,10 @@ interface XRTest { // // Simulates a user activation (aka user gesture) for the current scope. // // The activation is only guaranteed to be valid in the provided function and only applies to WebXR // // Device API methods. - void simulateUserActivation(Function f); + undefined simulateUserActivation(Function f); // // Disconnect all fake devices - Promise<void> disconnectAllDevices(); + Promise<undefined> disconnectAllDevices(); }; dictionary FakeXRDeviceInit { diff --git a/components/script/dom/webidls/XRWebGLLayer.webidl b/components/script/dom/webidls/XRWebGLLayer.webidl index 87d2dc4dccb..4a89ec2a40a 100644 --- a/components/script/dom/webidls/XRWebGLLayer.webidl +++ b/components/script/dom/webidls/XRWebGLLayer.webidl @@ -37,5 +37,5 @@ interface XRWebGLLayer: XRLayer { }; partial interface WebGLRenderingContext { - [Pref="dom.webxr.enabled"] Promise<void> makeXRCompatible(); + [Pref="dom.webxr.enabled"] Promise<undefined> makeXRCompatible(); }; |