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. -->
This commit is contained in:
bors-servo 2022-01-16 23:06:45 -05:00 committed by GitHub
commit 35e95f55a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
159 changed files with 1148 additions and 1130 deletions

View file

@ -1188,7 +1188,7 @@ def getJSToNativeConversionInfo(type, descriptorProvider, failureCode=None,
return handleOptional(template, declType, handleDefault(empty)) return handleOptional(template, declType, handleDefault(empty))
if type.isVoid(): if type.isUndefined():
# This one only happens for return values, and its easy: Just # This one only happens for return values, and its easy: Just
# ignore the jsval. # ignore the jsval.
return JSToNativeConversionInfo("", None, None) return JSToNativeConversionInfo("", None, None)
@ -1439,7 +1439,7 @@ def getConversionConfigForType(type, isEnforceRange, isClamp, treatNullAs):
# Returns a CGThing containing the type of the return value. # Returns a CGThing containing the type of the return value.
def getRetvalDeclarationForType(returnType, descriptorProvider): def getRetvalDeclarationForType(returnType, descriptorProvider):
if returnType is None or returnType.isVoid(): if returnType is None or returnType.isUndefined():
# Nothing to declare # Nothing to declare
return CGGeneric("()") return CGGeneric("()")
if returnType.isPrimitive() and returnType.tag() in builtinNames: if returnType.isPrimitive() and returnType.tag() in builtinNames:
@ -4338,7 +4338,7 @@ class CGMemberJITInfo(CGThing):
result += self.defineJitInfo(setterinfo, setter, "Setter", result += self.defineJitInfo(setterinfo, setter, "Setter",
False, False, "AliasEverything", False, False, "AliasEverything",
False, False, "0", False, False, "0",
[BuiltinTypes[IDLBuiltinType.Types.void]], [BuiltinTypes[IDLBuiltinType.Types.undefined]],
None) None)
return result return result
if self.member.isMethod(): if self.member.isMethod():
@ -4426,7 +4426,7 @@ class CGMemberJITInfo(CGThing):
if t.nullable(): if t.nullable():
# Sometimes it might return null, sometimes not # Sometimes it might return null, sometimes not
return "JSVAL_TYPE_UNKNOWN" return "JSVAL_TYPE_UNKNOWN"
if t.isVoid(): if t.isUndefined():
# No return, every time # No return, every time
return "JSVAL_TYPE_UNDEFINED" return "JSVAL_TYPE_UNDEFINED"
if t.isSequence(): if t.isSequence():
@ -4500,7 +4500,7 @@ class CGMemberJITInfo(CGThing):
@staticmethod @staticmethod
def getJSArgType(t): def getJSArgType(t):
assert not t.isVoid() assert not t.isUndefined()
if t.nullable(): if t.nullable():
# Sometimes it might return null, sometimes not # Sometimes it might return null, sometimes not
return "JSJitInfo_ArgType::Null as i32 | %s" % CGMemberJITInfo.getJSArgType(t.inner) 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 # Mark our getters, which are attrs that
# have a non-void return type, as const. # have a non-void return type, as const.
const=(not member.isStatic() and member.isAttr() const=(not member.isStatic() and member.isAttr()
and not signature[0].isVoid()), and not signature[0].isUndefined()),
breakAfterSelf=breakAfterSelf, breakAfterSelf=breakAfterSelf,
unsafe=unsafe, unsafe=unsafe,
visibility=visibility) visibility=visibility)
@ -7608,7 +7608,7 @@ class CallbackMember(CGNativeMember):
convertType = instantiateJSToNativeConversionTemplate( convertType = instantiateJSToNativeConversionTemplate(
template, replacements, declType, "rvalDecl") template, replacements, declType, "rvalDecl")
if self.retvalType is None or self.retvalType.isVoid(): if self.retvalType is None or self.retvalType.isUndefined():
retval = "()" retval = "()"
elif self.retvalType.isAny(): elif self.retvalType.isAny():
retval = "rvalDecl.get()" retval = "rvalDecl.get()"

View file

@ -2093,7 +2093,7 @@ class IDLType(IDLObject):
'utf8string', 'utf8string',
'jsstring', 'jsstring',
'object', 'object',
'void', 'undefined',
# Funny stuff # Funny stuff
'interface', 'interface',
'dictionary', 'dictionary',
@ -2168,8 +2168,8 @@ class IDLType(IDLObject):
def isJSString(self): def isJSString(self):
return False return False
def isVoid(self): def isUndefined(self):
return self.name == "Void" return self.name == "Undefined"
def isSequence(self): def isSequence(self):
return False return False
@ -2355,7 +2355,7 @@ class IDLParametrizedType(IDLType):
class IDLNullableType(IDLParametrizedType): class IDLNullableType(IDLParametrizedType):
def __init__(self, location, innerType): def __init__(self, location, innerType):
assert not innerType.isVoid() assert not innerType.isUndefined()
assert not innerType == BuiltinTypes[IDLBuiltinType.Types.any] assert not innerType == BuiltinTypes[IDLBuiltinType.Types.any]
IDLParametrizedType.__init__(self, location, None, innerType) IDLParametrizedType.__init__(self, location, None, innerType)
@ -2414,7 +2414,7 @@ class IDLNullableType(IDLParametrizedType):
def isInteger(self): def isInteger(self):
return self.inner.isInteger() return self.inner.isInteger()
def isVoid(self): def isUndefined(self):
return False return False
def isSequence(self): def isSequence(self):
@ -2517,7 +2517,7 @@ class IDLNullableType(IDLParametrizedType):
class IDLSequenceType(IDLParametrizedType): class IDLSequenceType(IDLParametrizedType):
def __init__(self, location, parameterType): def __init__(self, location, parameterType):
assert not parameterType.isVoid() assert not parameterType.isUndefined()
IDLParametrizedType.__init__(self, location, parameterType.name, parameterType) IDLParametrizedType.__init__(self, location, parameterType.name, parameterType)
# Need to set self.name up front if our inner type is already complete, # Need to set self.name up front if our inner type is already complete,
@ -2561,7 +2561,7 @@ class IDLSequenceType(IDLParametrizedType):
def isJSString(self): def isJSString(self):
return False return False
def isVoid(self): def isUndefined(self):
return False return False
def isSequence(self): def isSequence(self):
@ -2602,7 +2602,7 @@ class IDLRecordType(IDLParametrizedType):
def __init__(self, location, keyType, valueType): def __init__(self, location, keyType, valueType):
assert keyType.isString() assert keyType.isString()
assert keyType.isComplete() assert keyType.isComplete()
assert not valueType.isVoid() assert not valueType.isUndefined()
IDLParametrizedType.__init__(self, location, valueType.name, valueType) IDLParametrizedType.__init__(self, location, valueType.name, valueType)
self.keyType = keyType self.keyType = keyType
@ -2673,7 +2673,7 @@ class IDLUnionType(IDLType):
def prettyName(self): def prettyName(self):
return "(" + " or ".join(m.prettyName() for m in self.memberTypes) + ")" return "(" + " or ".join(m.prettyName() for m in self.memberTypes) + ")"
def isVoid(self): def isUndefined(self):
return False return False
def isUnion(self): def isUnion(self):
@ -2836,8 +2836,8 @@ class IDLTypedefType(IDLType):
def isJSString(self): def isJSString(self):
return self.inner.isJSString() return self.inner.isJSString()
def isVoid(self): def isUndefined(self):
return self.inner.isVoid() return self.inner.isUndefined()
def isJSONType(self): def isJSONType(self):
return self.inner.isJSONType() return self.inner.isJSONType()
@ -2972,7 +2972,7 @@ class IDLWrapperType(IDLType):
def isJSString(self): def isJSString(self):
return False return False
def isVoid(self): def isUndefined(self):
return False return False
def isSequence(self): def isSequence(self):
@ -3178,7 +3178,7 @@ class IDLBuiltinType(IDLType):
'utf8string', 'utf8string',
'jsstring', 'jsstring',
'object', 'object',
'void', 'undefined',
# Funny stuff # Funny stuff
'ArrayBuffer', 'ArrayBuffer',
'ArrayBufferView', 'ArrayBufferView',
@ -3215,7 +3215,7 @@ class IDLBuiltinType(IDLType):
Types.utf8string: IDLType.Tags.utf8string, Types.utf8string: IDLType.Tags.utf8string,
Types.jsstring: IDLType.Tags.jsstring, Types.jsstring: IDLType.Tags.jsstring,
Types.object: IDLType.Tags.object, Types.object: IDLType.Tags.object,
Types.void: IDLType.Tags.void, Types.undefined: IDLType.Tags.undefined,
Types.ArrayBuffer: IDLType.Tags.interface, Types.ArrayBuffer: IDLType.Tags.interface,
Types.ArrayBufferView: IDLType.Tags.interface, Types.ArrayBufferView: IDLType.Tags.interface,
Types.Int8Array: 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.utf8string: "USVString", # That's what it is in spec terms
Types.jsstring: "USVString", # Again, that's what it is in spec terms Types.jsstring: "USVString", # Again, that's what it is in spec terms
Types.object: "object", Types.object: "object",
Types.void: "void", Types.undefined: "undefined",
Types.ArrayBuffer: "ArrayBuffer", Types.ArrayBuffer: "ArrayBuffer",
Types.ArrayBufferView: "ArrayBufferView", Types.ArrayBufferView: "ArrayBufferView",
Types.Int8Array: "Int8Array", Types.Int8Array: "Int8Array",
@ -3456,8 +3456,8 @@ class IDLBuiltinType(IDLType):
return False return False
if self.isObject(): if self.isObject():
return other.isPrimitive() or other.isString() or other.isEnum() return other.isPrimitive() or other.isString() or other.isEnum()
if self.isVoid(): if self.isUndefined():
return not other.isVoid() return not other.isUndefined()
# Not much else we could be! # Not much else we could be!
assert self.isSpiderMonkeyInterface() assert self.isSpiderMonkeyInterface()
# Like interfaces, but we know we're not a callback # Like interfaces, but we know we're not a callback
@ -3591,9 +3591,9 @@ BuiltinTypes = {
IDLBuiltinType.Types.object: IDLBuiltinType.Types.object:
IDLBuiltinType(BuiltinLocation("<builtin type>"), "Object", IDLBuiltinType(BuiltinLocation("<builtin type>"), "Object",
IDLBuiltinType.Types.object), IDLBuiltinType.Types.object),
IDLBuiltinType.Types.void: IDLBuiltinType.Types.undefined:
IDLBuiltinType(BuiltinLocation("<builtin type>"), "Void", IDLBuiltinType(BuiltinLocation("<builtin type>"), "Undefined",
IDLBuiltinType.Types.void), IDLBuiltinType.Types.undefined),
IDLBuiltinType.Types.ArrayBuffer: IDLBuiltinType.Types.ArrayBuffer:
IDLBuiltinType(BuiltinLocation("<builtin type>"), "ArrayBuffer", IDLBuiltinType(BuiltinLocation("<builtin type>"), "ArrayBuffer",
IDLBuiltinType.Types.ArrayBuffer), IDLBuiltinType.Types.ArrayBuffer),
@ -4196,9 +4196,9 @@ class IDLIterable(IDLMaplikeOrSetlikeOrIterableBase):
self.addMethod("values", members, False, self.iteratorType, self.addMethod("values", members, False, self.iteratorType,
affectsNothing=True, newObject=True) 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, self.addMethod("forEach", members, False,
BuiltinTypes[IDLBuiltinType.Types.void], BuiltinTypes[IDLBuiltinType.Types.undefined],
self.getForEachArguments()) self.getForEachArguments())
def isValueIterator(self): def isValueIterator(self):
@ -4256,8 +4256,8 @@ class IDLMaplikeOrSetlike(IDLMaplikeOrSetlikeOrIterableBase):
self.addMethod("values", members, False, BuiltinTypes[IDLBuiltinType.Types.object], self.addMethod("values", members, False, BuiltinTypes[IDLBuiltinType.Types.object],
affectsNothing=True, isIteratorAlias=self.isSetlike()) affectsNothing=True, isIteratorAlias=self.isSetlike())
# void forEach(callback(valueType, keyType), thisVal) # undefined forEach(callback(valueType, keyType), thisVal)
self.addMethod("forEach", members, False, BuiltinTypes[IDLBuiltinType.Types.void], self.addMethod("forEach", members, False, BuiltinTypes[IDLBuiltinType.Types.undefined],
self.getForEachArguments()) self.getForEachArguments())
def getKeyArg(): def getKeyArg():
@ -4270,8 +4270,8 @@ class IDLMaplikeOrSetlike(IDLMaplikeOrSetlikeOrIterableBase):
[getKeyArg()], isPure=True) [getKeyArg()], isPure=True)
if not self.readonly: if not self.readonly:
# void clear() # undefined clear()
self.addMethod("clear", members, True, BuiltinTypes[IDLBuiltinType.Types.void], self.addMethod("clear", members, True, BuiltinTypes[IDLBuiltinType.Types.undefined],
[]) [])
# boolean delete(keyType key) # boolean delete(keyType key)
self.addMethod("delete", members, True, self.addMethod("delete", members, True,
@ -4280,8 +4280,8 @@ class IDLMaplikeOrSetlike(IDLMaplikeOrSetlikeOrIterableBase):
# Always generate underscored functions (e.g. __add, __clear) for js # Always generate underscored functions (e.g. __add, __clear) for js
# implemented interfaces as convenience functions. # implemented interfaces as convenience functions.
if isJSImplemented: if isJSImplemented:
# void clear() # undefined clear()
self.addMethod("clear", members, True, BuiltinTypes[IDLBuiltinType.Types.void], self.addMethod("clear", members, True, BuiltinTypes[IDLBuiltinType.Types.undefined],
[], chromeOnly=True) [], chromeOnly=True)
# boolean delete(keyType key) # boolean delete(keyType key)
self.addMethod("delete", members, True, self.addMethod("delete", members, True,
@ -5119,7 +5119,7 @@ class IDLMethod(IDLInterfaceMember, IDLScope):
assert (arguments[0].type == BuiltinTypes[IDLBuiltinType.Types.domstring] or assert (arguments[0].type == BuiltinTypes[IDLBuiltinType.Types.domstring] or
arguments[0].type == BuiltinTypes[IDLBuiltinType.Types.unsigned_long]) arguments[0].type == BuiltinTypes[IDLBuiltinType.Types.unsigned_long])
assert not arguments[0].optional and not arguments[0].variadic 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: if self._setter:
assert len(self._overloads) == 1 assert len(self._overloads) == 1
@ -5480,8 +5480,8 @@ class IDLMethod(IDLInterfaceMember, IDLScope):
# This is called before we've done overload resolution # This is called before we've done overload resolution
overloads = self._overloads overloads = self._overloads
assert len(overloads) == 1 assert len(overloads) == 1
if not overloads[0].returnType.isVoid(): if not overloads[0].returnType.isUndefined():
raise WebIDLError("[LenientFloat] used on a non-void method", raise WebIDLError("[LenientFloat] used on a non-undefined returning method",
[attr.location, self.location]) [attr.location, self.location])
if not overloads[0].includesRestrictedFloatArgument(): if not overloads[0].includesRestrictedFloatArgument():
raise WebIDLError("[LenientFloat] used on an operation with no " raise WebIDLError("[LenientFloat] used on an operation with no "
@ -5837,7 +5837,7 @@ class Tokenizer(object):
"record": "RECORD", "record": "RECORD",
"short": "SHORT", "short": "SHORT",
"unsigned": "UNSIGNED", "unsigned": "UNSIGNED",
"void": "VOID", "undefined": "UNDEFINED",
":": "COLON", ":": "COLON",
";": "SEMICOLON", ";": "SEMICOLON",
"{": "LBRACE", "{": "LBRACE",
@ -6722,8 +6722,8 @@ class Parser(Tokenizer):
"optional" if arguments[0].optional else "variadic"), "optional" if arguments[0].optional else "variadic"),
[arguments[0].location]) [arguments[0].location])
if getter: if getter:
if returnType.isVoid(): if returnType.isUndefined():
raise WebIDLError("getter cannot have void return type", raise WebIDLError("getter cannot have undefined return type",
[self.getLocation(p, 2)]) [self.getLocation(p, 2)])
if setter: if setter:
if len(arguments) != 2: if len(arguments) != 2:
@ -7103,7 +7103,7 @@ class Parser(Tokenizer):
| SYMBOL | SYMBOL
| TRUE | TRUE
| UNSIGNED | UNSIGNED
| VOID | UNDEFINED
| ArgumentNameKeyword | ArgumentNameKeyword
""" """
pass pass
@ -7145,7 +7145,7 @@ class Parser(Tokenizer):
""" """
p[0] = BuiltinTypes[IDLBuiltinType.Types.any] 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. # not Type. Promise types can't be null, hence no "Null" in there.
def p_SingleTypePromiseType(self, p): def p_SingleTypePromiseType(self, p):
""" """
@ -7413,11 +7413,11 @@ class Parser(Tokenizer):
""" """
p[0] = p[1] 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): def p_ScopedName(self, p):
""" """

View file

@ -3,7 +3,7 @@ def WebIDLTest(parser, harness):
try: try:
parser.parse(""" parser.parse("""
interface ArgumentIdentifierConflict { interface ArgumentIdentifierConflict {
void foo(boolean arg1, boolean arg1); undefined foo(boolean arg1, boolean arg1);
}; };
""") """)

View file

@ -1,7 +1,7 @@
def WebIDLTest(parser, harness): def WebIDLTest(parser, harness):
parser.parse(""" parser.parse("""
interface Foo { interface Foo {
void foo(object constructor); undefined foo(object constructor);
}; };
""") """)

View file

@ -2,8 +2,8 @@ def WebIDLTest(parser, harness):
threw = False threw = False
try: try:
parser.parse(""" parser.parse("""
interface VoidArgument1 { interface UndefinedArgument1 {
void foo(void arg2); undefined foo(undefined arg2);
}; };
""") """)

View file

@ -4,37 +4,37 @@ def WebIDLTest(parser, harness):
parser.parse(""" parser.parse("""
interface TestArrayBuffer { interface TestArrayBuffer {
attribute ArrayBuffer bufferAttr; attribute ArrayBuffer bufferAttr;
void bufferMethod(ArrayBuffer arg1, ArrayBuffer? arg2, sequence<ArrayBuffer> arg3); undefined bufferMethod(ArrayBuffer arg1, ArrayBuffer? arg2, sequence<ArrayBuffer> arg3);
attribute ArrayBufferView viewAttr; attribute ArrayBufferView viewAttr;
void viewMethod(ArrayBufferView arg1, ArrayBufferView? arg2, sequence<ArrayBufferView> arg3); undefined viewMethod(ArrayBufferView arg1, ArrayBufferView? arg2, sequence<ArrayBufferView> arg3);
attribute Int8Array int8ArrayAttr; attribute Int8Array int8ArrayAttr;
void int8ArrayMethod(Int8Array arg1, Int8Array? arg2, sequence<Int8Array> arg3); undefined int8ArrayMethod(Int8Array arg1, Int8Array? arg2, sequence<Int8Array> arg3);
attribute Uint8Array uint8ArrayAttr; attribute Uint8Array uint8ArrayAttr;
void uint8ArrayMethod(Uint8Array arg1, Uint8Array? arg2, sequence<Uint8Array> arg3); undefined uint8ArrayMethod(Uint8Array arg1, Uint8Array? arg2, sequence<Uint8Array> arg3);
attribute Uint8ClampedArray uint8ClampedArrayAttr; attribute Uint8ClampedArray uint8ClampedArrayAttr;
void uint8ClampedArrayMethod(Uint8ClampedArray arg1, Uint8ClampedArray? arg2, sequence<Uint8ClampedArray> arg3); undefined uint8ClampedArrayMethod(Uint8ClampedArray arg1, Uint8ClampedArray? arg2, sequence<Uint8ClampedArray> arg3);
attribute Int16Array int16ArrayAttr; attribute Int16Array int16ArrayAttr;
void int16ArrayMethod(Int16Array arg1, Int16Array? arg2, sequence<Int16Array> arg3); undefined int16ArrayMethod(Int16Array arg1, Int16Array? arg2, sequence<Int16Array> arg3);
attribute Uint16Array uint16ArrayAttr; attribute Uint16Array uint16ArrayAttr;
void uint16ArrayMethod(Uint16Array arg1, Uint16Array? arg2, sequence<Uint16Array> arg3); undefined uint16ArrayMethod(Uint16Array arg1, Uint16Array? arg2, sequence<Uint16Array> arg3);
attribute Int32Array int32ArrayAttr; attribute Int32Array int32ArrayAttr;
void int32ArrayMethod(Int32Array arg1, Int32Array? arg2, sequence<Int32Array> arg3); undefined int32ArrayMethod(Int32Array arg1, Int32Array? arg2, sequence<Int32Array> arg3);
attribute Uint32Array uint32ArrayAttr; attribute Uint32Array uint32ArrayAttr;
void uint32ArrayMethod(Uint32Array arg1, Uint32Array? arg2, sequence<Uint32Array> arg3); undefined uint32ArrayMethod(Uint32Array arg1, Uint32Array? arg2, sequence<Uint32Array> arg3);
attribute Float32Array float32ArrayAttr; attribute Float32Array float32ArrayAttr;
void float32ArrayMethod(Float32Array arg1, Float32Array? arg2, sequence<Float32Array> arg3); undefined float32ArrayMethod(Float32Array arg1, Float32Array? arg2, sequence<Float32Array> arg3);
attribute Float64Array float64ArrayAttr; 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") harness.ok(attr.type.isSpiderMonkeyInterface(), "Should test as a js interface")
(retType, arguments) = method.signatures()[0] (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(len(arguments), 3, "Expect 3 arguments")
harness.check(str(arguments[0].type), t, "Expect an ArrayBuffer type") harness.check(str(arguments[0].type), t, "Expect an ArrayBuffer type")

View file

@ -20,16 +20,16 @@ def WebIDLTest(parser, harness):
attribute [EnforceRange] long foo; attribute [EnforceRange] long foo;
attribute [Clamp] long bar; attribute [Clamp] long bar;
attribute [TreatNullAs=EmptyString] DOMString baz; 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); [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); optional [TreatNullAs=EmptyString] DOMString baz);
}; };
interface C { interface C {
attribute [EnforceRange] long? foo; attribute [EnforceRange] long? foo;
attribute [Clamp] long? bar; attribute [Clamp] long? bar;
void method([EnforceRange] long? foo, [Clamp] long? bar); undefined method([EnforceRange] long? foo, [Clamp] long? bar);
void method2(optional [EnforceRange] long? foo, optional [Clamp] long? bar); undefined method2(optional [EnforceRange] long? foo, optional [Clamp] long? bar);
}; };
interface Setlike { interface Setlike {
setlike<[Clamp] long>; setlike<[Clamp] long>;
@ -98,13 +98,13 @@ def WebIDLTest(parser, harness):
interface B { interface B {
attribute Foo typedefFoo; attribute Foo typedefFoo;
attribute [AllowShared] ArrayBufferView foo; attribute [AllowShared] ArrayBufferView foo;
void method([AllowShared] ArrayBufferView foo); undefined method([AllowShared] ArrayBufferView foo);
void method2(optional [AllowShared] ArrayBufferView foo); undefined method2(optional [AllowShared] ArrayBufferView foo);
}; };
interface C { interface C {
attribute [AllowShared] ArrayBufferView? foo; attribute [AllowShared] ArrayBufferView? foo;
void method([AllowShared] ArrayBufferView? foo); undefined method([AllowShared] ArrayBufferView? foo);
void method2(optional [AllowShared] ArrayBufferView? foo); undefined method2(optional [AllowShared] ArrayBufferView? foo);
}; };
interface Setlike { interface Setlike {
setlike<[AllowShared] ArrayBufferView>; setlike<[AllowShared] ArrayBufferView>;
@ -154,7 +154,7 @@ def WebIDLTest(parser, harness):
"""), """),
("optional arguments", """ ("optional arguments", """
interface Foo { interface Foo {
void foo(%s optional %s foo); undefined foo(%s optional %s foo);
}; };
"""), """),
("typedefs", """ ("typedefs", """
@ -189,7 +189,7 @@ def WebIDLTest(parser, harness):
"""), """),
("partial interface",""" ("partial interface","""
interface Foo { interface Foo {
void foo(); undefined foo();
}; };
%s %s
partial interface Foo { partial interface Foo {
@ -210,7 +210,7 @@ def WebIDLTest(parser, harness):
"""), """),
("partial namespace",""" ("partial namespace","""
namespace Foo { namespace Foo {
void foo(); undefined foo();
}; };
%s %s
partial namespace Foo { partial namespace Foo {
@ -387,7 +387,7 @@ def WebIDLTest(parser, harness):
try: try:
parser.parse(""" parser.parse("""
interface Foo { interface Foo {
void foo([Clamp] Bar arg); undefined foo([Clamp] Bar arg);
}; };
typedef long Bar; typedef long Bar;
""") """)
@ -403,7 +403,7 @@ def WebIDLTest(parser, harness):
try: try:
parser.parse(""" parser.parse("""
interface Foo { interface Foo {
void foo(Bar arg); undefined foo(Bar arg);
}; };
typedef [Clamp] long Bar; typedef [Clamp] long Bar;
""") """)

View file

@ -60,8 +60,8 @@ def WebIDLTest(parser, harness):
try: try:
parser.parse(""" parser.parse("""
interface OptionalByteString { interface OptionalByteString {
void passByteString(optional ByteString arg = "hello"); undefined passByteString(optional ByteString arg = "hello");
}; };
""") """)
results2 = parser.finish(); results2 = parser.finish();
except WebIDL.WebIDLError as e: except WebIDL.WebIDLError as e:

View file

@ -48,31 +48,31 @@ def WebIDLTest(parser, harness):
parser = parser.reset() parser = parser.reset()
parser.parse(""" parser.parse("""
callback interface TestCallbackInterface1 { callback interface TestCallbackInterface1 {
void foo(); undefined foo();
}; };
callback interface TestCallbackInterface2 { callback interface TestCallbackInterface2 {
void foo(DOMString arg); undefined foo(DOMString arg);
void foo(TestCallbackInterface1 arg); undefined foo(TestCallbackInterface1 arg);
}; };
callback interface TestCallbackInterface3 { callback interface TestCallbackInterface3 {
void foo(DOMString arg); undefined foo(DOMString arg);
void foo(TestCallbackInterface1 arg); undefined foo(TestCallbackInterface1 arg);
static void bar(); static undefined bar();
}; };
callback interface TestCallbackInterface4 { callback interface TestCallbackInterface4 {
void foo(DOMString arg); undefined foo(DOMString arg);
void foo(TestCallbackInterface1 arg); undefined foo(TestCallbackInterface1 arg);
static void bar(); static undefined bar();
const long baz = 5; const long baz = 5;
}; };
callback interface TestCallbackInterface5 { callback interface TestCallbackInterface5 {
static attribute boolean bool; static attribute boolean bool;
void foo(); undefined foo();
}; };
callback interface TestCallbackInterface6 { callback interface TestCallbackInterface6 {
void foo(DOMString arg); undefined foo(DOMString arg);
void foo(TestCallbackInterface1 arg); undefined foo(TestCallbackInterface1 arg);
void bar(); undefined bar();
}; };
callback interface TestCallbackInterface7 { callback interface TestCallbackInterface7 {
static attribute boolean bool; static attribute boolean bool;
@ -81,10 +81,10 @@ def WebIDLTest(parser, harness):
attribute boolean bool; attribute boolean bool;
}; };
callback interface TestCallbackInterface9 : TestCallbackInterface1 { callback interface TestCallbackInterface9 : TestCallbackInterface1 {
void foo(); undefined foo();
}; };
callback interface TestCallbackInterface10 : TestCallbackInterface1 { callback interface TestCallbackInterface10 : TestCallbackInterface1 {
void bar(); undefined bar();
}; };
""") """)
results = parser.finish() results = parser.finish()

View file

@ -3,7 +3,7 @@ def WebIDLTest(parser, harness):
try: try:
parser.parse(""" parser.parse("""
interface Foo { 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: try:
parser.parse(""" parser.parse("""
interface Foo { interface Foo {
[CEReactions] void foo(boolean arg2); [CEReactions] undefined foo(boolean arg2);
}; };
""") """)

View file

@ -158,7 +158,7 @@ def WebIDLTest(parser, harness):
dictionary A { dictionary A {
}; };
interface X { interface X {
void doFoo(A arg); undefined doFoo(A arg);
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -174,7 +174,7 @@ def WebIDLTest(parser, harness):
dictionary A { dictionary A {
}; };
interface X { interface X {
void doFoo(optional A arg); undefined doFoo(optional A arg);
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -190,7 +190,7 @@ def WebIDLTest(parser, harness):
dictionary A { dictionary A {
}; };
interface X { interface X {
void doFoo((A or DOMString) arg); undefined doFoo((A or DOMString) arg);
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -207,7 +207,7 @@ def WebIDLTest(parser, harness):
dictionary A { dictionary A {
}; };
interface X { interface X {
void doFoo(optional (A or DOMString) arg); undefined doFoo(optional (A or DOMString) arg);
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -224,7 +224,7 @@ def WebIDLTest(parser, harness):
dictionary A { dictionary A {
}; };
interface X { interface X {
void doFoo(A arg1, optional long arg2); undefined doFoo(A arg1, optional long arg2);
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -240,7 +240,7 @@ def WebIDLTest(parser, harness):
dictionary A { dictionary A {
}; };
interface X { interface X {
void doFoo(optional A arg1, optional long arg2); undefined doFoo(optional A arg1, optional long arg2);
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -256,7 +256,7 @@ def WebIDLTest(parser, harness):
dictionary A { dictionary A {
}; };
interface X { interface X {
void doFoo(A arg1, optional long arg2, long arg3); undefined doFoo(A arg1, optional long arg2, long arg3);
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -273,7 +273,7 @@ def WebIDLTest(parser, harness):
dictionary A { dictionary A {
}; };
interface X { interface X {
void doFoo((A or DOMString) arg1, optional long arg2); undefined doFoo((A or DOMString) arg1, optional long arg2);
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -291,7 +291,7 @@ def WebIDLTest(parser, harness):
dictionary A { dictionary A {
}; };
interface X { 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() results = parser.finish()
@ -307,7 +307,7 @@ def WebIDLTest(parser, harness):
dictionary A { dictionary A {
}; };
interface X { interface X {
void doFoo(A arg1, long arg2); undefined doFoo(A arg1, long arg2);
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -320,7 +320,7 @@ def WebIDLTest(parser, harness):
dictionary A { dictionary A {
}; };
interface X { interface X {
void doFoo(optional A? arg1 = {}); undefined doFoo(optional A? arg1 = {});
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -339,7 +339,7 @@ def WebIDLTest(parser, harness):
required long x; required long x;
}; };
interface X { interface X {
void doFoo(A? arg1); undefined doFoo(A? arg1);
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -358,7 +358,7 @@ def WebIDLTest(parser, harness):
dictionary A { dictionary A {
}; };
interface X { interface X {
void doFoo(optional (A or long)? arg1 = {}); undefined doFoo(optional (A or long)? arg1 = {});
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -378,7 +378,7 @@ def WebIDLTest(parser, harness):
required long x; required long x;
}; };
interface X { interface X {
void doFoo((A or long)? arg1); undefined doFoo((A or long)? arg1);
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -397,7 +397,7 @@ def WebIDLTest(parser, harness):
dictionary A { dictionary A {
}; };
interface X { interface X {
void doFoo(sequence<A?> arg1); undefined doFoo(sequence<A?> arg1);
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -414,7 +414,7 @@ def WebIDLTest(parser, harness):
dictionary A { dictionary A {
}; };
interface X { interface X {
void doFoo(optional (A or long?) arg1); undefined doFoo(optional (A or long?) arg1);
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -430,7 +430,7 @@ def WebIDLTest(parser, harness):
dictionary A { dictionary A {
}; };
interface X { interface X {
void doFoo(optional (long? or A) arg1); undefined doFoo(optional (long? or A) arg1);
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -455,7 +455,7 @@ def WebIDLTest(parser, harness):
dictionary A { dictionary A {
}; };
interface X { interface X {
void doFoo(optional A arg = {}); undefined doFoo(optional A arg = {});
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -466,7 +466,7 @@ def WebIDLTest(parser, harness):
dictionary A { dictionary A {
}; };
interface X { interface X {
void doFoo(optional (A or DOMString) arg = {}); undefined doFoo(optional (A or DOMString) arg = {});
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -477,7 +477,7 @@ def WebIDLTest(parser, harness):
dictionary A { dictionary A {
}; };
interface X { interface X {
void doFoo(optional (A or DOMString) arg = "abc"); undefined doFoo(optional (A or DOMString) arg = "abc");
}; };
""") """)
results = parser.finish() results = parser.finish()

View file

@ -12,10 +12,10 @@ def WebIDLTest(parser, harness):
}; };
interface Bar { interface Bar {
// Bit of a pain to get things that have dictionary types // Bit of a pain to get things that have dictionary types
void passDict(Dict arg); undefined passDict(Dict arg);
void passFoo(Foo arg); undefined passFoo(Foo arg);
void passNullableUnion((object? or DOMString) arg); undefined passNullableUnion((object? or DOMString) arg);
void passNullable(Foo? arg); undefined passNullable(Foo? arg);
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -56,13 +56,13 @@ def WebIDLTest(parser, harness):
parser = parser.reset() parser = parser.reset()
parser.parse(""" parser.parse("""
interface TestIface { interface TestIface {
void passKid(Kid arg); undefined passKid(Kid arg);
void passParent(Parent arg); undefined passParent(Parent arg);
void passGrandparent(Grandparent arg); undefined passGrandparent(Grandparent arg);
void passUnrelated1(Unrelated1 arg); undefined passUnrelated1(Unrelated1 arg);
void passUnrelated2(Unrelated2 arg); undefined passUnrelated2(Unrelated2 arg);
void passArrayBuffer(ArrayBuffer arg); undefined passArrayBuffer(ArrayBuffer arg);
void passArrayBuffer(ArrayBufferView arg); undefined passArrayBuffer(ArrayBufferView arg);
}; };
interface Kid : Parent {}; interface Kid : Parent {};
@ -97,10 +97,10 @@ def WebIDLTest(parser, harness):
parser.parse(""" parser.parse("""
interface Dummy {}; interface Dummy {};
interface TestIface { interface TestIface {
void method(long arg1, TestIface arg2); undefined method(long arg1, TestIface arg2);
void method(long arg1, long arg2); undefined method(long arg1, long arg2);
void method(long arg1, Dummy arg2); undefined method(long arg1, Dummy arg2);
void method(DOMString arg1, DOMString arg2, DOMString arg3); undefined method(DOMString arg1, DOMString arg2, DOMString arg3);
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -115,10 +115,10 @@ def WebIDLTest(parser, harness):
parser.parse(""" parser.parse("""
interface Dummy {}; interface Dummy {};
interface TestIface { interface TestIface {
void method(long arg1, TestIface arg2); undefined method(long arg1, TestIface arg2);
void method(long arg1, long arg2); undefined method(long arg1, long arg2);
void method(any arg1, Dummy arg2); undefined method(any arg1, Dummy arg2);
void method(DOMString arg1, DOMString arg2, DOMString arg3); undefined method(DOMString arg1, DOMString arg2, DOMString arg3);
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -135,10 +135,10 @@ def WebIDLTest(parser, harness):
parser.parse(""" parser.parse("""
interface Dummy {}; interface Dummy {};
interface TestIface { interface TestIface {
void method(long arg1, TestIface arg2); undefined method(long arg1, TestIface arg2);
void method(long arg1, long arg2); undefined method(long arg1, long arg2);
void method(any arg1, DOMString arg2); undefined method(any arg1, DOMString arg2);
void method(DOMString arg1, DOMString arg2, DOMString arg3); undefined method(DOMString arg1, DOMString arg2, DOMString arg3);
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -272,7 +272,7 @@ def WebIDLTest(parser, harness):
}; };
""" """
methodTemplate = """ methodTemplate = """
void myMethod(%s arg);""" undefined myMethod(%s arg);"""
methods = (methodTemplate % type1) + (methodTemplate % type2) methods = (methodTemplate % type1) + (methodTemplate % type2)
idl = idlTemplate % methods idl = idlTemplate % methods
parser = parser.reset() parser = parser.reset()

View file

@ -19,7 +19,7 @@ def WebIDLTest(parser, harness):
parser.parse(""" parser.parse("""
interface X { interface X {
void foo(optional sequence<long> arg = []); undefined foo(optional sequence<long> arg = []);
}; };
""") """)
results = parser.finish(); results = parser.finish();

View file

@ -71,7 +71,7 @@ def WebIDLTest(parser, harness):
"c" "c"
}; };
interface TestInterface { interface TestInterface {
void foo(optional Enum e = "d"); undefined foo(optional Enum e = "d");
}; };
""") """)
results = parser.finish() results = parser.finish()

View file

@ -8,7 +8,7 @@ def WebIDLTest(parser, harness):
[Exposed=(Foo,Bar1)] [Exposed=(Foo,Bar1)]
interface Iface { interface Iface {
void method1(); undefined method1();
[Exposed=Bar1] [Exposed=Bar1]
readonly attribute any attr; readonly attribute any attr;
@ -16,7 +16,7 @@ def WebIDLTest(parser, harness):
[Exposed=Foo] [Exposed=Foo]
partial interface Iface { partial interface Iface {
void method2(); undefined method2();
}; };
""") """)
@ -57,7 +57,7 @@ def WebIDLTest(parser, harness):
[Exposed=Foo] [Exposed=Foo]
interface Iface2 { interface Iface2 {
void method3(); undefined method3();
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -87,12 +87,12 @@ def WebIDLTest(parser, harness):
[Exposed=Foo] [Exposed=Foo]
interface Iface3 { interface Iface3 {
void method4(); undefined method4();
}; };
[Exposed=(Foo,Bar1)] [Exposed=(Foo,Bar1)]
interface mixin Mixin { interface mixin Mixin {
void method5(); undefined method5();
}; };
Iface3 includes Mixin; Iface3 includes Mixin;
@ -152,7 +152,7 @@ def WebIDLTest(parser, harness):
parser.parse(""" parser.parse("""
interface Bar { interface Bar {
[Exposed=Foo] [Exposed=Foo]
void operation(); undefined operation();
}; };
""") """)
@ -188,7 +188,7 @@ def WebIDLTest(parser, harness):
[Exposed=Foo] [Exposed=Foo]
interface Baz { interface Baz {
[Exposed=Bar] [Exposed=Bar]
void method(); undefined method();
}; };
""") """)
@ -205,12 +205,12 @@ def WebIDLTest(parser, harness):
[Exposed=Foo] [Exposed=Foo]
interface Baz { interface Baz {
void method(); undefined method();
}; };
[Exposed=Bar] [Exposed=Bar]
interface mixin Mixin { interface mixin Mixin {
void otherMethod(); undefined otherMethod();
}; };
Baz includes Mixin; Baz includes Mixin;

View file

@ -48,8 +48,8 @@ def WebIDLTest(parser, harness):
parser = parser.reset() parser = parser.reset()
parser.parse(""" parser.parse("""
interface TestClamp { interface TestClamp {
void testClamp([Clamp] long foo); undefined testClamp([Clamp] long foo);
void testNotClamp(long foo); undefined testNotClamp(long foo);
}; };
""") """)
@ -66,7 +66,7 @@ def WebIDLTest(parser, harness):
try: try:
parser.parse(""" parser.parse("""
interface TestClamp2 { interface TestClamp2 {
void testClamp([Clamp=something] long foo); undefined testClamp([Clamp=something] long foo);
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -78,8 +78,8 @@ def WebIDLTest(parser, harness):
parser = parser.reset() parser = parser.reset()
parser.parse(""" parser.parse("""
interface TestEnforceRange { interface TestEnforceRange {
void testEnforceRange([EnforceRange] long foo); undefined testEnforceRange([EnforceRange] long foo);
void testNotEnforceRange(long foo); undefined testNotEnforceRange(long foo);
}; };
""") """)
@ -96,7 +96,7 @@ def WebIDLTest(parser, harness):
try: try:
parser.parse(""" parser.parse("""
interface TestEnforceRange2 { interface TestEnforceRange2 {
void testEnforceRange([EnforceRange=something] long foo); undefined testEnforceRange([EnforceRange=something] long foo);
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -104,4 +104,4 @@ def WebIDLTest(parser, harness):
threw = True threw = True
harness.ok(threw, "[EnforceRange] must take no arguments") harness.ok(threw, "[EnforceRange] must take no arguments")

View file

@ -14,23 +14,23 @@ def WebIDLTest(parser, harness):
[LenientFloat] [LenientFloat]
attribute double ld; 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, myFloat arg5, unrestricted float arg6,
unrestricted double arg7, unrestricted float? arg8, unrestricted double arg7, unrestricted float? arg8,
unrestricted double? arg9, myUnrestrictedFloat arg10); unrestricted double? arg9, myUnrestrictedFloat arg10);
[LenientFloat] [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, myFloat arg5, unrestricted float arg6,
unrestricted double arg7, unrestricted float? arg8, unrestricted double arg7, unrestricted float? arg8,
unrestricted double? arg9, myUnrestrictedFloat arg10); unrestricted double? arg9, myUnrestrictedFloat arg10);
[LenientFloat] [LenientFloat]
void m3(float arg); undefined m3(float arg);
[LenientFloat] [LenientFloat]
void m4(double arg); undefined m4(double arg);
[LenientFloat] [LenientFloat]
void m5((float or FloatTypes) arg); undefined m5((float or FloatTypes) arg);
[LenientFloat] [LenientFloat]
void m6(sequence<float> arg); undefined m6(sequence<float> arg);
}; };
""") """)
@ -70,7 +70,7 @@ def WebIDLTest(parser, harness):
""") """)
except Exception as x: except Exception as x:
threw = True threw = True
harness.ok(threw, "[LenientFloat] only allowed on void methods") harness.ok(threw, "[LenientFloat] only allowed on undefined-retuning methods")
parser = parser.reset() parser = parser.reset()
threw = False threw = False
@ -78,7 +78,7 @@ def WebIDLTest(parser, harness):
parser.parse(""" parser.parse("""
interface FloatTypes { interface FloatTypes {
[LenientFloat] [LenientFloat]
void m(unrestricted float arg); undefined m(unrestricted float arg);
}; };
""") """)
except Exception as x: except Exception as x:
@ -91,7 +91,7 @@ def WebIDLTest(parser, harness):
parser.parse(""" parser.parse("""
interface FloatTypes { interface FloatTypes {
[LenientFloat] [LenientFloat]
void m(sequence<unrestricted float> arg); undefined m(sequence<unrestricted float> arg);
}; };
""") """)
except Exception as x: except Exception as x:
@ -104,7 +104,7 @@ def WebIDLTest(parser, harness):
parser.parse(""" parser.parse("""
interface FloatTypes { interface FloatTypes {
[LenientFloat] [LenientFloat]
void m((unrestricted float or FloatTypes) arg); undefined m((unrestricted float or FloatTypes) arg);
}; };
""") """)
except Exception as x: except Exception as x:

View file

@ -22,7 +22,7 @@ def WebIDLTest(parser, harness):
[Global, Exposed=Foo] [Global, Exposed=Foo]
interface Foo { interface Foo {
getter any(DOMString name); getter any(DOMString name);
setter void(DOMString name, any arg); setter undefined(DOMString name, any arg);
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -40,7 +40,7 @@ def WebIDLTest(parser, harness):
[Global, Exposed=Foo] [Global, Exposed=Foo]
interface Foo { interface Foo {
getter any(DOMString name); getter any(DOMString name);
deleter void(DOMString name); deleter undefined(DOMString name);
}; };
""") """)
results = parser.finish() results = parser.finish()

View file

@ -3,7 +3,7 @@ import WebIDL
def WebIDLTest(parser, harness): def WebIDLTest(parser, harness):
parser.parse(""" parser.parse("""
interface TestIncompleteParent : NotYetDefined { interface TestIncompleteParent : NotYetDefined {
void foo(); undefined foo();
}; };
interface NotYetDefined : EvenHigherOnTheChain { interface NotYetDefined : EvenHigherOnTheChain {

View file

@ -32,7 +32,7 @@ def WebIDLTest(parser, harness):
interface QNameDerived : QNameBase { interface QNameDerived : QNameBase {
attribute long long foo; attribute long long foo;
attribute byte bar; attribute byte bar;
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -99,11 +99,11 @@ def WebIDLTest(parser, harness):
constructor(); constructor();
constructor(long arg); constructor(long arg);
readonly attribute boolean x; readonly attribute boolean x;
void foo(); undefined foo();
}; };
partial interface A { partial interface A {
readonly attribute boolean y; readonly attribute boolean y;
void foo(long arg); undefined foo(long arg);
}; };
"""); """);
results = parser.finish(); results = parser.finish();
@ -127,13 +127,13 @@ def WebIDLTest(parser, harness):
parser.parse(""" parser.parse("""
partial interface A { partial interface A {
readonly attribute boolean y; readonly attribute boolean y;
void foo(long arg); undefined foo(long arg);
}; };
interface A { interface A {
constructor(); constructor();
constructor(long arg); constructor(long arg);
readonly attribute boolean x; readonly attribute boolean x;
void foo(); undefined foo();
}; };
"""); """);
results = parser.finish(); results = parser.finish();

View file

@ -358,7 +358,7 @@ def WebIDLTest(parser, harness):
interface Foo1 { interface Foo1 {
%s; %s;
[Throws] [Throws]
void %s(long test1, double test2, double test3); undefined %s(long test1, double test2, double test3);
}; };
""" % (likeMember, conflictName), expectedMembers) """ % (likeMember, conflictName), expectedMembers)
else: else:
@ -367,14 +367,14 @@ def WebIDLTest(parser, harness):
interface Foo1 { interface Foo1 {
%s; %s;
[Throws] [Throws]
void %s(long test1, double test2, double test3); undefined %s(long test1, double test2, double test3);
}; };
""" % (likeMember, conflictName)) """ % (likeMember, conflictName))
# Inherited conflicting methods should ALWAYS fail # Inherited conflicting methods should ALWAYS fail
shouldFail("Conflicting inherited method: %s and %s" % (likeMember, conflictName), shouldFail("Conflicting inherited method: %s and %s" % (likeMember, conflictName),
""" """
interface Foo1 { interface Foo1 {
void %s(long test1, double test2, double test3); undefined %s(long test1, double test2, double test3);
}; };
interface Foo2 : Foo1 { interface Foo2 : Foo1 {
%s; %s;
@ -384,7 +384,7 @@ def WebIDLTest(parser, harness):
""" """
interface Foo1 { interface Foo1 {
%s; %s;
static void %s(long test1, double test2, double test3); static undefined %s(long test1, double test2, double test3);
}; };
""" % (likeMember, conflictName)) """ % (likeMember, conflictName))
shouldFail("Conflicting attribute: %s and %s" % (likeMember, conflictName), shouldFail("Conflicting attribute: %s and %s" % (likeMember, conflictName),
@ -426,7 +426,7 @@ def WebIDLTest(parser, harness):
maplike<long, long>; maplike<long, long>;
}; };
interface Foo2 : Foo1 { interface Foo2 : Foo1 {
void entries(); undefined entries();
}; };
""", mapRWMembers, numProductions=2) """, mapRWMembers, numProductions=2)
@ -438,7 +438,7 @@ def WebIDLTest(parser, harness):
interface Foo2 : Foo1 { interface Foo2 : Foo1 {
}; };
interface Foo3 : Foo2 { interface Foo3 : Foo2 {
void entries(); undefined entries();
}; };
""", mapRWMembers, numProductions=3) """, mapRWMembers, numProductions=3)
@ -448,7 +448,7 @@ def WebIDLTest(parser, harness):
maplike<long, long>; maplike<long, long>;
}; };
interface mixin Foo2 { interface mixin Foo2 {
void entries(); undefined entries();
}; };
Foo1 includes Foo2; Foo1 includes Foo2;
""") """)
@ -459,7 +459,7 @@ def WebIDLTest(parser, harness):
maplike<long, long>; maplike<long, long>;
}; };
interface mixin Foo2 { interface mixin Foo2 {
void entries(); undefined entries();
}; };
interface Foo3 : Foo1 { interface Foo3 : Foo1 {
}; };
@ -469,7 +469,7 @@ def WebIDLTest(parser, harness):
shouldFail("Inheritance of name collision with child maplike/setlike", shouldFail("Inheritance of name collision with child maplike/setlike",
""" """
interface Foo1 { interface Foo1 {
void entries(); undefined entries();
}; };
interface Foo2 : Foo1 { interface Foo2 : Foo1 {
maplike<long, long>; maplike<long, long>;
@ -479,7 +479,7 @@ def WebIDLTest(parser, harness):
shouldFail("Inheritance of multi-level name collision with child maplike/setlike", shouldFail("Inheritance of multi-level name collision with child maplike/setlike",
""" """
interface Foo1 { interface Foo1 {
void entries(); undefined entries();
}; };
interface Foo2 : Foo1 { interface Foo2 : Foo1 {
}; };
@ -558,7 +558,7 @@ def WebIDLTest(parser, harness):
maplike<long, long>; maplike<long, long>;
}; };
interface Foo2 : Foo1 { interface Foo2 : Foo1 {
void clear(); undefined clear();
}; };
""", mapRWMembers, numProductions=2) """, mapRWMembers, numProductions=2)

View file

@ -30,11 +30,11 @@ def WebIDLTest(parser, harness):
parser.parse(""" parser.parse("""
interface mixin A { interface mixin A {
readonly attribute boolean x; readonly attribute boolean x;
void foo(); undefined foo();
}; };
partial interface mixin A { partial interface mixin A {
readonly attribute boolean y; readonly attribute boolean y;
void foo(long arg); undefined foo(long arg);
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -56,11 +56,11 @@ def WebIDLTest(parser, harness):
parser.parse(""" parser.parse("""
partial interface mixin A { partial interface mixin A {
readonly attribute boolean y; readonly attribute boolean y;
void foo(long arg); undefined foo(long arg);
}; };
interface mixin A { interface mixin A {
readonly attribute boolean x; readonly attribute boolean x;
void foo(); undefined foo();
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -212,7 +212,7 @@ def WebIDLTest(parser, harness):
try: try:
parser.parse(""" parser.parse("""
interface mixin A { interface mixin A {
setter void (DOMString propertyName, double propertyValue); setter undefined (DOMString propertyName, double propertyValue);
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -226,7 +226,7 @@ def WebIDLTest(parser, harness):
try: try:
parser.parse(""" parser.parse("""
interface mixin A { interface mixin A {
deleter void (DOMString propertyName); deleter undefined (DOMString propertyName);
}; };
""") """)
results = parser.finish() results = parser.finish()

View file

@ -3,17 +3,17 @@ import WebIDL
def WebIDLTest(parser, harness): def WebIDLTest(parser, harness):
parser.parse(""" parser.parse("""
interface TestMethods { interface TestMethods {
void basic(); undefined basic();
static void basicStatic(); static undefined basicStatic();
void basicWithSimpleArgs(boolean arg1, byte arg2, unsigned long arg3); undefined basicWithSimpleArgs(boolean arg1, byte arg2, unsigned long arg3);
boolean basicBoolean(); boolean basicBoolean();
static boolean basicStaticBoolean(); static boolean basicStaticBoolean();
boolean basicBooleanWithSimpleArgs(boolean arg1, byte arg2, unsigned long arg3); boolean basicBooleanWithSimpleArgs(boolean arg1, byte arg2, unsigned long arg3);
void optionalArg(optional byte? arg1, optional sequence<byte> arg2); undefined optionalArg(optional byte? arg1, optional sequence<byte> arg2);
void variadicArg(byte?... arg1); undefined variadicArg(byte?... arg1);
object getObject(); object getObject();
void setObject(object arg1); undefined setObject(object arg1);
void setAny(any arg1); undefined setAny(any arg1);
float doFloats(float arg1); float doFloats(float arg1);
}; };
""") """)
@ -70,12 +70,12 @@ def WebIDLTest(parser, harness):
(QName, name, type, optional, variadic) = expectedArgs[i] (QName, name, type, optional, variadic) = expectedArgs[i]
checkArgument(gotArgs[i], QName, name, type, optional, variadic) 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", checkMethod(methods[1], "::TestMethods::basicStatic", "basicStatic",
[("Void", [])], static=True) [("Undefined", [])], static=True)
checkMethod(methods[2], "::TestMethods::basicWithSimpleArgs", checkMethod(methods[2], "::TestMethods::basicWithSimpleArgs",
"basicWithSimpleArgs", "basicWithSimpleArgs",
[("Void", [("Undefined",
[("::TestMethods::basicWithSimpleArgs::arg1", "arg1", "Boolean", False, False), [("::TestMethods::basicWithSimpleArgs::arg1", "arg1", "Boolean", False, False),
("::TestMethods::basicWithSimpleArgs::arg2", "arg2", "Byte", False, False), ("::TestMethods::basicWithSimpleArgs::arg2", "arg2", "Byte", False, False),
("::TestMethods::basicWithSimpleArgs::arg3", "arg3", "UnsignedLong", False, False)])]) ("::TestMethods::basicWithSimpleArgs::arg3", "arg3", "UnsignedLong", False, False)])])
@ -89,22 +89,22 @@ def WebIDLTest(parser, harness):
("::TestMethods::basicBooleanWithSimpleArgs::arg3", "arg3", "UnsignedLong", False, False)])]) ("::TestMethods::basicBooleanWithSimpleArgs::arg3", "arg3", "UnsignedLong", False, False)])])
checkMethod(methods[6], "::TestMethods::optionalArg", checkMethod(methods[6], "::TestMethods::optionalArg",
"optionalArg", "optionalArg",
[("Void", [("Undefined",
[("::TestMethods::optionalArg::arg1", "arg1", "ByteOrNull", True, False), [("::TestMethods::optionalArg::arg1", "arg1", "ByteOrNull", True, False),
("::TestMethods::optionalArg::arg2", "arg2", "ByteSequence", True, False)])]) ("::TestMethods::optionalArg::arg2", "arg2", "ByteSequence", True, False)])])
checkMethod(methods[7], "::TestMethods::variadicArg", checkMethod(methods[7], "::TestMethods::variadicArg",
"variadicArg", "variadicArg",
[("Void", [("Undefined",
[("::TestMethods::variadicArg::arg1", "arg1", "ByteOrNull", True, True)])]) [("::TestMethods::variadicArg::arg1", "arg1", "ByteOrNull", True, True)])])
checkMethod(methods[8], "::TestMethods::getObject", checkMethod(methods[8], "::TestMethods::getObject",
"getObject", [("Object", [])]) "getObject", [("Object", [])])
checkMethod(methods[9], "::TestMethods::setObject", checkMethod(methods[9], "::TestMethods::setObject",
"setObject", "setObject",
[("Void", [("Undefined",
[("::TestMethods::setObject::arg1", "arg1", "Object", False, False)])]) [("::TestMethods::setObject::arg1", "arg1", "Object", False, False)])])
checkMethod(methods[10], "::TestMethods::setAny", checkMethod(methods[10], "::TestMethods::setAny",
"setAny", "setAny",
[("Void", [("Undefined",
[("::TestMethods::setAny::arg1", "arg1", "Any", False, False)])]) [("::TestMethods::setAny::arg1", "arg1", "Any", False, False)])])
checkMethod(methods[11], "::TestMethods::doFloats", checkMethod(methods[11], "::TestMethods::doFloats",
"doFloats", "doFloats",
@ -116,7 +116,7 @@ def WebIDLTest(parser, harness):
try: try:
parser.parse(""" parser.parse("""
interface A { interface A {
void foo(optional float bar = 1); undefined foo(optional float bar = 1);
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -129,7 +129,7 @@ def WebIDLTest(parser, harness):
try: try:
parser.parse(""" parser.parse("""
interface A { interface A {
[GetterThrows] void foo(); [GetterThrows] undefined foo();
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -142,7 +142,7 @@ def WebIDLTest(parser, harness):
try: try:
parser.parse(""" parser.parse("""
interface A { interface A {
[SetterThrows] void foo(); [SetterThrows] undefined foo();
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -155,7 +155,7 @@ def WebIDLTest(parser, harness):
try: try:
parser.parse(""" parser.parse("""
interface A { interface A {
[Throw] void foo(); [Throw] undefined foo();
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -168,7 +168,7 @@ def WebIDLTest(parser, harness):
try: try:
parser.parse(""" parser.parse("""
interface A { interface A {
void __noSuchMethod__(); undefined __noSuchMethod__();
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -182,9 +182,9 @@ def WebIDLTest(parser, harness):
parser.parse(""" parser.parse("""
interface A { interface A {
[Throws, LenientFloat] [Throws, LenientFloat]
void foo(float myFloat); undefined foo(float myFloat);
[Throws] [Throws]
void foo(); undefined foo();
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -196,9 +196,9 @@ def WebIDLTest(parser, harness):
parser.parse(""" parser.parse("""
interface A { interface A {
[Throws] [Throws]
void foo(); undefined foo();
[Throws, LenientFloat] [Throws, LenientFloat]
void foo(float myFloat); undefined foo(float myFloat);
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -213,9 +213,9 @@ def WebIDLTest(parser, harness):
parser.parse(""" parser.parse("""
interface A { interface A {
[Throws, LenientFloat] [Throws, LenientFloat]
void foo(float myFloat); undefined foo(float myFloat);
[Throws] [Throws]
void foo(float myFloat, float yourFloat); undefined foo(float myFloat, float yourFloat);
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -229,9 +229,9 @@ def WebIDLTest(parser, harness):
parser.parse(""" parser.parse("""
interface A { interface A {
[Throws] [Throws]
void foo(float myFloat, float yourFloat); undefined foo(float myFloat, float yourFloat);
[Throws, LenientFloat] [Throws, LenientFloat]
void foo(float myFloat); undefined foo(float myFloat);
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -245,9 +245,9 @@ def WebIDLTest(parser, harness):
parser.parse(""" parser.parse("""
interface A { interface A {
[Throws, LenientFloat] [Throws, LenientFloat]
void foo(float myFloat); undefined foo(float myFloat);
[Throws, LenientFloat] [Throws, LenientFloat]
void foo(short myShort); undefined foo(short myShort);
}; };
""") """)
results = parser.finish() results = parser.finish()

View file

@ -2,8 +2,8 @@ def WebIDLTest(parser, harness):
threw = False threw = False
try: try:
parser.parse(""" parser.parse("""
interface NullableVoid { interface NullableUndefined {
void? foo(); undefined? foo();
}; };
""") """)

View file

@ -3,7 +3,7 @@ def WebIDLTest(parser, harness):
try: try:
parser.parse(""" parser.parse("""
interface OptionalConstraints1 { 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 = parser.reset()
parser.parse(""" parser.parse("""
interface OptionalConstraints2 { 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 arg3, optional byte arg4 = 4,
optional byte arg5, optional byte arg6 = 9); optional byte arg5, optional byte arg6 = 9);
}; };

View file

@ -3,16 +3,16 @@ import WebIDL
def WebIDLTest(parser, harness): def WebIDLTest(parser, harness):
parser.parse(""" parser.parse("""
interface TestOverloads { interface TestOverloads {
void basic(); undefined basic();
void basic(long arg1); undefined basic(long arg1);
boolean abitharder(TestOverloads foo); boolean abitharder(TestOverloads foo);
boolean abitharder(boolean foo); boolean abitharder(boolean foo);
void abitharder(ArrayBuffer? foo); undefined abitharder(ArrayBuffer? foo);
void withVariadics(long... numbers); undefined withVariadics(long... numbers);
void withVariadics(TestOverloads iface); undefined withVariadics(TestOverloads iface);
void withVariadics(long num, TestOverloads iface); undefined withVariadics(long num, TestOverloads iface);
void optionalTest(); undefined optionalTest();
void optionalTest(optional long num1, long num2); undefined optionalTest(optional long num1, long num2);
}; };
""") """)
@ -37,11 +37,11 @@ def WebIDLTest(parser, harness):
(retval, argumentSet) = signatures[0] (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") harness.check(len(argumentSet), 0, "Expect an empty argument set")
(retval, argumentSet) = signatures[1] (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") harness.check(len(argumentSet), 1, "Expect an argument set with one argument")
argument = argumentSet[0] argument = argumentSet[0]

View file

@ -64,7 +64,7 @@ def WebIDLTest(parser, harness):
try: try:
parser.parse(""" parser.parse("""
interface A { interface A {
void foo(Promise<any>? arg); undefined foo(Promise<any>? arg);
}; };
""") """)
results = parser.finish(); results = parser.finish();

View file

@ -4,7 +4,7 @@ def WebIDLTest(parser, harness):
parser.parse(""" parser.parse("""
dictionary Dict {}; dictionary Dict {};
interface RecordArg { interface RecordArg {
void foo(record<DOMString, Dict> arg); undefined foo(record<DOMString, Dict> arg);
}; };
""") """)
@ -27,16 +27,16 @@ def WebIDLTest(parser, harness):
threw = False threw = False
try: try:
parser.parse(""" parser.parse("""
interface RecordVoidArg { interface RecordUndefinedArg {
void foo(record<DOMString, void> arg); undefined foo(record<DOMString, undefined> arg);
}; };
""") """)
results = parser.finish() results = parser.finish()
except Exception as x: except Exception as x:
threw = True 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() parser = parser.reset()
threw = False threw = False
try: try:

View file

@ -6,12 +6,12 @@ def WebIDLTest(parser, harness):
interface TestSecureContextOnInterface { interface TestSecureContextOnInterface {
const octet TEST_CONSTANT = 0; const octet TEST_CONSTANT = 0;
readonly attribute byte testAttribute; readonly attribute byte testAttribute;
void testMethod(byte foo); undefined testMethod(byte foo);
}; };
partial interface TestSecureContextOnInterface { partial interface TestSecureContextOnInterface {
const octet TEST_CONSTANT_2 = 0; const octet TEST_CONSTANT_2 = 0;
readonly attribute byte testAttribute2; readonly attribute byte testAttribute2;
void testMethod2(byte foo); undefined testMethod2(byte foo);
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -37,13 +37,13 @@ def WebIDLTest(parser, harness):
partial interface TestSecureContextOnInterfaceAfterPartialInterface { partial interface TestSecureContextOnInterfaceAfterPartialInterface {
const octet TEST_CONSTANT_2 = 0; const octet TEST_CONSTANT_2 = 0;
readonly attribute byte testAttribute2; readonly attribute byte testAttribute2;
void testMethod2(byte foo); undefined testMethod2(byte foo);
}; };
[SecureContext] [SecureContext]
interface TestSecureContextOnInterfaceAfterPartialInterface { interface TestSecureContextOnInterfaceAfterPartialInterface {
const octet TEST_CONSTANT = 0; const octet TEST_CONSTANT = 0;
readonly attribute byte testAttribute; readonly attribute byte testAttribute;
void testMethod(byte foo); undefined testMethod(byte foo);
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -68,13 +68,13 @@ def WebIDLTest(parser, harness):
interface TestSecureContextOnPartialInterface { interface TestSecureContextOnPartialInterface {
const octet TEST_CONSTANT = 0; const octet TEST_CONSTANT = 0;
readonly attribute byte testAttribute; readonly attribute byte testAttribute;
void testMethod(byte foo); undefined testMethod(byte foo);
}; };
[SecureContext] [SecureContext]
partial interface TestSecureContextOnPartialInterface { partial interface TestSecureContextOnPartialInterface {
const octet TEST_CONSTANT_2 = 0; const octet TEST_CONSTANT_2 = 0;
readonly attribute byte testAttribute2; readonly attribute byte testAttribute2;
void testMethod2(byte foo); undefined testMethod2(byte foo);
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -105,10 +105,10 @@ def WebIDLTest(parser, harness):
[SecureContext] [SecureContext]
readonly attribute byte testSecureAttribute; readonly attribute byte testSecureAttribute;
readonly attribute byte testNonSecureAttribute2; readonly attribute byte testNonSecureAttribute2;
void testNonSecureMethod1(byte foo); undefined testNonSecureMethod1(byte foo);
[SecureContext] [SecureContext]
void testSecureMethod(byte foo); undefined testSecureMethod(byte foo);
void testNonSecureMethod2(byte foo); undefined testNonSecureMethod2(byte foo);
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -147,10 +147,10 @@ def WebIDLTest(parser, harness):
[SecureContext] [SecureContext]
readonly attribute byte testSecureAttribute; readonly attribute byte testSecureAttribute;
readonly attribute byte testNonSecureAttribute2; readonly attribute byte testNonSecureAttribute2;
void testNonSecureMethod1(byte foo); undefined testNonSecureMethod1(byte foo);
[SecureContext] [SecureContext]
void testSecureMethod(byte foo); undefined testSecureMethod(byte foo);
void testNonSecureMethod2(byte foo); undefined testNonSecureMethod2(byte foo);
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -194,10 +194,10 @@ def WebIDLTest(parser, harness):
parser.parse(""" parser.parse("""
interface TestSecureContextForOverloads1 { interface TestSecureContextForOverloads1 {
[SecureContext] [SecureContext]
void testSecureMethod(byte foo); undefined testSecureMethod(byte foo);
}; };
partial interface TestSecureContextForOverloads1 { partial interface TestSecureContextForOverloads1 {
void testSecureMethod(byte foo, byte bar); undefined testSecureMethod(byte foo, byte bar);
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -211,11 +211,11 @@ def WebIDLTest(parser, harness):
parser.parse(""" parser.parse("""
interface TestSecureContextForOverloads2 { interface TestSecureContextForOverloads2 {
[SecureContext] [SecureContext]
void testSecureMethod(byte foo); undefined testSecureMethod(byte foo);
}; };
partial interface TestSecureContextForOverloads2 { partial interface TestSecureContextForOverloads2 {
[SecureContext] [SecureContext]
void testSecureMethod(byte foo, byte bar); undefined testSecureMethod(byte foo, byte bar);
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -230,7 +230,7 @@ def WebIDLTest(parser, harness):
[SecureContext] [SecureContext]
interface TestSecureContextOnInterfaceAndMember { interface TestSecureContextOnInterfaceAndMember {
[SecureContext] [SecureContext]
void testSecureMethod(byte foo); undefined testSecureMethod(byte foo);
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -247,7 +247,7 @@ def WebIDLTest(parser, harness):
[SecureContext] [SecureContext]
partial interface TestSecureContextOnPartialInterfaceAndMember { partial interface TestSecureContextOnPartialInterfaceAndMember {
[SecureContext] [SecureContext]
void testSecureMethod(byte foo); undefined testSecureMethod(byte foo);
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -264,7 +264,7 @@ def WebIDLTest(parser, harness):
}; };
partial interface TestSecureContextOnInterfaceAndPartialInterfaceMember { partial interface TestSecureContextOnInterfaceAndPartialInterfaceMember {
[SecureContext] [SecureContext]
void testSecureMethod(byte foo); undefined testSecureMethod(byte foo);
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -280,7 +280,7 @@ def WebIDLTest(parser, harness):
interface TestSecureContextOnInheritedInterface { interface TestSecureContextOnInheritedInterface {
}; };
interface TestSecureContextNotOnInheritingInterface : TestSecureContextOnInheritedInterface { interface TestSecureContextNotOnInheritingInterface : TestSecureContextOnInheritedInterface {
void testSecureMethod(byte foo); undefined testSecureMethod(byte foo);
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -298,7 +298,7 @@ def WebIDLTest(parser, harness):
interface mixin TestNonSecureContextMixin { interface mixin TestNonSecureContextMixin {
const octet TEST_CONSTANT_2 = 0; const octet TEST_CONSTANT_2 = 0;
readonly attribute byte testAttribute2; readonly attribute byte testAttribute2;
void testMethod2(byte foo); undefined testMethod2(byte foo);
}; };
TestSecureContextInterfaceThatIncludesNonSecureContextMixin includes TestNonSecureContextMixin; TestSecureContextInterfaceThatIncludesNonSecureContextMixin includes TestNonSecureContextMixin;
""") """)
@ -314,13 +314,13 @@ def WebIDLTest(parser, harness):
"Attributes copied from non-[SecureContext] mixin should not be [SecureContext]") "Attributes copied from non-[SecureContext] mixin should not be [SecureContext]")
harness.ok(results[0].members[3].getExtendedAttribute("SecureContext") is None, harness.ok(results[0].members[3].getExtendedAttribute("SecureContext") is None,
"Methods copied from non-[SecureContext] mixin should not be [SecureContext]") "Methods copied from non-[SecureContext] mixin should not be [SecureContext]")
# Test SecureContext and NoInterfaceObject # Test SecureContext and NoInterfaceObject
parser = parser.reset() parser = parser.reset()
parser.parse(""" parser.parse("""
[NoInterfaceObject, SecureContext] [NoInterfaceObject, SecureContext]
interface TestSecureContextNoInterfaceObject { interface TestSecureContextNoInterfaceObject {
void testSecureMethod(byte foo); undefined testSecureMethod(byte foo);
}; };
""") """)
results = parser.finish() results = parser.finish()

View file

@ -17,7 +17,7 @@ def WebIDLTest(parser, harness):
try: try:
parser.parse(""" parser.parse("""
interface SpecialMethodSignatureMismatch2 { interface SpecialMethodSignatureMismatch2 {
getter void foo(unsigned long index); getter undefined foo(unsigned long index);
}; };
""") """)

View file

@ -61,7 +61,7 @@ def WebIDLTest(parser, harness):
parser.parse( parser.parse(
""" """
interface IndexedDeleter { interface IndexedDeleter {
deleter void(unsigned long index); deleter undefined(unsigned long index);
}; };
""") """)
parser.finish() parser.finish()
@ -69,5 +69,5 @@ def WebIDLTest(parser, harness):
threw = True threw = True
harness.ok(threw, "There are no indexed deleters") harness.ok(threw, "There are no indexed deleters")

View file

@ -4,9 +4,9 @@ def WebIDLTest(parser, harness):
typedef long? mynullablelong; typedef long? mynullablelong;
interface Foo { interface Foo {
const mylong X = 5; const mylong X = 5;
void foo(optional mynullablelong arg = 7); undefined foo(optional mynullablelong arg = 7);
void bar(optional mynullablelong arg = null); undefined bar(optional mynullablelong arg = null);
void baz(mylong arg); undefined baz(mylong arg);
}; };
""") """)
@ -21,7 +21,7 @@ def WebIDLTest(parser, harness):
parser.parse(""" parser.parse("""
typedef long? mynullablelong; typedef long? mynullablelong;
interface Foo { interface Foo {
void foo(mynullablelong? Y); undefined foo(mynullablelong? Y);
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -44,7 +44,7 @@ def WebIDLTest(parser, harness):
threw = True threw = True
harness.ok(threw, "Should have thrown on nullable inside nullable const.") harness.ok(threw, "Should have thrown on nullable inside nullable const.")
parser = parser.reset() parser = parser.reset()
threw = False threw = False
try: try:

View file

@ -47,7 +47,7 @@ def WebIDLTest(parser, harness):
parser = parser.reset(); parser = parser.reset();
parser.parse(""" parser.parse("""
interface Child : Parent { interface Child : Parent {
static void foo(); static undefined foo();
}; };
interface Parent { interface Parent {
[Unforgeable] readonly attribute long foo; [Unforgeable] readonly attribute long foo;
@ -65,7 +65,7 @@ def WebIDLTest(parser, harness):
try: try:
parser.parse(""" parser.parse("""
interface Child : Parent { interface Child : Parent {
void foo(); undefined foo();
}; };
interface Parent { interface Parent {
[Unforgeable] readonly attribute long foo; [Unforgeable] readonly attribute long foo;
@ -84,10 +84,10 @@ def WebIDLTest(parser, harness):
try: try:
parser.parse(""" parser.parse("""
interface Child : Parent { interface Child : Parent {
void foo(); undefined foo();
}; };
interface Parent { interface Parent {
[Unforgeable] void foo(); [Unforgeable] undefined foo();
}; };
""") """)
@ -125,7 +125,7 @@ def WebIDLTest(parser, harness):
attribute short foo; attribute short foo;
}; };
interface Parent { interface Parent {
[Unforgeable] void foo(); [Unforgeable] undefined foo();
}; };
""") """)
@ -157,7 +157,7 @@ def WebIDLTest(parser, harness):
try: try:
parser.parse(""" parser.parse("""
interface Child : Parent { interface Child : Parent {
void foo(); undefined foo();
}; };
interface Parent {}; interface Parent {};
interface mixin Mixin { interface mixin Mixin {
@ -187,7 +187,7 @@ def WebIDLTest(parser, harness):
}; };
GrandParent includes Mixin; GrandParent includes Mixin;
interface mixin ChildMixin { interface mixin ChildMixin {
void foo(); undefined foo();
}; };
Child includes ChildMixin; Child includes ChildMixin;
""") """)
@ -209,11 +209,11 @@ def WebIDLTest(parser, harness):
interface Parent : GrandParent {}; interface Parent : GrandParent {};
interface GrandParent {}; interface GrandParent {};
interface mixin Mixin { interface mixin Mixin {
[Unforgeable] void foo(); [Unforgeable] undefined foo();
}; };
GrandParent includes Mixin; GrandParent includes Mixin;
interface mixin ChildMixin { interface mixin ChildMixin {
void foo(); undefined foo();
}; };
Child includes ChildMixin; Child includes ChildMixin;
""") """)

View file

@ -136,10 +136,10 @@ def WebIDLTest(parser, harness):
""" """
for (i, type) in enumerate(validUnionTypes): for (i, type) in enumerate(validUnionTypes):
interface += string.Template(""" interface += string.Template("""
void method${i}(${type} arg); undefined method${i}(${type} arg);
${type} returnMethod${i}(); ${type} returnMethod${i}();
attribute ${type} attr${i}; attribute ${type} attr${i};
void optionalMethod${i}(${type}? arg); undefined optionalMethod${i}(${type}? arg);
""").substitute(i=i, type=type) """).substitute(i=i, type=type)
interface += """ interface += """
}; };
@ -152,7 +152,7 @@ def WebIDLTest(parser, harness):
for invalid in invalidUnionTypes: for invalid in invalidUnionTypes:
interface = testPre + string.Template(""" interface = testPre + string.Template("""
interface TestUnion { interface TestUnion {
void method(${type} arg); undefined method(${type} arg);
}; };
""").substitute(type=invalid) """).substitute(type=invalid)

View file

@ -3,7 +3,7 @@ def WebIDLTest(parser, harness):
try: try:
parser.parse(""" parser.parse("""
interface AnyNotInUnion { interface AnyNotInUnion {
void foo((any or DOMString) arg); undefined foo((any or DOMString) arg);
}; };
""") """)

View file

@ -3,7 +3,7 @@ def WebIDLTest(parser, harness):
try: try:
parser.parse(""" parser.parse("""
interface OneNullableInUnion { interface OneNullableInUnion {
void foo((object? or DOMString?) arg); undefined foo((object? or DOMString?) arg);
}; };
""") """)
@ -20,7 +20,7 @@ def WebIDLTest(parser, harness):
try: try:
parser.parse(""" parser.parse("""
interface NullableInNullableUnion { 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 NullableInUnionNullableUnionHelper {
}; };
interface NullableInUnionNullableUnion { interface NullableInUnionNullableUnion {
void foo(((object? or DOMString) or NullableInUnionNullableUnionHelper)? arg); undefined foo(((object? or DOMString) or NullableInUnionNullableUnionHelper)? arg);
}; };
""") """)

View file

@ -3,7 +3,7 @@ def WebIDLTest(parser, harness):
try: try:
parser.parse(""" parser.parse("""
interface VariadicConstraints1 { interface VariadicConstraints1 {
void foo(byte... arg1, byte arg2); undefined foo(byte... arg1, byte arg2);
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -20,7 +20,7 @@ def WebIDLTest(parser, harness):
try: try:
parser.parse(""" parser.parse("""
interface VariadicConstraints2 { interface VariadicConstraints2 {
void foo(byte... arg1, optional byte arg2); undefined foo(byte... arg1, optional byte arg2);
}; };
""") """)
results = parser.finish(); results = parser.finish();
@ -36,7 +36,7 @@ def WebIDLTest(parser, harness):
try: try:
parser.parse(""" parser.parse("""
interface VariadicConstraints3 { interface VariadicConstraints3 {
void foo(optional byte... arg1); undefined foo(optional byte... arg1);
}; };
""") """)
results = parser.finish() results = parser.finish()
@ -53,7 +53,7 @@ def WebIDLTest(parser, harness):
try: try:
parser.parse(""" parser.parse("""
interface VariadicConstraints4 { interface VariadicConstraints4 {
void foo(byte... arg1 = 0); undefined foo(byte... arg1 = 0);
}; };
""") """)
results = parser.finish() results = parser.finish()

View file

@ -9,7 +9,7 @@
[NoInterfaceObject, Exposed=Window] [NoInterfaceObject, Exposed=Window]
interface ANGLEInstancedArrays { interface ANGLEInstancedArrays {
const GLenum VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE = 0x88FE; const GLenum VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE = 0x88FE;
void drawArraysInstancedANGLE(GLenum mode, GLint first, GLsizei count, GLsizei primcount); undefined drawArraysInstancedANGLE(GLenum mode, GLint first, GLsizei count, GLsizei primcount);
void drawElementsInstancedANGLE(GLenum mode, GLsizei count, GLenum type, GLintptr offset, GLsizei primcount); undefined drawElementsInstancedANGLE(GLenum mode, GLsizei count, GLenum type, GLintptr offset, GLsizei primcount);
void vertexAttribDivisorANGLE(GLuint index, GLuint divisor); undefined vertexAttribDivisorANGLE(GLuint index, GLuint divisor);
}; };

View file

@ -8,8 +8,8 @@
[Exposed=(Window,Worker)] [Exposed=(Window,Worker)]
interface mixin ActivatableElement { interface mixin ActivatableElement {
[Throws, Pref="dom.testing.element.activation.enabled"] [Throws, Pref="dom.testing.element.activation.enabled"]
void enterFormalActivationState(); undefined enterFormalActivationState();
[Throws, Pref="dom.testing.element.activation.enabled"] [Throws, Pref="dom.testing.element.activation.enabled"]
void exitFormalActivationState(); undefined exitFormalActivationState();
}; };

View file

@ -16,10 +16,10 @@ dictionary AnalyserOptions : AudioNodeOptions {
[Exposed=Window] [Exposed=Window]
interface AnalyserNode : AudioNode { interface AnalyserNode : AudioNode {
[Throws] constructor(BaseAudioContext context, optional AnalyserOptions options = {}); [Throws] constructor(BaseAudioContext context, optional AnalyserOptions options = {});
void getFloatFrequencyData (Float32Array array); undefined getFloatFrequencyData (Float32Array array);
void getByteFrequencyData (Uint8Array array); undefined getByteFrequencyData (Uint8Array array);
void getFloatTimeDomainData (Float32Array array); undefined getFloatTimeDomainData (Float32Array array);
void getByteTimeDomainData (Uint8Array array); undefined getByteTimeDomainData (Uint8Array array);
[SetterThrows] attribute unsigned long fftSize; [SetterThrows] attribute unsigned long fftSize;
readonly attribute unsigned long frequencyBinCount; readonly attribute unsigned long frequencyBinCount;
[SetterThrows] attribute double minDecibels; [SetterThrows] attribute double minDecibels;

View file

@ -20,10 +20,10 @@ interface AudioBuffer {
readonly attribute double duration; readonly attribute double duration;
readonly attribute unsigned long numberOfChannels; readonly attribute unsigned long numberOfChannels;
[Throws] Float32Array getChannelData(unsigned long channel); [Throws] Float32Array getChannelData(unsigned long channel);
[Throws] void copyFromChannel(Float32Array destination, [Throws] undefined copyFromChannel(Float32Array destination,
unsigned long channelNumber, unsigned long channelNumber,
optional unsigned long startInChannel = 0); optional unsigned long startInChannel = 0);
[Throws] void copyToChannel(Float32Array source, [Throws] undefined copyToChannel(Float32Array source,
unsigned long channelNumber, unsigned long channelNumber,
optional unsigned long startInChannel = 0); optional unsigned long startInChannel = 0);
}; };

View file

@ -24,7 +24,7 @@ interface AudioBufferSourceNode : AudioScheduledSourceNode {
attribute boolean loop; attribute boolean loop;
attribute double loopStart; attribute double loopStart;
attribute double loopEnd; attribute double loopEnd;
[Throws] void start(optional double when = 0, [Throws] undefined start(optional double when = 0,
optional double offset, optional double offset,
optional double duration); optional double duration);
}; };

View file

@ -30,8 +30,8 @@ interface AudioContext : BaseAudioContext {
AudioTimestamp getOutputTimestamp(); AudioTimestamp getOutputTimestamp();
Promise<void> suspend(); Promise<undefined> suspend();
Promise<void> close(); Promise<undefined> close();
[Throws] MediaElementAudioSourceNode createMediaElementSource(HTMLMediaElement mediaElement); [Throws] MediaElementAudioSourceNode createMediaElementSource(HTMLMediaElement mediaElement);
[Throws] MediaStreamAudioSourceNode createMediaStreamSource(MediaStream mediaStream); [Throws] MediaStreamAudioSourceNode createMediaStreamSource(MediaStream mediaStream);

View file

@ -30,24 +30,24 @@ interface AudioNode : EventTarget {
optional unsigned long output = 0, optional unsigned long output = 0,
optional unsigned long input = 0); optional unsigned long input = 0);
[Throws] [Throws]
void connect(AudioParam destinationParam, undefined connect(AudioParam destinationParam,
optional unsigned long output = 0); optional unsigned long output = 0);
[Throws] [Throws]
void disconnect(); undefined disconnect();
[Throws] [Throws]
void disconnect(unsigned long output); undefined disconnect(unsigned long output);
[Throws] [Throws]
void disconnect(AudioNode destination); undefined disconnect(AudioNode destination);
[Throws] [Throws]
void disconnect(AudioNode destination, unsigned long output); undefined disconnect(AudioNode destination, unsigned long output);
[Throws] [Throws]
void disconnect(AudioNode destination, undefined disconnect(AudioNode destination,
unsigned long output, unsigned long output,
unsigned long input); unsigned long input);
[Throws] [Throws]
void disconnect(AudioParam destination); undefined disconnect(AudioParam destination);
[Throws] [Throws]
void disconnect(AudioParam destination, unsigned long output); undefined disconnect(AudioParam destination, unsigned long output);
readonly attribute BaseAudioContext context; readonly attribute BaseAudioContext context;
readonly attribute unsigned long numberOfInputs; readonly attribute unsigned long numberOfInputs;

View file

@ -9,6 +9,6 @@
[Exposed=Window] [Exposed=Window]
interface AudioScheduledSourceNode : AudioNode { interface AudioScheduledSourceNode : AudioNode {
attribute EventHandler onended; attribute EventHandler onended;
[Throws] void start(optional double when = 0); [Throws] undefined start(optional double when = 0);
[Throws] void stop(optional double when = 0); [Throws] undefined stop(optional double when = 0);
}; };

View file

@ -12,8 +12,8 @@ enum AudioContextState {
"closed" "closed"
}; };
callback DecodeErrorCallback = void (DOMException error); callback DecodeErrorCallback = undefined (DOMException error);
callback DecodeSuccessCallback = void (AudioBuffer decodedData); callback DecodeSuccessCallback = undefined (AudioBuffer decodedData);
[Exposed=Window] [Exposed=Window]
interface BaseAudioContext : EventTarget { interface BaseAudioContext : EventTarget {
@ -22,7 +22,7 @@ interface BaseAudioContext : EventTarget {
readonly attribute double currentTime; readonly attribute double currentTime;
readonly attribute AudioListener listener; readonly attribute AudioListener listener;
readonly attribute AudioContextState state; readonly attribute AudioContextState state;
Promise<void> resume(); Promise<undefined> resume();
attribute EventHandler onstatechange; attribute EventHandler onstatechange;
[Throws] AudioBuffer createBuffer(unsigned long numberOfChannels, [Throws] AudioBuffer createBuffer(unsigned long numberOfChannels,
unsigned long length, unsigned long length,

View file

@ -10,8 +10,8 @@ interface BluetoothDevice : EventTarget {
readonly attribute DOMString? name; readonly attribute DOMString? name;
readonly attribute BluetoothRemoteGATTServer? gatt; readonly attribute BluetoothRemoteGATTServer? gatt;
Promise<void> watchAdvertisements(); Promise<undefined> watchAdvertisements();
void unwatchAdvertisements(); undefined unwatchAdvertisements();
readonly attribute boolean watchingAdvertisements; readonly attribute boolean watchingAdvertisements;
}; };

View file

@ -16,7 +16,7 @@ interface BluetoothRemoteGATTCharacteristic : EventTarget {
getDescriptors(optional BluetoothDescriptorUUID descriptor); getDescriptors(optional BluetoothDescriptorUUID descriptor);
Promise<ByteString> readValue(); Promise<ByteString> readValue();
//Promise<DataView> readValue(); //Promise<DataView> readValue();
Promise<void> writeValue(BufferSource value); Promise<undefined> writeValue(BufferSource value);
Promise<BluetoothRemoteGATTCharacteristic> startNotifications(); Promise<BluetoothRemoteGATTCharacteristic> startNotifications();
Promise<BluetoothRemoteGATTCharacteristic> stopNotifications(); Promise<BluetoothRemoteGATTCharacteristic> stopNotifications();
}; };

View file

@ -12,5 +12,5 @@ interface BluetoothRemoteGATTDescriptor {
readonly attribute ByteString? value; readonly attribute ByteString? value;
Promise<ByteString> readValue(); Promise<ByteString> readValue();
//Promise<DataView> readValue(); //Promise<DataView> readValue();
Promise<void> writeValue(BufferSource value); Promise<undefined> writeValue(BufferSource value);
}; };

View file

@ -11,7 +11,7 @@ interface BluetoothRemoteGATTServer {
readonly attribute boolean connected; readonly attribute boolean connected;
Promise<BluetoothRemoteGATTServer> connect(); Promise<BluetoothRemoteGATTServer> connect();
[Throws] [Throws]
void disconnect(); undefined disconnect();
Promise<BluetoothRemoteGATTService> getPrimaryService(BluetoothServiceUUID service); Promise<BluetoothRemoteGATTService> getPrimaryService(BluetoothServiceUUID service);
Promise<sequence<BluetoothRemoteGATTService>> getPrimaryServices(optional BluetoothServiceUUID service); Promise<sequence<BluetoothRemoteGATTService>> getPrimaryServices(optional BluetoothServiceUUID service);
}; };

View file

@ -11,8 +11,8 @@ interface BroadcastChannel : EventTarget {
constructor(DOMString name); constructor(DOMString name);
readonly attribute DOMString name; readonly attribute DOMString name;
[Throws] void postMessage(any message); [Throws] undefined postMessage(any message);
void close(); undefined close();
attribute EventHandler onmessage; attribute EventHandler onmessage;
attribute EventHandler onmessageerror; attribute EventHandler onmessageerror;
}; };

View file

@ -7,6 +7,6 @@
interface CSSGroupingRule : CSSRule { interface CSSGroupingRule : CSSRule {
[SameObject] readonly attribute CSSRuleList cssRules; [SameObject] readonly attribute CSSRuleList cssRules;
[Throws] unsigned long insertRule(DOMString rule, unsigned long index); [Throws] unsigned long insertRule(DOMString rule, unsigned long index);
[Throws] void deleteRule(unsigned long index); [Throws] undefined deleteRule(unsigned long index);
}; };

View file

@ -9,7 +9,7 @@ interface CSSKeyframesRule : CSSRule {
attribute DOMString name; attribute DOMString name;
readonly attribute CSSRuleList cssRules; readonly attribute CSSRuleList cssRules;
void appendRule(DOMString rule); undefined appendRule(DOMString rule);
void deleteRule(DOMString select); undefined deleteRule(DOMString select);
CSSKeyframeRule? findRule(DOMString select); CSSKeyframeRule? findRule(DOMString select);
}; };

View file

@ -17,7 +17,7 @@ interface CSSStyleDeclaration {
DOMString getPropertyValue(DOMString property); DOMString getPropertyValue(DOMString property);
DOMString getPropertyPriority(DOMString property); DOMString getPropertyPriority(DOMString property);
[CEReactions, Throws] [CEReactions, Throws]
void setProperty(DOMString property, [TreatNullAs=EmptyString] DOMString value, undefined setProperty(DOMString property, [TreatNullAs=EmptyString] DOMString value,
optional [TreatNullAs=EmptyString] DOMString priority = ""); optional [TreatNullAs=EmptyString] DOMString priority = "");
[CEReactions, Throws] [CEReactions, Throws]
DOMString removeProperty(DOMString property); DOMString removeProperty(DOMString property);

View file

@ -8,5 +8,5 @@ interface CSSStyleSheet : StyleSheet {
// readonly attribute CSSRule? ownerRule; // readonly attribute CSSRule? ownerRule;
[Throws, SameObject] readonly attribute CSSRuleList cssRules; [Throws, SameObject] readonly attribute CSSRuleList cssRules;
[Throws] unsigned long insertRule(DOMString rule, optional unsigned long index = 0); [Throws] unsigned long insertRule(DOMString rule, optional unsigned long index = 0);
[Throws] void deleteRule(unsigned long index); [Throws] undefined deleteRule(unsigned long index);
}; };

View file

@ -7,7 +7,7 @@
interface CanvasGradient { interface CanvasGradient {
// opaque object // opaque object
[Throws] [Throws]
void addColorStop(double offset, DOMString color); undefined addColorStop(double offset, DOMString color);
}; };

View file

@ -42,17 +42,17 @@ CanvasRenderingContext2D includes CanvasPath;
[Exposed=(PaintWorklet, Window, Worker)] [Exposed=(PaintWorklet, Window, Worker)]
interface mixin CanvasState { interface mixin CanvasState {
// state // state
void save(); // push state on state stack undefined save(); // push state on state stack
void restore(); // pop state stack and restore state undefined restore(); // pop state stack and restore state
}; };
[Exposed=(PaintWorklet, Window, Worker)] [Exposed=(PaintWorklet, Window, Worker)]
interface mixin CanvasTransform { interface mixin CanvasTransform {
// transformations (default transform is the identity matrix) // transformations (default transform is the identity matrix)
void scale(unrestricted double x, unrestricted double y); undefined scale(unrestricted double x, unrestricted double y);
void rotate(unrestricted double angle); undefined rotate(unrestricted double angle);
void translate(unrestricted double x, unrestricted double y); undefined translate(unrestricted double x, unrestricted double y);
void transform(unrestricted double a, undefined transform(unrestricted double a,
unrestricted double b, unrestricted double b,
unrestricted double c, unrestricted double c,
unrestricted double d, unrestricted double d,
@ -60,14 +60,14 @@ interface mixin CanvasTransform {
unrestricted double f); unrestricted double f);
[NewObject] DOMMatrix getTransform(); [NewObject] DOMMatrix getTransform();
void setTransform(unrestricted double a, undefined setTransform(unrestricted double a,
unrestricted double b, unrestricted double b,
unrestricted double c, unrestricted double c,
unrestricted double d, unrestricted double d,
unrestricted double e, unrestricted double e,
unrestricted double f); unrestricted double f);
// void setTransform(optional DOMMatrixInit matrix); // void setTransform(optional DOMMatrixInit matrix);
void resetTransform(); undefined resetTransform();
}; };
[Exposed=(PaintWorklet, Window, Worker)] [Exposed=(PaintWorklet, Window, Worker)]
@ -114,20 +114,20 @@ interface mixin CanvasFilters {
[Exposed=(PaintWorklet, Window, Worker)] [Exposed=(PaintWorklet, Window, Worker)]
interface mixin CanvasRect { interface mixin CanvasRect {
// rects // rects
void clearRect(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);
void fillRect(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);
void strokeRect(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)] [Exposed=(PaintWorklet, Window, Worker)]
interface mixin CanvasDrawPath { interface mixin CanvasDrawPath {
// path API (see also CanvasPath) // path API (see also CanvasPath)
void beginPath(); undefined beginPath();
void fill(optional CanvasFillRule fillRule = "nonzero"); undefined fill(optional CanvasFillRule fillRule = "nonzero");
//void fill(Path2D path, optional CanvasFillRule fillRule = "nonzero"); //void fill(Path2D path, optional CanvasFillRule fillRule = "nonzero");
void stroke(); undefined stroke();
//void stroke(Path2D path); //void stroke(Path2D path);
void clip(optional CanvasFillRule fillRule = "nonzero"); undefined clip(optional CanvasFillRule fillRule = "nonzero");
//void clip(Path2D path, optional CanvasFillRule fillRule = "nonzero"); //void clip(Path2D path, optional CanvasFillRule fillRule = "nonzero");
boolean isPointInPath(unrestricted double x, unrestricted double y, boolean isPointInPath(unrestricted double x, unrestricted double y,
optional CanvasFillRule fillRule = "nonzero"); optional CanvasFillRule fillRule = "nonzero");
@ -149,7 +149,7 @@ interface mixin CanvasUserInterface {
interface mixin CanvasText { interface mixin CanvasText {
// text (see also the CanvasPathDrawingStyles and CanvasTextDrawingStyles interfaces) // text (see also the CanvasPathDrawingStyles and CanvasTextDrawingStyles interfaces)
[Pref="dom.canvas_text.enabled"] [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); optional unrestricted double maxWidth);
//void strokeText(DOMString text, unrestricted double x, unrestricted double y, //void strokeText(DOMString text, unrestricted double x, unrestricted double y,
// optional unrestricted double maxWidth); // optional unrestricted double maxWidth);
@ -161,12 +161,12 @@ interface mixin CanvasText {
interface mixin CanvasDrawImage { interface mixin CanvasDrawImage {
// drawing images // drawing images
[Throws] [Throws]
void drawImage(CanvasImageSource image, unrestricted double dx, unrestricted double dy); undefined drawImage(CanvasImageSource image, unrestricted double dx, unrestricted double dy);
[Throws] [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); unrestricted double dw, unrestricted double dh);
[Throws] [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 sw, unrestricted double sh,
unrestricted double dx, unrestricted double dy, unrestricted double dx, unrestricted double dy,
unrestricted double dw, unrestricted double dh); unrestricted double dw, unrestricted double dh);
@ -181,8 +181,8 @@ interface mixin CanvasImageData {
ImageData createImageData(ImageData imagedata); ImageData createImageData(ImageData imagedata);
[Throws] [Throws]
ImageData getImageData(long sx, long sy, long sw, long sh); ImageData getImageData(long sx, long sy, long sw, long sh);
void putImageData(ImageData imagedata, long dx, long dy); undefined putImageData(ImageData imagedata, long dx, long dy);
void putImageData(ImageData imagedata, undefined putImageData(ImageData imagedata,
long dx, long dy, long dx, long dy,
long dirtyX, long dirtyY, long dirtyX, long dirtyY,
long dirtyWidth, long dirtyHeight); long dirtyWidth, long dirtyHeight);
@ -221,13 +221,13 @@ interface mixin CanvasTextDrawingStyles {
[Exposed=(PaintWorklet, Window, Worker)] [Exposed=(PaintWorklet, Window, Worker)]
interface mixin CanvasPath { interface mixin CanvasPath {
// shared path API methods // shared path API methods
void closePath(); undefined closePath();
void moveTo(unrestricted double x, unrestricted double y); undefined moveTo(unrestricted double x, unrestricted double y);
void lineTo(unrestricted double x, unrestricted double y); undefined lineTo(unrestricted double x, unrestricted double y);
void quadraticCurveTo(unrestricted double cpx, unrestricted double cpy, undefined quadraticCurveTo(unrestricted double cpx, unrestricted double cpy,
unrestricted double x, unrestricted double y); unrestricted double x, unrestricted double y);
void bezierCurveTo(unrestricted double cp1x, undefined bezierCurveTo(unrestricted double cp1x,
unrestricted double cp1y, unrestricted double cp1y,
unrestricted double cp2x, unrestricted double cp2x,
unrestricted double cp2y, unrestricted double cp2y,
@ -235,18 +235,18 @@ interface mixin CanvasPath {
unrestricted double y); unrestricted double y);
[Throws] [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 x2, unrestricted double y2,
unrestricted double radius); 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] [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); unrestricted double startAngle, unrestricted double endAngle, optional boolean anticlockwise = false);
[Throws] [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 radius_y, unrestricted double rotation, unrestricted double startAngle,
unrestricted double endAngle, optional boolean anticlockwise = false); unrestricted double endAngle, optional boolean anticlockwise = false);
}; };

View file

@ -15,13 +15,13 @@ interface CharacterData : Node {
[Pure] readonly attribute unsigned long length; [Pure] readonly attribute unsigned long length;
[Pure, Throws] [Pure, Throws]
DOMString substringData(unsigned long offset, unsigned long count); DOMString substringData(unsigned long offset, unsigned long count);
void appendData(DOMString data); undefined appendData(DOMString data);
[Throws] [Throws]
void insertData(unsigned long offset, DOMString data); undefined insertData(unsigned long offset, DOMString data);
[Throws] [Throws]
void deleteData(unsigned long offset, unsigned long count); undefined deleteData(unsigned long offset, unsigned long count);
[Throws] [Throws]
void replaceData(unsigned long offset, unsigned long count, DOMString data); undefined replaceData(unsigned long offset, unsigned long count, DOMString data);
}; };
CharacterData includes ChildNode; CharacterData includes ChildNode;

View file

@ -8,13 +8,13 @@
interface mixin ChildNode { interface mixin ChildNode {
[Throws, CEReactions, Unscopable] [Throws, CEReactions, Unscopable]
void before((Node or DOMString)... nodes); undefined before((Node or DOMString)... nodes);
[Throws, CEReactions, Unscopable] [Throws, CEReactions, Unscopable]
void after((Node or DOMString)... nodes); undefined after((Node or DOMString)... nodes);
[Throws, CEReactions, Unscopable] [Throws, CEReactions, Unscopable]
void replaceWith((Node or DOMString)... nodes); undefined replaceWith((Node or DOMString)... nodes);
[CEReactions, Unscopable] [CEReactions, Unscopable]
void remove(); undefined remove();
}; };
interface mixin NonDocumentTypeChildNode { interface mixin NonDocumentTypeChildNode {

View file

@ -9,20 +9,20 @@
ProtoObjectHack] ProtoObjectHack]
namespace console { namespace console {
// Logging // Logging
void log(DOMString... messages); undefined log(DOMString... messages);
void debug(DOMString... messages); undefined debug(DOMString... messages);
void info(DOMString... messages); undefined info(DOMString... messages);
void warn(DOMString... messages); undefined warn(DOMString... messages);
void error(DOMString... messages); undefined error(DOMString... messages);
void assert(boolean condition, optional DOMString message); undefined assert(boolean condition, optional DOMString message);
void clear(); undefined clear();
// Grouping // Grouping
void group(DOMString... data); undefined group(DOMString... data);
void groupCollapsed(DOMString... data); undefined groupCollapsed(DOMString... data);
void groupEnd(); undefined groupEnd();
// Timing // Timing
void time(DOMString message); undefined time(DOMString message);
void timeEnd(DOMString message); undefined timeEnd(DOMString message);
}; };

View file

@ -6,13 +6,17 @@
[Exposed=Window, Pref="dom.custom_elements.enabled"] [Exposed=Window, Pref="dom.custom_elements.enabled"]
interface CustomElementRegistry { interface CustomElementRegistry {
[Throws, CEReactions] [Throws, CEReactions]
void define(DOMString name, CustomElementConstructor constructor_, optional ElementDefinitionOptions options = {}); undefined define(
DOMString name,
CustomElementConstructor constructor_,
optional ElementDefinitionOptions options = {}
);
any get(DOMString name); any get(DOMString name);
Promise<CustomElementConstructor> whenDefined(DOMString name); Promise<CustomElementConstructor> whenDefined(DOMString name);
[CEReactions] void upgrade(Node root); [CEReactions] undefined upgrade(Node root);
}; };
callback CustomElementConstructor = HTMLElement(); callback CustomElementConstructor = HTMLElement();

View file

@ -18,7 +18,7 @@ interface CustomEvent : Event {
[Throws] constructor(DOMString type, optional CustomEventInit eventInitDict = {}); [Throws] constructor(DOMString type, optional CustomEventInit eventInitDict = {});
readonly attribute any detail; 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 { dictionary CustomEventInit : EventInit {

View file

@ -7,7 +7,7 @@
interface DOMStringMap { interface DOMStringMap {
getter DOMString (DOMString name); getter DOMString (DOMString name);
[CEReactions, Throws] [CEReactions, Throws]
setter void (DOMString name, DOMString value); setter undefined (DOMString name, DOMString value);
[CEReactions] [CEReactions]
deleter void (DOMString name); deleter undefined (DOMString name);
}; };

View file

@ -13,9 +13,9 @@ interface DOMTokenList {
[Pure] [Pure]
boolean contains(DOMString token); boolean contains(DOMString token);
[CEReactions, Throws] [CEReactions, Throws]
void add(DOMString... tokens); undefined add(DOMString... tokens);
[CEReactions, Throws] [CEReactions, Throws]
void remove(DOMString... tokens); undefined remove(DOMString... tokens);
[CEReactions, Throws] [CEReactions, Throws]
boolean toggle(DOMString token, optional boolean force); boolean toggle(DOMString token, optional boolean force);
[CEReactions, Throws] [CEReactions, Throws]

View file

@ -5,9 +5,9 @@
// https://html.spec.whatwg.org/multipage/#dedicatedworkerglobalscope // https://html.spec.whatwg.org/multipage/#dedicatedworkerglobalscope
[Global=(Worker,DedicatedWorker), Exposed=DedicatedWorker] [Global=(Worker,DedicatedWorker), Exposed=DedicatedWorker]
/*sealed*/ interface DedicatedWorkerGlobalScope : WorkerGlobalScope { /*sealed*/ interface DedicatedWorkerGlobalScope : WorkerGlobalScope {
[Throws] void postMessage(any message, sequence<object> transfer); [Throws] undefined postMessage(any message, sequence<object> transfer);
[Throws] void postMessage(any message, optional PostMessageOptions options = {}); [Throws] undefined postMessage(any message, optional PostMessageOptions options = {});
attribute EventHandler onmessage; attribute EventHandler onmessage;
void close(); undefined close();
}; };

View file

@ -17,9 +17,9 @@
[Exposed=(Window,DissimilarOriginWindow), Unforgeable, NoInterfaceObject] [Exposed=(Window,DissimilarOriginWindow), Unforgeable, NoInterfaceObject]
interface DissimilarOriginLocation { interface DissimilarOriginLocation {
[Throws] attribute USVString href; [Throws] attribute USVString href;
[Throws] void assign(USVString url); [Throws] undefined assign(USVString url);
[Throws] void replace(USVString url); [Throws] undefined replace(USVString url);
[Throws] void reload(); [Throws] undefined reload();
[Throws] stringifier; [Throws] stringifier;
// TODO: finish this interface // TODO: finish this interface

View file

@ -23,11 +23,11 @@ interface DissimilarOriginWindow : GlobalScope {
[Replaceable] readonly attribute unsigned long length; [Replaceable] readonly attribute unsigned long length;
[Unforgeable] readonly attribute DissimilarOriginLocation location; [Unforgeable] readonly attribute DissimilarOriginLocation location;
void close(); undefined close();
readonly attribute boolean closed; readonly attribute boolean closed;
[Throws] void postMessage(any message, USVString targetOrigin, optional sequence<object> transfer = []); [Throws] undefined postMessage(any message, USVString targetOrigin, optional sequence<object> transfer = []);
[Throws] void postMessage(any message, optional WindowPostMessageOptions options = {}); [Throws] undefined postMessage(any message, optional WindowPostMessageOptions options = {});
attribute any opener; attribute any opener;
void blur(); undefined blur();
void focus(); undefined focus();
}; };

View file

@ -126,11 +126,11 @@ partial /*sealed*/ interface Document {
[CEReactions, Throws] [CEReactions, Throws]
WindowProxy? open(USVString url, DOMString name, DOMString features); WindowProxy? open(USVString url, DOMString name, DOMString features);
[CEReactions, Throws] [CEReactions, Throws]
void close(); undefined close();
[CEReactions, Throws] [CEReactions, Throws]
void write(DOMString... text); undefined write(DOMString... text);
[CEReactions, Throws] [CEReactions, Throws]
void writeln(DOMString... text); undefined writeln(DOMString... text);
// user interaction // user interaction
readonly attribute Window?/*Proxy?*/ defaultView; readonly attribute Window?/*Proxy?*/ defaultView;
@ -179,9 +179,9 @@ partial interface Document {
[SameObject] [SameObject]
readonly attribute HTMLCollection applets; readonly attribute HTMLCollection applets;
void clear(); undefined clear();
void captureEvents(); undefined captureEvents();
void releaseEvents(); undefined releaseEvents();
// Tracking issue for document.all: https://github.com/servo/servo/issues/7396 // Tracking issue for document.all: https://github.com/servo/servo/issues/7396
// readonly attribute HTMLAllCollection all; // readonly attribute HTMLAllCollection all;
@ -193,7 +193,7 @@ partial interface Document {
[LenientSetter] readonly attribute Element? fullscreenElement; [LenientSetter] readonly attribute Element? fullscreenElement;
[LenientSetter] readonly attribute boolean fullscreen; // historical [LenientSetter] readonly attribute boolean fullscreen; // historical
Promise<void> exitFullscreen(); Promise<undefined> exitFullscreen();
attribute EventHandler onfullscreenchange; attribute EventHandler onfullscreenchange;
attribute EventHandler onfullscreenerror; attribute EventHandler onfullscreenerror;

View file

@ -44,13 +44,13 @@ interface Element : Node {
[CEReactions, Throws] [CEReactions, Throws]
boolean toggleAttribute(DOMString name, optional boolean force); boolean toggleAttribute(DOMString name, optional boolean force);
[CEReactions, Throws] [CEReactions, Throws]
void setAttribute(DOMString name, DOMString value); undefined setAttribute(DOMString name, DOMString value);
[CEReactions, Throws] [CEReactions, Throws]
void setAttributeNS(DOMString? namespace, DOMString name, DOMString value); undefined setAttributeNS(DOMString? namespace, DOMString name, DOMString value);
[CEReactions] [CEReactions]
void removeAttribute(DOMString name); undefined removeAttribute(DOMString name);
[CEReactions] [CEReactions]
void removeAttributeNS(DOMString? namespace, DOMString localName); undefined removeAttributeNS(DOMString? namespace, DOMString localName);
boolean hasAttribute(DOMString name); boolean hasAttribute(DOMString name);
boolean hasAttributeNS(DOMString? namespace, DOMString localName); boolean hasAttributeNS(DOMString? namespace, DOMString localName);
@ -79,9 +79,9 @@ interface Element : Node {
[CEReactions, Throws] [CEReactions, Throws]
Element? insertAdjacentElement(DOMString where_, Element element); // historical Element? insertAdjacentElement(DOMString where_, Element element); // historical
[Throws] [Throws]
void insertAdjacentText(DOMString where_, DOMString data); undefined insertAdjacentText(DOMString where_, DOMString data);
[CEReactions, Throws] [CEReactions, Throws]
void insertAdjacentHTML(DOMString position, DOMString html); undefined insertAdjacentHTML(DOMString position, DOMString html);
[Throws, Pref="dom.shadowdom.enabled"] ShadowRoot attachShadow(); [Throws, Pref="dom.shadowdom.enabled"] ShadowRoot attachShadow();
}; };
@ -92,13 +92,13 @@ partial interface Element {
[NewObject] [NewObject]
DOMRect getBoundingClientRect(); DOMRect getBoundingClientRect();
void scroll(optional ScrollToOptions options = {}); undefined scroll(optional ScrollToOptions options = {});
void scroll(unrestricted double x, unrestricted double y); undefined scroll(unrestricted double x, unrestricted double y);
void scrollTo(optional ScrollToOptions options = {}); undefined scrollTo(optional ScrollToOptions options = {});
void scrollTo(unrestricted double x, unrestricted double y); undefined scrollTo(unrestricted double x, unrestricted double y);
void scrollBy(optional ScrollToOptions options = {}); undefined scrollBy(optional ScrollToOptions options = {});
void scrollBy(unrestricted double x, unrestricted double y); undefined scrollBy(unrestricted double x, unrestricted double y);
attribute unrestricted double scrollTop; attribute unrestricted double scrollTop;
attribute unrestricted double scrollLeft; attribute unrestricted double scrollLeft;
readonly attribute long scrollWidth; readonly attribute long scrollWidth;
@ -120,7 +120,7 @@ partial interface Element {
// https://fullscreen.spec.whatwg.org/#api // https://fullscreen.spec.whatwg.org/#api
partial interface Element { partial interface Element {
Promise<void> requestFullscreen(); Promise<undefined> requestFullscreen();
}; };
Element includes ChildNode; Element includes ChildNode;

View file

@ -21,16 +21,16 @@ interface Event {
const unsigned short BUBBLING_PHASE = 3; const unsigned short BUBBLING_PHASE = 3;
readonly attribute unsigned short eventPhase; readonly attribute unsigned short eventPhase;
void stopPropagation(); undefined stopPropagation();
attribute boolean cancelBubble; attribute boolean cancelBubble;
void stopImmediatePropagation(); undefined stopImmediatePropagation();
[Pure] [Pure]
readonly attribute boolean bubbles; readonly attribute boolean bubbles;
[Pure] [Pure]
readonly attribute boolean cancelable; readonly attribute boolean cancelable;
attribute boolean returnValue; // historical attribute boolean returnValue; // historical
void preventDefault(); undefined preventDefault();
[Pure] [Pure]
readonly attribute boolean defaultPrevented; readonly attribute boolean defaultPrevented;
@ -39,7 +39,7 @@ interface Event {
[Constant] [Constant]
readonly attribute DOMHighResTimeStamp timeStamp; 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 { dictionary EventInit {

View file

@ -7,6 +7,6 @@
[Exposed=Window] [Exposed=Window]
callback interface EventListener { callback interface EventListener {
void handleEvent(Event event); undefined handleEvent(Event event);
}; };

View file

@ -22,7 +22,7 @@ interface EventSource : EventTarget {
attribute EventHandler onopen; attribute EventHandler onopen;
attribute EventHandler onmessage; attribute EventHandler onmessage;
attribute EventHandler onerror; attribute EventHandler onerror;
void close(); undefined close();
}; };
dictionary EventSourceInit { dictionary EventSourceInit {

View file

@ -8,13 +8,13 @@
[Exposed=(Window,Worker,Worklet,DissimilarOriginWindow)] [Exposed=(Window,Worker,Worklet,DissimilarOriginWindow)]
interface EventTarget { interface EventTarget {
[Throws] constructor(); [Throws] constructor();
void addEventListener( undefined addEventListener(
DOMString type, DOMString type,
EventListener? callback, EventListener? callback,
optional (AddEventListenerOptions or boolean) options = {} optional (AddEventListenerOptions or boolean) options = {}
); );
void removeEventListener( undefined removeEventListener(
DOMString type, DOMString type,
EventListener? callback, EventListener? callback,
optional (EventListenerOptions or boolean) options = {} optional (EventListenerOptions or boolean) options = {}

View file

@ -9,7 +9,7 @@
interface ExtendableEvent : Event { interface ExtendableEvent : Event {
[Throws] constructor(DOMString type, [Throws] constructor(DOMString type,
optional ExtendableEventInit eventInitDict = {}); optional ExtendableEventInit eventInitDict = {});
[Throws] void waitUntil(/*Promise<*/any/*>*/ f); [Throws] undefined waitUntil(/*Promise<*/any/*>*/ f);
}; };
dictionary ExtendableEventInit : EventInit { dictionary ExtendableEventInit : EventInit {

View file

@ -8,27 +8,27 @@
interface FakeXRDevice { interface FakeXRDevice {
// Sets the values to be used for subsequent // Sets the values to be used for subsequent
// requestAnimationFrame() callbacks. // requestAnimationFrame() callbacks.
[Throws] void setViews(sequence<FakeXRViewInit> views); [Throws] undefined setViews(sequence<FakeXRViewInit> views);
[Throws] void setViewerOrigin(FakeXRRigidTransformInit origin, optional boolean emulatedPosition = false); [Throws] undefined setViewerOrigin(FakeXRRigidTransformInit origin, optional boolean emulatedPosition = false);
void clearViewerOrigin(); undefined clearViewerOrigin();
[Throws] void setFloorOrigin(FakeXRRigidTransformInit origin); [Throws] undefined setFloorOrigin(FakeXRRigidTransformInit origin);
void clearFloorOrigin(); undefined clearFloorOrigin();
// // Simulates devices focusing and blurring sessions. // // Simulates devices focusing and blurring sessions.
void simulateVisibilityChange(XRVisibilityState state); undefined simulateVisibilityChange(XRVisibilityState state);
// void setBoundsGeometry(sequence<FakeXRBoundsPoint> boundsCoodinates); // void setBoundsGeometry(sequence<FakeXRBoundsPoint> boundsCoodinates);
[Throws] FakeXRInputController simulateInputSourceConnection(FakeXRInputSourceInit init); [Throws] FakeXRInputController simulateInputSourceConnection(FakeXRInputSourceInit init);
// behaves as if device was disconnected // behaves as if device was disconnected
Promise<void> disconnect(); Promise<undefined> disconnect();
// Hit test extensions: // Hit test extensions:
[Throws] void setWorld(FakeXRWorldInit world); [Throws] undefined setWorld(FakeXRWorldInit world);
void clearWorld(); undefined clearWorld();
}; };
// https://immersive-web.github.io/webxr/#dom-xrwebgllayer-getviewport // https://immersive-web.github.io/webxr/#dom-xrwebgllayer-getviewport

View file

@ -6,19 +6,22 @@
[Exposed=Window, Pref="dom.webxr.test"] [Exposed=Window, Pref="dom.webxr.test"]
interface FakeXRInputController { interface FakeXRInputController {
void setHandedness(XRHandedness handedness); undefined setHandedness(XRHandedness handedness);
void setTargetRayMode(XRTargetRayMode targetRayMode); undefined setTargetRayMode(XRTargetRayMode targetRayMode);
void setProfiles(sequence<DOMString> profiles); undefined setProfiles(sequence<DOMString> profiles);
[Throws] void setGripOrigin(FakeXRRigidTransformInit gripOrigin, optional boolean emulatedPosition = false); [Throws] undefined setGripOrigin(FakeXRRigidTransformInit gripOrigin, optional boolean emulatedPosition = false);
void clearGripOrigin(); undefined clearGripOrigin();
[Throws] void setPointerOrigin(FakeXRRigidTransformInit pointerOrigin, optional boolean emulatedPosition = false); [Throws] undefined setPointerOrigin(
FakeXRRigidTransformInit pointerOrigin,
optional boolean emulatedPosition = false
);
void disconnect(); undefined disconnect();
void reconnect(); undefined reconnect();
void startSelection(); undefined startSelection();
void endSelection(); undefined endSelection();
void simulateSelect(); undefined simulateSelect();
// void setSupportedButtons(sequence<FakeXRButtonStateInit> supportedButtons); // void setSupportedButtons(sequence<FakeXRButtonStateInit> supportedButtons);
// void updateButtonState(FakeXRButtonStateInit buttonState); // void updateButtonState(FakeXRButtonStateInit buttonState);

View file

@ -11,13 +11,13 @@ interface FileReader: EventTarget {
// async read methods // async read methods
[Throws] [Throws]
void readAsArrayBuffer(Blob blob); undefined readAsArrayBuffer(Blob blob);
[Throws] [Throws]
void readAsText(Blob blob, optional DOMString label); undefined readAsText(Blob blob, optional DOMString label);
[Throws] [Throws]
void readAsDataURL(Blob blob); undefined readAsDataURL(Blob blob);
void abort(); undefined abort();
// states // states
const unsigned short EMPTY = 0; const unsigned short EMPTY = 0;

View file

@ -11,13 +11,13 @@ typedef (File or USVString) FormDataEntryValue;
[Exposed=(Window,Worker)] [Exposed=(Window,Worker)]
interface FormData { interface FormData {
[Throws] constructor(optional HTMLFormElement form); [Throws] constructor(optional HTMLFormElement form);
void append(USVString name, USVString value); undefined append(USVString name, USVString value);
void append(USVString name, Blob value, optional USVString filename); undefined append(USVString name, Blob value, optional USVString filename);
void delete(USVString name); undefined delete(USVString name);
FormDataEntryValue? get(USVString name); FormDataEntryValue? get(USVString name);
sequence<FormDataEntryValue> getAll(USVString name); sequence<FormDataEntryValue> getAll(USVString name);
boolean has(USVString name); boolean has(USVString name);
void set(USVString name, USVString value); undefined set(USVString name, USVString value);
void set(USVString name, Blob value, optional USVString filename); undefined set(USVString name, Blob value, optional USVString filename);
iterable<USVString, FormDataEntryValue>; iterable<USVString, FormDataEntryValue>;
}; };

View file

@ -5,11 +5,11 @@
// https://gpuweb.github.io/gpuweb/#gpubuffer // https://gpuweb.github.io/gpuweb/#gpubuffer
[Exposed=(Window, DedicatedWorker), Serializable, Pref="dom.webgpu.enabled"] [Exposed=(Window, DedicatedWorker), Serializable, Pref="dom.webgpu.enabled"]
interface GPUBuffer { 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); [Throws] ArrayBuffer getMappedRange(optional GPUSize64 offset = 0, optional GPUSize64 size);
void unmap(); undefined unmap();
void destroy(); undefined destroy();
}; };
GPUBuffer includes GPUObjectBase; GPUBuffer includes GPUObjectBase;

View file

@ -8,24 +8,24 @@ interface GPUCommandEncoder {
GPURenderPassEncoder beginRenderPass(GPURenderPassDescriptor descriptor); GPURenderPassEncoder beginRenderPass(GPURenderPassDescriptor descriptor);
GPUComputePassEncoder beginComputePass(optional GPUComputePassDescriptor descriptor = {}); GPUComputePassEncoder beginComputePass(optional GPUComputePassDescriptor descriptor = {});
void copyBufferToBuffer( undefined copyBufferToBuffer(
GPUBuffer source, GPUBuffer source,
GPUSize64 sourceOffset, GPUSize64 sourceOffset,
GPUBuffer destination, GPUBuffer destination,
GPUSize64 destinationOffset, GPUSize64 destinationOffset,
GPUSize64 size); GPUSize64 size);
void copyBufferToTexture( undefined copyBufferToTexture(
GPUBufferCopyView source, GPUBufferCopyView source,
GPUTextureCopyView destination, GPUTextureCopyView destination,
GPUExtent3D copySize); GPUExtent3D copySize);
void copyTextureToBuffer( undefined copyTextureToBuffer(
GPUTextureCopyView source, GPUTextureCopyView source,
GPUBufferCopyView destination, GPUBufferCopyView destination,
GPUExtent3D copySize); GPUExtent3D copySize);
void copyTextureToTexture( undefined copyTextureToTexture(
GPUTextureCopyView source, GPUTextureCopyView source,
GPUTextureCopyView destination, GPUTextureCopyView destination,
GPUExtent3D copySize); GPUExtent3D copySize);

View file

@ -5,16 +5,16 @@
// https://gpuweb.github.io/gpuweb/#gpucomputepassencoder // https://gpuweb.github.io/gpuweb/#gpucomputepassencoder
[Exposed=(Window, DedicatedWorker), Serializable, Pref="dom.webgpu.enabled"] [Exposed=(Window, DedicatedWorker), Serializable, Pref="dom.webgpu.enabled"]
interface GPUComputePassEncoder { interface GPUComputePassEncoder {
void setPipeline(GPUComputePipeline pipeline); undefined setPipeline(GPUComputePipeline pipeline);
void dispatch(GPUSize32 x, optional GPUSize32 y = 1, optional GPUSize32 z = 1); undefined dispatch(GPUSize32 x, optional GPUSize32 y = 1, optional GPUSize32 z = 1);
void dispatchIndirect(GPUBuffer indirectBuffer, GPUSize64 indirectOffset); undefined dispatchIndirect(GPUBuffer indirectBuffer, GPUSize64 indirectOffset);
//void beginPipelineStatisticsQuery(GPUQuerySet querySet, GPUSize32 queryIndex); //void beginPipelineStatisticsQuery(GPUQuerySet querySet, GPUSize32 queryIndex);
//void endPipelineStatisticsQuery(); //void endPipelineStatisticsQuery();
//void writeTimestamp(GPUQuerySet querySet, GPUSize32 queryIndex); //void writeTimestamp(GPUQuerySet querySet, GPUSize32 queryIndex);
void endPass(); undefined endPass();
}; };
GPUComputePassEncoder includes GPUObjectBase; GPUComputePassEncoder includes GPUObjectBase;
GPUComputePassEncoder includes GPUProgrammablePassEncoder; GPUComputePassEncoder includes GPUProgrammablePassEncoder;

View file

@ -5,7 +5,7 @@
// https://gpuweb.github.io/gpuweb/#gpuprogrammablepassencoder // https://gpuweb.github.io/gpuweb/#gpuprogrammablepassencoder
[Exposed=(Window, DedicatedWorker)] [Exposed=(Window, DedicatedWorker)]
interface mixin GPUProgrammablePassEncoder { interface mixin GPUProgrammablePassEncoder {
void setBindGroup(GPUIndex32 index, GPUBindGroup bindGroup, undefined setBindGroup(GPUIndex32 index, GPUBindGroup bindGroup,
optional sequence<GPUBufferDynamicOffset> dynamicOffsets = []); optional sequence<GPUBufferDynamicOffset> dynamicOffsets = []);
// void setBindGroup(GPUIndex32 index, GPUBindGroup bindGroup, // void setBindGroup(GPUIndex32 index, GPUBindGroup bindGroup,

View file

@ -5,19 +5,19 @@
// https://gpuweb.github.io/gpuweb/#gpuqueue // https://gpuweb.github.io/gpuweb/#gpuqueue
[Exposed=(Window, DedicatedWorker), Serializable, Pref="dom.webgpu.enabled"] [Exposed=(Window, DedicatedWorker), Serializable, Pref="dom.webgpu.enabled"]
interface GPUQueue { interface GPUQueue {
void submit(sequence<GPUCommandBuffer> commandBuffers); undefined submit(sequence<GPUCommandBuffer> commandBuffers);
//GPUFence createFence(optional GPUFenceDescriptor descriptor = {}); //GPUFence createFence(optional GPUFenceDescriptor descriptor = {});
//void signal(GPUFence fence, GPUFenceValue signalValue); //void signal(GPUFence fence, GPUFenceValue signalValue);
[Throws] void writeBuffer( [Throws] undefined writeBuffer(
GPUBuffer buffer, GPUBuffer buffer,
GPUSize64 bufferOffset, GPUSize64 bufferOffset,
/*[AllowShared]*/ BufferSource data, /*[AllowShared]*/ BufferSource data,
optional GPUSize64 dataOffset = 0, optional GPUSize64 dataOffset = 0,
optional GPUSize64 size); optional GPUSize64 size);
[Throws] void writeTexture( [Throws] undefined writeTexture(
GPUTextureCopyView destination, GPUTextureCopyView destination,
/*[AllowShared]*/ BufferSource data, /*[AllowShared]*/ BufferSource data,
GPUTextureDataLayout dataLayout, GPUTextureDataLayout dataLayout,

View file

@ -5,20 +5,25 @@
// https://gpuweb.github.io/gpuweb/#gpurenderencoderbase // https://gpuweb.github.io/gpuweb/#gpurenderencoderbase
[Exposed=(Window, DedicatedWorker)] [Exposed=(Window, DedicatedWorker)]
interface mixin GPURenderEncoderBase { interface mixin GPURenderEncoderBase {
void setPipeline(GPURenderPipeline pipeline); undefined setPipeline(GPURenderPipeline pipeline);
void setIndexBuffer(GPUBuffer buffer, optional GPUSize64 offset = 0, optional GPUSize64 size = 0); undefined 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 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); 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 GPUSize32 firstIndex = 0,
optional GPUSignedOffset32 baseVertex = 0, optional GPUSignedOffset32 baseVertex = 0,
optional GPUSize32 firstInstance = 0); optional GPUSize32 firstInstance = 0);
void drawIndirect(GPUBuffer indirectBuffer, GPUSize64 indirectOffset); undefined drawIndirect(GPUBuffer indirectBuffer, GPUSize64 indirectOffset);
void drawIndexedIndirect(GPUBuffer indirectBuffer, GPUSize64 indirectOffset); undefined drawIndexedIndirect(GPUBuffer indirectBuffer, GPUSize64 indirectOffset);
}; };
typedef [EnforceRange] long GPUSignedOffset32; typedef [EnforceRange] long GPUSignedOffset32;

View file

@ -5,15 +5,15 @@
// https://gpuweb.github.io/gpuweb/#gpurenderpassencoder // https://gpuweb.github.io/gpuweb/#gpurenderpassencoder
[Exposed=(Window, DedicatedWorker), Pref="dom.webgpu.enabled"] [Exposed=(Window, DedicatedWorker), Pref="dom.webgpu.enabled"]
interface GPURenderPassEncoder { interface GPURenderPassEncoder {
void setViewport(float x, float y, undefined setViewport(float x, float y,
float width, float height, float width, float height,
float minDepth, float maxDepth); float minDepth, float maxDepth);
void setScissorRect(GPUIntegerCoordinate x, GPUIntegerCoordinate y, undefined setScissorRect(GPUIntegerCoordinate x, GPUIntegerCoordinate y,
GPUIntegerCoordinate width, GPUIntegerCoordinate height); GPUIntegerCoordinate width, GPUIntegerCoordinate height);
void setBlendColor(GPUColor color); undefined setBlendColor(GPUColor color);
void setStencilReference(GPUStencilValue reference); undefined setStencilReference(GPUStencilValue reference);
//void beginOcclusionQuery(GPUSize32 queryIndex); //void beginOcclusionQuery(GPUSize32 queryIndex);
//void endOcclusionQuery(); //void endOcclusionQuery();
@ -23,8 +23,8 @@ interface GPURenderPassEncoder {
//void writeTimestamp(GPUQuerySet querySet, GPUSize32 queryIndex); //void writeTimestamp(GPUQuerySet querySet, GPUSize32 queryIndex);
void executeBundles(sequence<GPURenderBundle> bundles); undefined executeBundles(sequence<GPURenderBundle> bundles);
void endPass(); undefined endPass();
}; };
GPURenderPassEncoder includes GPUObjectBase; GPURenderPassEncoder includes GPUObjectBase;
GPURenderPassEncoder includes GPUProgrammablePassEncoder; GPURenderPassEncoder includes GPUProgrammablePassEncoder;

View file

@ -7,7 +7,7 @@
interface GPUTexture { interface GPUTexture {
GPUTextureView createView(optional GPUTextureViewDescriptor descriptor = {}); GPUTextureView createView(optional GPUTextureViewDescriptor descriptor = {});
void destroy(); undefined destroy();
}; };
GPUTexture includes GPUObjectBase; GPUTexture includes GPUObjectBase;

View file

@ -17,6 +17,6 @@ enum GPUErrorFilter {
}; };
partial interface GPUDevice { partial interface GPUDevice {
void pushErrorScope(GPUErrorFilter filter); undefined pushErrorScope(GPUErrorFilter filter);
Promise<GPUError?> popErrorScope(); Promise<GPUError?> popErrorScope();
}; };

View file

@ -35,7 +35,7 @@ interface HTMLButtonElement : HTMLElement {
readonly attribute DOMString validationMessage; readonly attribute DOMString validationMessage;
boolean checkValidity(); boolean checkValidity();
boolean reportValidity(); boolean reportValidity();
void setCustomValidity(DOMString error); undefined setCustomValidity(DOMString error);
readonly attribute NodeList labels; readonly attribute NodeList labels;
}; };

View file

@ -15,5 +15,5 @@ interface HTMLDialogElement : HTMLElement {
// [CEReactions] // [CEReactions]
// void showModal(); // void showModal();
[CEReactions] [CEReactions]
void close(optional DOMString returnValue); undefined close(optional DOMString returnValue);
}; };

View file

@ -32,11 +32,11 @@ interface HTMLElement : Element {
// user interaction // user interaction
[CEReactions] [CEReactions]
attribute boolean hidden; attribute boolean hidden;
void click(); undefined click();
// [CEReactions] // [CEReactions]
// attribute long tabIndex; // attribute long tabIndex;
void focus(); undefined focus();
void blur(); undefined blur();
// [CEReactions] // [CEReactions]
// attribute DOMString accessKey; // attribute DOMString accessKey;
//readonly attribute DOMString accessKeyLabel; //readonly attribute DOMString accessKeyLabel;

View file

@ -22,5 +22,5 @@ interface HTMLFieldSetElement : HTMLElement {
readonly attribute DOMString validationMessage; readonly attribute DOMString validationMessage;
boolean checkValidity(); boolean checkValidity();
boolean reportValidity(); boolean reportValidity();
void setCustomValidity(DOMString error); undefined setCustomValidity(DOMString error);
}; };

View file

@ -34,10 +34,10 @@ interface HTMLFormElement : HTMLElement {
getter Element? (unsigned long index); getter Element? (unsigned long index);
getter (RadioNodeList or Element) (DOMString name); getter (RadioNodeList or Element) (DOMString name);
void submit(); undefined submit();
[Throws] void requestSubmit(optional HTMLElement? submitter = null); [Throws] undefined requestSubmit(optional HTMLElement? submitter = null);
[CEReactions] [CEReactions]
void reset(); undefined reset();
boolean checkValidity(); boolean checkValidity();
boolean reportValidity(); boolean reportValidity();
}; };

View file

@ -79,19 +79,19 @@ interface HTMLInputElement : HTMLElement {
// [CEReactions] // [CEReactions]
// attribute unsigned long width; // attribute unsigned long width;
[Throws] void stepUp(optional long n = 1); [Throws] undefined stepUp(optional long n = 1);
[Throws] void stepDown(optional long n = 1); [Throws] undefined stepDown(optional long n = 1);
readonly attribute boolean willValidate; readonly attribute boolean willValidate;
readonly attribute ValidityState validity; readonly attribute ValidityState validity;
readonly attribute DOMString validationMessage; readonly attribute DOMString validationMessage;
boolean checkValidity(); boolean checkValidity();
boolean reportValidity(); boolean reportValidity();
void setCustomValidity(DOMString error); undefined setCustomValidity(DOMString error);
readonly attribute NodeList? labels; readonly attribute NodeList? labels;
void select(); undefined select();
[SetterThrows] [SetterThrows]
attribute unsigned long? selectionStart; attribute unsigned long? selectionStart;
[SetterThrows] [SetterThrows]
@ -99,18 +99,18 @@ interface HTMLInputElement : HTMLElement {
[SetterThrows] [SetterThrows]
attribute DOMString? selectionDirection; attribute DOMString? selectionDirection;
[Throws] [Throws]
void setRangeText(DOMString replacement); undefined setRangeText(DOMString replacement);
[Throws] [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"); optional SelectionMode selectionMode = "preserve");
[Throws] [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 // also has obsolete members
// Select with file-system paths for testing purpose // Select with file-system paths for testing purpose
[Pref="dom.testing.htmlinputelement.select_files.enabled"] [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 // https://html.spec.whatwg.org/multipage/#HTMLInputElement-partial

View file

@ -24,7 +24,7 @@ interface HTMLMediaElement : HTMLElement {
readonly attribute unsigned short networkState; readonly attribute unsigned short networkState;
[CEReactions] attribute DOMString preload; [CEReactions] attribute DOMString preload;
readonly attribute TimeRanges buffered; readonly attribute TimeRanges buffered;
void load(); undefined load();
CanPlayTypeResult canPlayType(DOMString type); CanPlayTypeResult canPlayType(DOMString type);
// ready state // ready state
@ -38,7 +38,7 @@ interface HTMLMediaElement : HTMLElement {
// playback state // playback state
attribute double currentTime; attribute double currentTime;
void fastSeek(double time); undefined fastSeek(double time);
readonly attribute unrestricted double duration; readonly attribute unrestricted double duration;
// Date getStartDate(); // Date getStartDate();
readonly attribute boolean paused; readonly attribute boolean paused;
@ -49,8 +49,8 @@ interface HTMLMediaElement : HTMLElement {
readonly attribute boolean ended; readonly attribute boolean ended;
[CEReactions] attribute boolean autoplay; [CEReactions] attribute boolean autoplay;
[CEReactions] attribute boolean loop; [CEReactions] attribute boolean loop;
Promise<void> play(); Promise<undefined> play();
void pause(); undefined pause();
// controls // controls
[CEReactions] attribute boolean controls; [CEReactions] attribute boolean controls;

View file

@ -30,7 +30,7 @@ interface HTMLObjectElement : HTMLElement {
readonly attribute DOMString validationMessage; readonly attribute DOMString validationMessage;
boolean checkValidity(); boolean checkValidity();
boolean reportValidity(); boolean reportValidity();
void setCustomValidity(DOMString error); undefined setCustomValidity(DOMString error);
//legacycaller any (any... arguments); //legacycaller any (any... arguments);

View file

@ -9,10 +9,10 @@ interface HTMLOptionsCollection : HTMLCollection {
[CEReactions] [CEReactions]
attribute unsigned long length; // shadows inherited length attribute unsigned long length; // shadows inherited length
[CEReactions, Throws] [CEReactions, Throws]
setter void (unsigned long index, HTMLOptionElement? option); setter undefined (unsigned long index, HTMLOptionElement? option);
[CEReactions, Throws] [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] [CEReactions]
void remove(long index); undefined remove(long index);
attribute long selectedIndex; attribute long selectedIndex;
}; };

View file

@ -23,7 +23,7 @@ interface HTMLOutputElement : HTMLElement {
readonly attribute DOMString validationMessage; readonly attribute DOMString validationMessage;
boolean checkValidity(); boolean checkValidity();
boolean reportValidity(); boolean reportValidity();
void setCustomValidity(DOMString error); undefined setCustomValidity(DOMString error);
readonly attribute NodeList labels; readonly attribute NodeList labels;
}; };

View file

@ -30,12 +30,12 @@ interface HTMLSelectElement : HTMLElement {
HTMLOptionElement? namedItem(DOMString name); HTMLOptionElement? namedItem(DOMString name);
[CEReactions, Throws] [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] [CEReactions]
void remove(); // ChildNode overload undefined remove(); // ChildNode overload
[CEReactions] [CEReactions]
void remove(long index); undefined remove(long index);
[CEReactions, Throws] setter void (unsigned long index, HTMLOptionElement? option); [CEReactions, Throws] setter undefined (unsigned long index, HTMLOptionElement? option);
// readonly attribute HTMLCollection selectedOptions; // readonly attribute HTMLCollection selectedOptions;
attribute long selectedIndex; attribute long selectedIndex;
@ -46,7 +46,7 @@ interface HTMLSelectElement : HTMLElement {
readonly attribute DOMString validationMessage; readonly attribute DOMString validationMessage;
boolean checkValidity(); boolean checkValidity();
boolean reportValidity(); boolean reportValidity();
void setCustomValidity(DOMString error); undefined setCustomValidity(DOMString error);
readonly attribute NodeList labels; readonly attribute NodeList labels;
}; };

View file

@ -11,26 +11,26 @@ interface HTMLTableElement : HTMLElement {
attribute HTMLTableCaptionElement? caption; attribute HTMLTableCaptionElement? caption;
HTMLTableCaptionElement createCaption(); HTMLTableCaptionElement createCaption();
[CEReactions] [CEReactions]
void deleteCaption(); undefined deleteCaption();
[CEReactions, SetterThrows] [CEReactions, SetterThrows]
attribute HTMLTableSectionElement? tHead; attribute HTMLTableSectionElement? tHead;
HTMLTableSectionElement createTHead(); HTMLTableSectionElement createTHead();
[CEReactions] [CEReactions]
void deleteTHead(); undefined deleteTHead();
[CEReactions, SetterThrows] [CEReactions, SetterThrows]
attribute HTMLTableSectionElement? tFoot; attribute HTMLTableSectionElement? tFoot;
HTMLTableSectionElement createTFoot(); HTMLTableSectionElement createTFoot();
[CEReactions] [CEReactions]
void deleteTFoot(); undefined deleteTFoot();
readonly attribute HTMLCollection tBodies; readonly attribute HTMLCollection tBodies;
HTMLTableSectionElement createTBody(); HTMLTableSectionElement createTBody();
readonly attribute HTMLCollection rows; readonly attribute HTMLCollection rows;
[Throws] HTMLTableRowElement insertRow(optional long index = -1); [Throws] HTMLTableRowElement insertRow(optional long index = -1);
[CEReactions, Throws] void deleteRow(long index); [CEReactions, Throws] undefined deleteRow(long index);
// also has obsolete members // also has obsolete members
}; };

View file

@ -13,7 +13,7 @@ interface HTMLTableRowElement : HTMLElement {
[Throws] [Throws]
HTMLElement insertCell(optional long index = -1); HTMLElement insertCell(optional long index = -1);
[CEReactions, Throws] [CEReactions, Throws]
void deleteCell(long index); undefined deleteCell(long index);
// also has obsolete members // also has obsolete members
}; };

Some files were not shown because too many files have changed in this diff Show more