diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py index e126df000ae..82fcc4581d5 100644 --- a/components/script/dom/bindings/codegen/CodegenRust.py +++ b/components/script/dom/bindings/codegen/CodegenRust.py @@ -1722,11 +1722,11 @@ def DOMClassTypeId(desc): def DOMClass(descriptor): protoList = ['PrototypeList::ID::' + proto for proto in descriptor.prototypeChain] - # Pad out the list to the right length with ID::Count so we - # guarantee that all the lists are the same length. id::Count + # Pad out the list to the right length with ID::Last so we + # guarantee that all the lists are the same length. ID::Last # is never the ID of any prototype, so it's safe to use as # padding. - protoList.extend(['PrototypeList::ID::Count'] * (descriptor.config.maxProtoChainLength - len(protoList))) + protoList.extend(['PrototypeList::ID::Last'] * (descriptor.config.maxProtoChainLength - len(protoList))) prototypeChainString = ', '.join(protoList) heapSizeOf = 'heap_size_of_raw_self_and_children::<%s>' % descriptor.interface.identifier.name return """\ @@ -2355,9 +2355,11 @@ class CGCreateInterfaceObjectsMethod(CGAbstractMethod): properties should be a PropertyArrays instance. """ def __init__(self, descriptor, properties): - args = [Argument('*mut JSContext', 'cx'), Argument('HandleObject', 'global'), - Argument('HandleObject', 'receiver'), - Argument('MutableHandleObject', 'rval')] + args = [Argument('*mut JSContext', 'cx')] + if not descriptor.interface.isCallback(): + args += [Argument('HandleObject', 'global'), + Argument('*mut ProtoOrIfaceArray', 'cache')] + args.append(Argument('HandleObject', 'receiver')) CGAbstractMethod.__init__(self, descriptor, 'CreateInterfaceObjects', 'void', args, unsafe=True) self.properties = properties @@ -2395,14 +2397,19 @@ assert!(!prototype_proto.ptr.is_null());""" % getPrototypeProto)] properties[arrayName] = "None" code.append(CGGeneric(""" +let mut prototype = RootedObject::new(cx, ptr::null_mut()); create_interface_prototype_object(cx, prototype_proto.handle(), &PrototypeClass, %(methods)s, %(attrs)s, %(consts)s, - rval); -assert!(!rval.ptr.is_null());""" % properties)) + prototype.handle_mut()); +assert!(!prototype.ptr.is_null()); +(*cache)[PrototypeList::ID::%(id)s as usize] = prototype.ptr; +if <*mut JSObject>::needs_post_barrier(prototype.ptr) { + <*mut JSObject>::post_barrier((*cache).as_mut_ptr().offset(PrototypeList::ID::%(id)s as isize)); +}""" % properties)) if self.descriptor.interface.hasInterfaceObject(): properties["name"] = str_to_const_array(name) @@ -2412,10 +2419,18 @@ assert!(!rval.ptr.is_null());""" % properties)) else: properties["constructor"] = "throwing_constructor" properties["length"] = 0 - code.append(CGGeneric(""" -let interface_proto = RootedObject::new(cx, JS_GetFunctionPrototype(cx, global)); + if self.descriptor.interface.parent: + parentName = toBindingNamespace(self.descriptor.getParentName()) + code.append(CGGeneric(""" +let mut interface_proto = RootedObject::new(cx, ptr::null_mut()); +%s::GetConstructorObject(cx, global, receiver, interface_proto.handle_mut());""" % parentName)) + else: + code.append(CGGeneric(""" +let interface_proto = RootedObject::new(cx, JS_GetFunctionPrototype(cx, global));""")) + code.append(CGGeneric("""\ assert!(!interface_proto.ptr.is_null()); +let mut interface = RootedObject::new(cx, ptr::null_mut()); create_noncallback_interface_object(cx, receiver, interface_proto.handle(), @@ -2423,9 +2438,17 @@ create_noncallback_interface_object(cx, %(static_methods)s, %(static_attrs)s, %(consts)s, - rval.handle(), + prototype.handle(), %(name)s, - %(length)s);""" % properties)) + %(length)s, + interface.handle_mut()); +assert!(!interface.ptr.is_null());""" % properties)) + if self.descriptor.hasDescendants(): + code.append(CGGeneric("""\ +(*cache)[PrototypeList::Constructor::%(id)s as usize] = interface.ptr; +if <*mut JSObject>::needs_post_barrier(prototype.ptr) { + <*mut JSObject>::post_barrier((*cache).as_mut_ptr().offset(PrototypeList::Constructor::%(id)s as isize)); +}""" % properties)) constructors = self.descriptor.interface.namedConstructors if constructors: @@ -2438,7 +2461,7 @@ create_noncallback_interface_object(cx, specs.append(CGGeneric("(%s as NonNullJSNative, %s, %d)" % (hook, name, length))) values = CGIndenter(CGList(specs, "\n"), 4) code.append(CGWrapper(values, pre="%s = [\n" % decl, post="\n];")) - code.append(CGGeneric("create_named_constructors(cx, receiver, &named_constructors, rval.handle());")) + code.append(CGGeneric("create_named_constructors(cx, receiver, &named_constructors, prototype.handle());")) if self.descriptor.hasUnforgeableMembers: # We want to use the same JSClass and prototype as the object we'll @@ -2457,7 +2480,7 @@ create_noncallback_interface_object(cx, holderProto = "HandleObject::null()" else: holderClass = "&Class.base as *const js::jsapi::Class as *const JSClass" - holderProto = "rval.handle()" + holderProto = "prototype.handle()" code.append(CGGeneric(""" let mut unforgeable_holder = RootedObject::new(cx, ptr::null_mut()); unforgeable_holder.handle_mut().set( @@ -2466,7 +2489,7 @@ assert!(!unforgeable_holder.ptr.is_null()); """ % {'holderClass': holderClass, 'holderProto': holderProto})) code.append(InitUnforgeablePropertiesOnHolder(self.descriptor, self.properties)) code.append(CGGeneric("""\ -JS_SetReservedSlot(rval.get(), DOM_PROTO_UNFORGEABLE_HOLDER_SLOT, +JS_SetReservedSlot(prototype.ptr, DOM_PROTO_UNFORGEABLE_HOLDER_SLOT, ObjectValue(&*unforgeable_holder.ptr))""")) return CGList(code, "\n") @@ -2483,7 +2506,7 @@ class CGGetPerInterfaceObject(CGAbstractMethod): Argument('MutableHandleObject', 'rval')] CGAbstractMethod.__init__(self, descriptor, name, 'void', args, pub=pub, unsafe=True) - self.id = idPrefix + "ID::" + self.descriptor.name + self.id = idPrefix + "::" + self.descriptor.name def definition_body(self): return CGGeneric(""" @@ -2498,18 +2521,15 @@ assert!(((*JS_GetClass(global.get())).flags & JSCLASS_DOM_GLOBAL) != 0); /* Check to see whether the interface objects are already installed */ let proto_or_iface_array = get_proto_or_iface_array(global.get()); -rval.set((*proto_or_iface_array)[%s as usize]); +rval.set((*proto_or_iface_array)[%(id)s as usize]); if !rval.get().is_null() { return; } -CreateInterfaceObjects(cx, global, receiver, rval); +CreateInterfaceObjects(cx, global, proto_or_iface_array, receiver); +rval.set((*proto_or_iface_array)[%(id)s as usize]); assert!(!rval.get().is_null()); -(*proto_or_iface_array)[%s as usize] = rval.get(); -if <*mut JSObject>::needs_post_barrier(rval.get()) { - <*mut JSObject>::post_barrier((*proto_or_iface_array).as_mut_ptr().offset(%s as isize)) -} -""" % (self.id, self.id, self.id)) +""" % {"id": self.id}) class CGGetProtoObjectMethod(CGGetPerInterfaceObject): @@ -2518,7 +2538,7 @@ class CGGetProtoObjectMethod(CGGetPerInterfaceObject): """ def __init__(self, descriptor): CGGetPerInterfaceObject.__init__(self, descriptor, "GetProtoObject", - "PrototypeList::", pub=descriptor.hasDescendants()) + "PrototypeList::ID", pub=descriptor.hasDescendants()) def definition_body(self): return CGList([ @@ -2535,7 +2555,8 @@ class CGGetConstructorObjectMethod(CGGetPerInterfaceObject): """ def __init__(self, descriptor): CGGetPerInterfaceObject.__init__(self, descriptor, "GetConstructorObject", - "constructors::", pub=descriptor.hasDescendants()) + "PrototypeList::Constructor", + pub=descriptor.hasDescendants()) def definition_body(self): return CGList([ @@ -2623,10 +2644,7 @@ class CGDefineDOMInterfaceMethod(CGAbstractMethod): def definition_body(self): if self.descriptor.interface.isCallback(): - code = """\ -let mut obj = RootedObject::new(cx, ptr::null_mut()); -CreateInterfaceObjects(cx, global, global, obj.handle_mut()); -""" + code = "CreateInterfaceObjects(cx, global);" else: code = """\ let mut proto = RootedObject::new(cx, ptr::null_mut()); @@ -4845,10 +4863,8 @@ class CGDescriptor(CGThing): cgThings = [] if not descriptor.interface.isCallback(): cgThings.append(CGGetProtoObjectMethod(descriptor)) - if descriptor.interface.hasInterfaceObject(): - # https://github.com/mozilla/servo/issues/2665 - # cgThings.append(CGGetConstructorObjectMethod(descriptor)) - pass + if descriptor.interface.hasInterfaceObject() and descriptor.hasDescendants(): + cgThings.append(CGGetConstructorObjectMethod(descriptor)) for m in descriptor.interface.members: if (m.isMethod() and @@ -4961,22 +4977,12 @@ class CGDescriptor(CGThing): class CGNonNamespacedEnum(CGThing): - def __init__(self, enumName, names, values, comment="", deriving="", repr=""): + def __init__(self, enumName, names, first, comment="", deriving="", repr=""): + # Account for first value + entries = ["%s = %s" % (names[0], first)] + names[1:] - if not values: - values = [] - - # Account for explicit enum values. - entries = [] - for i in range(0, len(names)): - if len(values) > i and values[i] is not None: - entry = "%s = %s" % (names[i], values[i]) - else: - entry = names[i] - entries.append(entry) - - # Append a Count. - entries.append('Count = ' + str(len(entries))) + # Append a Last. + entries.append('Last = ' + str(first + len(entries))) # Indent. entries = [' ' + e for e in entries] @@ -5322,8 +5328,8 @@ class CGBindingRoot(CGThing): 'dom::bindings::reflector::{Reflectable}', 'dom::bindings::utils::{ConstantSpec, DOMClass, DOMJSClass}', 'dom::bindings::utils::{DOM_PROTO_UNFORGEABLE_HOLDER_SLOT, JSCLASS_DOM_GLOBAL}', - 'dom::bindings::utils::{NonNullJSNative, create_dom_global, finalize_global}', - 'dom::bindings::utils::{find_enum_string_index, generic_getter}', + 'dom::bindings::utils::{NonNullJSNative, ProtoOrIfaceArray, create_dom_global}', + 'dom::bindings::utils::{finalize_global, find_enum_string_index, generic_getter}', 'dom::bindings::utils::{generic_lenient_getter, generic_lenient_setter}', 'dom::bindings::utils::{generic_method, generic_setter, get_array_index_from_id}', 'dom::bindings::utils::{get_dictionary_property, get_property_on_prototype}', @@ -5975,23 +5981,28 @@ class GlobalGenRoots(): @staticmethod def PrototypeList(config): # Prototype ID enum. - protos = [d.name for d in config.getDescriptors(isCallback=False)] + interfaces = config.getDescriptors(isCallback=False) + protos = [d.name for d in interfaces] + constructors = [d.name for d in interfaces if d.hasDescendants()] proxies = [d.name for d in config.getDescriptors(proxy=True)] return CGList([ CGGeneric(AUTOGENERATED_WARNING_COMMENT), + CGGeneric("pub const PROTO_OR_IFACE_LENGTH: usize = %d;\n" % (len(protos) + len(constructors))), CGGeneric("pub const MAX_PROTO_CHAIN_LENGTH: usize = %d;\n\n" % config.maxProtoChainLength), - CGNonNamespacedEnum('ID', protos, [0], deriving="PartialEq, Copy, Clone", repr="u16"), + CGNonNamespacedEnum('ID', protos, 0, deriving="PartialEq, Copy, Clone", repr="u16"), + CGNonNamespacedEnum('Constructor', constructors, len(protos), + deriving="PartialEq, Copy, Clone", repr="u16"), CGWrapper(CGIndenter(CGList([CGGeneric('"' + name + '"') for name in protos], ",\n"), indentLevel=4), pre="static INTERFACES: [&'static str; %d] = [\n" % len(protos), post="\n];\n\n"), CGGeneric("pub fn proto_id_to_name(proto_id: u16) -> &'static str {\n" - " debug_assert!(proto_id < ID::Count as u16);\n" + " debug_assert!(proto_id < ID::Last as u16);\n" " INTERFACES[proto_id as usize]\n" "}\n\n"), - CGNonNamespacedEnum('Proxies', proxies, [0], deriving="PartialEq, Copy, Clone"), + CGNonNamespacedEnum('Proxies', proxies, 0, deriving="PartialEq, Copy, Clone"), ]) @staticmethod diff --git a/components/script/dom/bindings/interface.rs b/components/script/dom/bindings/interface.rs index 4066e5617cb..96f4d7c470a 100644 --- a/components/script/dom/bindings/interface.rs +++ b/components/script/dom/bindings/interface.rs @@ -144,20 +144,19 @@ pub unsafe fn create_noncallback_interface_object( constants: &'static [ConstantSpec], interface_prototype_object: HandleObject, name: &'static [u8], - length: u32) { - let mut interface_object = RootedObject::new(cx, ptr::null_mut()); + length: u32, + rval: MutableHandleObject) { create_object(cx, proto, &*(class as *const _ as *const JSClass), static_methods, static_properties, constants, - interface_object.handle_mut()); - assert!(JS_LinkConstructorAndPrototype(cx, interface_object.handle(), - interface_prototype_object)); - define_name(cx, interface_object.handle(), name); - define_length(cx, interface_object.handle(), length); - define_on_global_object(cx, receiver, name, interface_object.handle()); + rval); + assert!(JS_LinkConstructorAndPrototype(cx, rval.handle(), interface_prototype_object)); + define_name(cx, rval.handle(), name); + define_length(cx, rval.handle(), length); + define_on_global_object(cx, receiver, name, rval.handle()); } /// Create and define the named constructors of a non-callback interface. diff --git a/components/script/dom/bindings/utils.rs b/components/script/dom/bindings/utils.rs index 7815593355c..6534d5171cb 100644 --- a/components/script/dom/bindings/utils.rs +++ b/components/script/dom/bindings/utils.rs @@ -5,7 +5,7 @@ //! Various utilities to glue JavaScript and the DOM implementation together. use dom::bindings::codegen::PrototypeList; -use dom::bindings::codegen::PrototypeList::MAX_PROTO_CHAIN_LENGTH; +use dom::bindings::codegen::PrototypeList::{MAX_PROTO_CHAIN_LENGTH, PROTO_OR_IFACE_LENGTH}; use dom::bindings::conversions::{DOM_OBJECT_SLOT, is_dom_class}; use dom::bindings::conversions::{private_from_proto_check, root_from_handleobject}; use dom::bindings::error::throw_invalid_this; @@ -186,8 +186,8 @@ pub unsafe extern "C" fn throwing_constructor(cx: *mut JSContext, false } -/// An array of *mut JSObject of size PrototypeList::ID::Count -pub type ProtoOrIfaceArray = [*mut JSObject; PrototypeList::ID::Count as usize]; +/// An array of *mut JSObject of size PROTO_OR_IFACE_LENGTH. +pub type ProtoOrIfaceArray = [*mut JSObject; PROTO_OR_IFACE_LENGTH]; /// Gets the property `id` on `proxy`'s prototype. If it exists, `*found` is /// set to true and `*vp` to the value, otherwise `*found` is set to false. @@ -384,7 +384,7 @@ pub fn create_dom_global(cx: *mut JSContext, // avoid getting trace hooks called on a partially initialized object. JS_SetReservedSlot(obj.ptr, DOM_OBJECT_SLOT, PrivateValue(private)); let proto_array: Box = - box [0 as *mut JSObject; PrototypeList::ID::Count as usize]; + box [0 as *mut JSObject; PROTO_OR_IFACE_LENGTH]; JS_SetReservedSlot(obj.ptr, DOM_PROTOTYPE_SLOT, PrivateValue(Box::into_raw(proto_array) as *const libc::c_void)); @@ -400,7 +400,7 @@ pub fn create_dom_global(cx: *mut JSContext, pub unsafe fn finalize_global(obj: *mut JSObject) { let protolist = get_proto_or_iface_array(obj); let list = (*protolist).as_mut_ptr(); - for idx in 0..(PrototypeList::ID::Count as isize) { + for idx in 0..PROTO_OR_IFACE_LENGTH as isize { let entry = list.offset(idx); let value = *entry; if <*mut JSObject>::needs_post_barrier(value) { diff --git a/tests/wpt/metadata/FileAPI/idlharness.html.ini b/tests/wpt/metadata/FileAPI/idlharness.html.ini index 1e55a714eab..c91eb848d80 100644 --- a/tests/wpt/metadata/FileAPI/idlharness.html.ini +++ b/tests/wpt/metadata/FileAPI/idlharness.html.ini @@ -9,9 +9,6 @@ [URL interface: operation revokeObjectURL(DOMString)] expected: FAIL - [File interface: existence and properties of interface object] - expected: FAIL - [File interface object length] expected: FAIL @@ -63,9 +60,6 @@ [FileList interface: file_input.files must inherit property "length" with the proper type (1)] expected: FAIL - [FileReader interface: existence and properties of interface object] - expected: FAIL - [FileReaderSync interface: existence and properties of interface object] expected: FAIL diff --git a/tests/wpt/metadata/FileAPI/idlharness.worker.js.ini b/tests/wpt/metadata/FileAPI/idlharness.worker.js.ini index 2b429ddbdc5..33363991f7e 100644 --- a/tests/wpt/metadata/FileAPI/idlharness.worker.js.ini +++ b/tests/wpt/metadata/FileAPI/idlharness.worker.js.ini @@ -9,9 +9,6 @@ [URL interface: operation revokeObjectURL(DOMString)] expected: FAIL - [File interface: existence and properties of interface object] - expected: FAIL - [File interface object length] expected: FAIL @@ -48,9 +45,6 @@ [Blob interface: new File(["myFileBits"\], "myFileName") must inherit property "close" with the proper type (4)] expected: FAIL - [FileReader interface: existence and properties of interface object] - expected: FAIL - [FileReader interface: operation readAsArrayBuffer(Blob)] expected: FAIL diff --git a/tests/wpt/metadata/XMLHttpRequest/interfaces.html.ini b/tests/wpt/metadata/XMLHttpRequest/interfaces.html.ini deleted file mode 100644 index 48adbf303ae..00000000000 --- a/tests/wpt/metadata/XMLHttpRequest/interfaces.html.ini +++ /dev/null @@ -1,14 +0,0 @@ -[interfaces.html] - type: testharness - [ProgressEvent interface: existence and properties of interface object] - expected: FAIL - - [XMLHttpRequestEventTarget interface: existence and properties of interface object] - expected: FAIL - - [XMLHttpRequestUpload interface: existence and properties of interface object] - expected: FAIL - - [XMLHttpRequest interface: existence and properties of interface object] - expected: FAIL - diff --git a/tests/wpt/metadata/dom/interfaces.html.ini b/tests/wpt/metadata/dom/interfaces.html.ini index d6fde8eb167..0a7aab7b33b 100644 --- a/tests/wpt/metadata/dom/interfaces.html.ini +++ b/tests/wpt/metadata/dom/interfaces.html.ini @@ -1,8 +1,5 @@ [interfaces.html] type: testharness - [CustomEvent interface: existence and properties of interface object] - expected: FAIL - [MutationObserver interface: existence and properties of interface object] expected: FAIL @@ -63,12 +60,6 @@ [MutationRecord interface: attribute oldValue] expected: FAIL - [Node interface: existence and properties of interface object] - expected: FAIL - - [Document interface: existence and properties of interface object] - expected: FAIL - [Document interface: attribute origin] expected: FAIL @@ -96,9 +87,6 @@ [Document interface: calling queryAll(DOMString) on xmlDoc with too few arguments must throw TypeError] expected: FAIL - [DocumentFragment interface: existence and properties of interface object] - expected: FAIL - [DocumentFragment interface: operation query(DOMString)] expected: FAIL @@ -117,12 +105,6 @@ [DocumentFragment interface: calling queryAll(DOMString) on document.createDocumentFragment() with too few arguments must throw TypeError] expected: FAIL - [DocumentType interface: existence and properties of interface object] - expected: FAIL - - [Element interface: existence and properties of interface object] - expected: FAIL - [Element interface: operation hasAttributes()] expected: FAIL @@ -180,18 +162,6 @@ [NamedNodeMap interface: operation setNamedItemNS(Attr)] expected: FAIL - [CharacterData interface: existence and properties of interface object] - expected: FAIL - - [Text interface: existence and properties of interface object] - expected: FAIL - - [ProcessingInstruction interface: existence and properties of interface object] - expected: FAIL - - [Comment interface: existence and properties of interface object] - expected: FAIL - [Range interface: stringifier] expected: FAIL diff --git a/tests/wpt/metadata/html/dom/interfaces.html.ini b/tests/wpt/metadata/html/dom/interfaces.html.ini index 0a4948517a1..e1d488e362e 100644 --- a/tests/wpt/metadata/html/dom/interfaces.html.ini +++ b/tests/wpt/metadata/html/dom/interfaces.html.ini @@ -1362,9 +1362,6 @@ [HTMLCollection interface: calling namedItem(DOMString) on document.all with too few arguments must throw TypeError] expected: FAIL - [HTMLFormControlsCollection interface: existence and properties of interface object] - expected: FAIL - [HTMLFormControlsCollection interface: operation namedItem(DOMString)] expected: FAIL @@ -1554,9 +1551,6 @@ [Stringification of document.cssElementMap] expected: FAIL - [HTMLElement interface: existence and properties of interface object] - expected: FAIL - [HTMLElement interface: attribute translate] expected: FAIL @@ -2058,27 +2052,12 @@ [Element interface: calling queryAll(DOMString) on document.createElement("noscript") with too few arguments must throw TypeError] expected: FAIL - [HTMLUnknownElement interface: existence and properties of interface object] - expected: FAIL - - [HTMLHtmlElement interface: existence and properties of interface object] - expected: FAIL - [HTMLHtmlElement interface: attribute version] expected: FAIL [HTMLHtmlElement interface: document.createElement("html") must inherit property "version" with the proper type (0)] expected: FAIL - [HTMLHeadElement interface: existence and properties of interface object] - expected: FAIL - - [HTMLTitleElement interface: existence and properties of interface object] - expected: FAIL - - [HTMLBaseElement interface: existence and properties of interface object] - expected: FAIL - [HTMLBaseElement interface: attribute href] expected: FAIL @@ -2091,9 +2070,6 @@ [HTMLBaseElement interface: document.createElement("base") must inherit property "target" with the proper type (1)] expected: FAIL - [HTMLLinkElement interface: existence and properties of interface object] - expected: FAIL - [HTMLLinkElement interface: attribute crossOrigin] expected: FAIL @@ -2109,9 +2085,6 @@ [HTMLLinkElement interface: document.createElement("link") must inherit property "sheet" with the proper type (11)] expected: FAIL - [HTMLMetaElement interface: existence and properties of interface object] - expected: FAIL - [HTMLMetaElement interface: attribute httpEquiv] expected: FAIL @@ -2124,9 +2097,6 @@ [HTMLMetaElement interface: document.createElement("meta") must inherit property "scheme" with the proper type (3)] expected: FAIL - [HTMLStyleElement interface: existence and properties of interface object] - expected: FAIL - [HTMLStyleElement interface: attribute media] expected: FAIL @@ -2148,9 +2118,6 @@ [HTMLStyleElement interface: document.createElement("style") must inherit property "sheet" with the proper type (3)] expected: FAIL - [HTMLBodyElement interface: existence and properties of interface object] - expected: FAIL - [HTMLBodyElement interface: attribute link] expected: FAIL @@ -2235,9 +2202,6 @@ [HTMLBodyElement interface: document.createElement("body") must inherit property "onpopstate" with the proper type (16)] expected: FAIL - [HTMLHeadingElement interface: existence and properties of interface object] - expected: FAIL - [HTMLHeadingElement interface: attribute align] expected: FAIL @@ -2259,18 +2223,12 @@ [HTMLHeadingElement interface: document.createElement("h6") must inherit property "align" with the proper type (0)] expected: FAIL - [HTMLParagraphElement interface: existence and properties of interface object] - expected: FAIL - [HTMLParagraphElement interface: attribute align] expected: FAIL [HTMLParagraphElement interface: document.createElement("p") must inherit property "align" with the proper type (0)] expected: FAIL - [HTMLHRElement interface: existence and properties of interface object] - expected: FAIL - [HTMLHRElement interface: attribute align] expected: FAIL @@ -2289,9 +2247,6 @@ [HTMLHRElement interface: document.createElement("hr") must inherit property "size" with the proper type (3)] expected: FAIL - [HTMLPreElement interface: existence and properties of interface object] - expected: FAIL - [HTMLPreElement interface: attribute width] expected: FAIL @@ -2307,9 +2262,6 @@ [HTMLPreElement interface: document.createElement("xmp") must inherit property "width" with the proper type (0)] expected: FAIL - [HTMLQuoteElement interface: existence and properties of interface object] - expected: FAIL - [HTMLQuoteElement interface: attribute cite] expected: FAIL @@ -2319,9 +2271,6 @@ [HTMLQuoteElement interface: document.createElement("q") must inherit property "cite" with the proper type (0)] expected: FAIL - [HTMLOListElement interface: existence and properties of interface object] - expected: FAIL - [HTMLOListElement interface: attribute reversed] expected: FAIL @@ -2334,18 +2283,12 @@ [HTMLOListElement interface: attribute compact] expected: FAIL - [HTMLUListElement interface: existence and properties of interface object] - expected: FAIL - [HTMLUListElement interface: attribute compact] expected: FAIL [HTMLUListElement interface: attribute type] expected: FAIL - [HTMLLIElement interface: existence and properties of interface object] - expected: FAIL - [HTMLLIElement interface: attribute value] expected: FAIL @@ -2358,18 +2301,9 @@ [HTMLLIElement interface: document.createElement("li") must inherit property "type" with the proper type (1)] expected: FAIL - [HTMLDListElement interface: existence and properties of interface object] - expected: FAIL - [HTMLDListElement interface: attribute compact] expected: FAIL - [HTMLDivElement interface: existence and properties of interface object] - expected: FAIL - - [HTMLAnchorElement interface: existence and properties of interface object] - expected: FAIL - [HTMLAnchorElement interface: attribute target] expected: FAIL @@ -2412,39 +2346,24 @@ [HTMLAnchorElement interface: document.createElement("a") must inherit property "charset" with the proper type (9)] expected: FAIL - [HTMLDataElement interface: existence and properties of interface object] - expected: FAIL - [HTMLDataElement interface: attribute value] expected: FAIL [HTMLDataElement interface: document.createElement("data") must inherit property "value" with the proper type (0)] expected: FAIL - [HTMLTimeElement interface: existence and properties of interface object] - expected: FAIL - [HTMLTimeElement interface: attribute dateTime] expected: FAIL [HTMLTimeElement interface: document.createElement("time") must inherit property "dateTime" with the proper type (0)] expected: FAIL - [HTMLSpanElement interface: existence and properties of interface object] - expected: FAIL - - [HTMLBRElement interface: existence and properties of interface object] - expected: FAIL - [HTMLBRElement interface: attribute clear] expected: FAIL [HTMLBRElement interface: document.createElement("br") must inherit property "clear" with the proper type (0)] expected: FAIL - [HTMLModElement interface: existence and properties of interface object] - expected: FAIL - [HTMLModElement interface: attribute cite] expected: FAIL @@ -2481,9 +2400,6 @@ [Stringification of document.createElement("picture")] expected: FAIL - [HTMLImageElement interface: existence and properties of interface object] - expected: FAIL - [HTMLImageElement interface: attribute srcset] expected: FAIL @@ -2529,9 +2445,6 @@ [HTMLImageElement interface: new Image() must inherit property "lowsrc" with the proper type (14)] expected: FAIL - [HTMLIFrameElement interface: existence and properties of interface object] - expected: FAIL - [HTMLIFrameElement interface: attribute srcdoc] expected: FAIL @@ -2562,9 +2475,6 @@ [HTMLIFrameElement interface: attribute marginWidth] expected: FAIL - [HTMLEmbedElement interface: existence and properties of interface object] - expected: FAIL - [HTMLEmbedElement interface: attribute src] expected: FAIL @@ -2613,9 +2523,6 @@ [HTMLEmbedElement interface: document.createElement("embed") must inherit property "name" with the proper type (7)] expected: FAIL - [HTMLObjectElement interface: existence and properties of interface object] - expected: FAIL - [HTMLObjectElement interface: attribute data] expected: FAIL @@ -2772,9 +2679,6 @@ [HTMLObjectElement interface: document.createElement("object") must inherit property "border" with the proper type (26)] expected: FAIL - [HTMLParamElement interface: existence and properties of interface object] - expected: FAIL - [HTMLParamElement interface: attribute name] expected: FAIL @@ -2799,9 +2703,6 @@ [HTMLParamElement interface: document.createElement("param") must inherit property "valueType" with the proper type (3)] expected: FAIL - [HTMLVideoElement interface: existence and properties of interface object] - expected: FAIL - [HTMLVideoElement interface: attribute width] expected: FAIL @@ -2973,9 +2874,6 @@ [HTMLMediaElement interface: calling addTextTrack(TextTrackKind,DOMString,DOMString) on document.createElement("video") with too few arguments must throw TypeError] expected: FAIL - [HTMLAudioElement interface: existence and properties of interface object] - expected: FAIL - [HTMLMediaElement interface: document.createElement("audio") must inherit property "error" with the proper type (0)] expected: FAIL @@ -3264,9 +3162,6 @@ [HTMLMediaElement interface: calling addTextTrack(TextTrackKind,DOMString,DOMString) on new Audio() with too few arguments must throw TypeError] expected: FAIL - [HTMLSourceElement interface: existence and properties of interface object] - expected: FAIL - [HTMLSourceElement interface: attribute src] expected: FAIL @@ -3297,9 +3192,6 @@ [HTMLSourceElement interface: document.createElement("source") must inherit property "media" with the proper type (4)] expected: FAIL - [HTMLTrackElement interface: existence and properties of interface object] - expected: FAIL - [HTMLTrackElement interface: attribute kind] expected: FAIL @@ -3378,9 +3270,6 @@ [HTMLTrackElement interface: document.createElement("track") must inherit property "track" with the proper type (10)] expected: FAIL - [HTMLMediaElement interface: existence and properties of interface object] - expected: FAIL - [HTMLMediaElement interface: attribute error] expected: FAIL @@ -4284,9 +4173,6 @@ [Event interface: calling initEvent(DOMString,boolean,boolean) on new TrackEvent("addtrack"; {track:document.createElement("track").track}) with too few arguments must throw TypeError] expected: FAIL - [HTMLMapElement interface: existence and properties of interface object] - expected: FAIL - [HTMLMapElement interface: attribute name] expected: FAIL @@ -4305,9 +4191,6 @@ [HTMLMapElement interface: document.createElement("map") must inherit property "images" with the proper type (2)] expected: FAIL - [HTMLAreaElement interface: existence and properties of interface object] - expected: FAIL - [HTMLAreaElement interface: attribute alt] expected: FAIL @@ -4356,9 +4239,6 @@ [HTMLAreaElement interface: document.createElement("area") must inherit property "noHref" with the proper type (10)] expected: FAIL - [HTMLTableElement interface: existence and properties of interface object] - expected: FAIL - [HTMLTableElement interface: attribute tHead] expected: FAIL @@ -4479,18 +4359,12 @@ [HTMLTableElement interface: document.createElement("table") must inherit property "cellSpacing" with the proper type (24)] expected: FAIL - [HTMLTableCaptionElement interface: existence and properties of interface object] - expected: FAIL - [HTMLTableCaptionElement interface: attribute align] expected: FAIL [HTMLTableCaptionElement interface: document.createElement("caption") must inherit property "align" with the proper type (0)] expected: FAIL - [HTMLTableColElement interface: existence and properties of interface object] - expected: FAIL - [HTMLTableColElement interface: attribute span] expected: FAIL @@ -4545,9 +4419,6 @@ [HTMLTableColElement interface: document.createElement("col") must inherit property "width" with the proper type (5)] expected: FAIL - [HTMLTableSectionElement interface: existence and properties of interface object] - expected: FAIL - [HTMLTableSectionElement interface: attribute align] expected: FAIL @@ -4596,9 +4467,6 @@ [HTMLTableSectionElement interface: document.createElement("tfoot") must inherit property "vAlign" with the proper type (6)] expected: FAIL - [HTMLTableRowElement interface: existence and properties of interface object] - expected: FAIL - [HTMLTableRowElement interface: attribute rowIndex] expected: FAIL @@ -4635,9 +4503,6 @@ [HTMLTableRowElement interface: document.createElement("tr") must inherit property "vAlign" with the proper type (8)] expected: FAIL - [HTMLTableDataCellElement interface: existence and properties of interface object] - expected: FAIL - [HTMLTableDataCellElement interface: attribute abbr] expected: FAIL @@ -4671,9 +4536,6 @@ [HTMLTableCellElement interface: document.createElement("td") must inherit property "vAlign" with the proper type (11)] expected: FAIL - [HTMLTableHeaderCellElement interface: existence and properties of interface object] - expected: FAIL - [HTMLTableHeaderCellElement interface: attribute scope] expected: FAIL @@ -4725,9 +4587,6 @@ [HTMLTableCellElement interface: document.createElement("th") must inherit property "vAlign" with the proper type (11)] expected: FAIL - [HTMLTableCellElement interface: existence and properties of interface object] - expected: FAIL - [HTMLTableCellElement interface: attribute rowSpan] expected: FAIL @@ -4755,9 +4614,6 @@ [HTMLTableCellElement interface: attribute vAlign] expected: FAIL - [HTMLFormElement interface: existence and properties of interface object] - expected: FAIL - [HTMLFormElement interface: operation checkValidity()] expected: FAIL @@ -4776,12 +4632,6 @@ [HTMLFormElement interface: document.createElement("form") must inherit property "requestAutocomplete" with the proper type (17)] expected: FAIL - [HTMLLabelElement interface: existence and properties of interface object] - expected: FAIL - - [HTMLInputElement interface: existence and properties of interface object] - expected: FAIL - [HTMLInputElement interface: attribute accept] expected: FAIL @@ -5034,9 +4884,6 @@ [HTMLInputElement interface: document.createElement("input") must inherit property "useMap" with the proper type (57)] expected: FAIL - [HTMLButtonElement interface: existence and properties of interface object] - expected: FAIL - [HTMLButtonElement interface: attribute autofocus] expected: FAIL @@ -5082,9 +4929,6 @@ [HTMLButtonElement interface: calling setCustomValidity(DOMString) on document.createElement("button") with too few arguments must throw TypeError] expected: FAIL - [HTMLSelectElement interface: existence and properties of interface object] - expected: FAIL - [HTMLSelectElement interface: attribute autocomplete] expected: FAIL @@ -5190,21 +5034,12 @@ [HTMLSelectElement interface: calling setCustomValidity(DOMString) on document.createElement("select") with too few arguments must throw TypeError] expected: FAIL - [HTMLDataListElement interface: existence and properties of interface object] - expected: FAIL - - [HTMLOptGroupElement interface: existence and properties of interface object] - expected: FAIL - [HTMLOptGroupElement interface: attribute label] expected: FAIL [HTMLOptGroupElement interface: document.createElement("optgroup") must inherit property "label" with the proper type (1)] expected: FAIL - [HTMLOptionElement interface: existence and properties of interface object] - expected: FAIL - [HTMLOptionElement interface: attribute form] expected: FAIL @@ -5217,9 +5052,6 @@ [HTMLOptionElement interface: document.createElement("option") must inherit property "index" with the proper type (7)] expected: FAIL - [HTMLTextAreaElement interface: existence and properties of interface object] - expected: FAIL - [HTMLTextAreaElement interface: attribute autocomplete] expected: FAIL @@ -5457,9 +5289,6 @@ [HTMLKeygenElement interface: document.createElement("keygen") must inherit property "labels" with the proper type (13)] expected: FAIL - [HTMLOutputElement interface: existence and properties of interface object] - expected: FAIL - [HTMLOutputElement interface: attribute htmlFor] expected: FAIL @@ -5523,9 +5352,6 @@ [HTMLOutputElement interface: calling setCustomValidity(DOMString) on document.createElement("output") with too few arguments must throw TypeError] expected: FAIL - [HTMLProgressElement interface: existence and properties of interface object] - expected: FAIL - [HTMLProgressElement interface: attribute value] expected: FAIL @@ -5544,9 +5370,6 @@ [HTMLProgressElement interface: document.createElement("progress") must inherit property "position" with the proper type (2)] expected: FAIL - [HTMLMeterElement interface: existence and properties of interface object] - expected: FAIL - [HTMLMeterElement interface: attribute value] expected: FAIL @@ -5583,9 +5406,6 @@ [HTMLMeterElement interface: document.createElement("meter") must inherit property "optimum" with the proper type (5)] expected: FAIL - [HTMLFieldSetElement interface: existence and properties of interface object] - expected: FAIL - [HTMLFieldSetElement interface: attribute name] expected: FAIL @@ -5607,9 +5427,6 @@ [HTMLFieldSetElement interface: operation setCustomValidity(DOMString)] expected: FAIL - [HTMLLegendElement interface: existence and properties of interface object] - expected: FAIL - [HTMLLegendElement interface: attribute form] expected: FAIL @@ -5820,9 +5637,6 @@ [RelatedEvent interface: attribute relatedTarget] expected: FAIL - [HTMLDialogElement interface: existence and properties of interface object] - expected: FAIL - [HTMLDialogElement interface: operation show([object Object\],[object Object\])] expected: FAIL @@ -5832,9 +5646,6 @@ [HTMLDialogElement interface: operation close(DOMString)] expected: FAIL - [HTMLScriptElement interface: existence and properties of interface object] - expected: FAIL - [HTMLScriptElement interface: attribute type] expected: FAIL @@ -5877,12 +5688,6 @@ [HTMLScriptElement interface: document.createElement("script") must inherit property "htmlFor" with the proper type (8)] expected: FAIL - [HTMLTemplateElement interface: existence and properties of interface object] - expected: FAIL - - [HTMLCanvasElement interface: existence and properties of interface object] - expected: FAIL - [HTMLCanvasElement interface: operation probablySupportsContext(DOMString,any)] expected: FAIL @@ -6402,9 +6207,6 @@ [DragEvent interface: attribute dataTransfer] expected: FAIL - [Window interface: existence and properties of interface object] - expected: FAIL - [Window interface: existence and properties of interface prototype object] expected: FAIL @@ -7461,9 +7263,6 @@ [EventTarget interface: calling dispatchEvent(Event) on window.applicationCache with too few arguments must throw TypeError] expected: FAIL - [ErrorEvent interface: existence and properties of interface object] - expected: FAIL - [Navigator interface: attribute language] expected: FAIL @@ -7719,9 +7518,6 @@ [ImageBitmap interface: attribute height] expected: FAIL - [MessageEvent interface: existence and properties of interface object] - expected: FAIL - [MessageEvent interface: attribute source] expected: FAIL @@ -7731,18 +7527,9 @@ [MessageEvent interface: operation initMessageEvent(DOMString,boolean,boolean,any,DOMString,DOMString,[object Object\],[object Object\],MessagePort)] expected: FAIL - [EventSource interface: existence and properties of interface object] - expected: FAIL - - [WebSocket interface: existence and properties of interface object] - expected: FAIL - [WebSocket interface: attribute extensions] expected: FAIL - [CloseEvent interface: existence and properties of interface object] - expected: FAIL - [MessageChannel interface: existence and properties of interface object] expected: FAIL @@ -7833,9 +7620,6 @@ [BroadcastChannel interface: attribute onmessage] expected: FAIL - [WorkerGlobalScope interface: existence and properties of interface object] - expected: FAIL - [WorkerGlobalScope interface: operation close()] expected: FAIL @@ -7854,9 +7638,6 @@ [WorkerGlobalScope interface: operation createImageBitmap(ImageBitmapSource,long,long,long,long)] expected: FAIL - [DedicatedWorkerGlobalScope interface: existence and properties of interface object] - expected: FAIL - [DedicatedWorkerGlobalScope interface: operation postMessage(any,[object Object\])] expected: FAIL @@ -7884,9 +7665,6 @@ [SharedWorkerGlobalScope interface: attribute onconnect] expected: FAIL - [Worker interface: existence and properties of interface object] - expected: FAIL - [Worker interface: operation terminate()] expected: FAIL @@ -7917,12 +7695,6 @@ [WorkerNavigator interface: attribute onLine] expected: FAIL - [StorageEvent interface: existence and properties of interface object] - expected: FAIL - - [HTMLAppletElement interface: existence and properties of interface object] - expected: FAIL - [HTMLAppletElement interface: attribute align] expected: FAIL @@ -8097,9 +7869,6 @@ [HTMLMarqueeElement interface: document.createElement("marquee") must inherit property "stop" with the proper type (15)] expected: FAIL - [HTMLFrameSetElement interface: existence and properties of interface object] - expected: FAIL - [HTMLFrameSetElement interface: attribute cols] expected: FAIL @@ -8190,9 +7959,6 @@ [HTMLFrameSetElement interface: document.createElement("frameset") must inherit property "onunload" with the proper type (14)] expected: FAIL - [HTMLFrameElement interface: existence and properties of interface object] - expected: FAIL - [HTMLFrameElement interface: attribute name] expected: FAIL @@ -8253,18 +8019,12 @@ [HTMLFrameElement interface: document.createElement("frame") must inherit property "marginWidth" with the proper type (9)] expected: FAIL - [HTMLDirectoryElement interface: existence and properties of interface object] - expected: FAIL - [HTMLDirectoryElement interface: attribute compact] expected: FAIL [HTMLDirectoryElement interface: document.createElement("dir") must inherit property "compact" with the proper type (0)] expected: FAIL - [HTMLFontElement interface: existence and properties of interface object] - expected: FAIL - [Window interface: window must inherit property "close" with the proper type (13)] expected: FAIL diff --git a/tests/wpt/metadata/webstorage/idlharness.html.ini b/tests/wpt/metadata/webstorage/idlharness.html.ini index 3df3eb9d734..6885750802e 100644 --- a/tests/wpt/metadata/webstorage/idlharness.html.ini +++ b/tests/wpt/metadata/webstorage/idlharness.html.ini @@ -3,9 +3,6 @@ [Window interface: attribute localStorage] expected: FAIL - [StorageEvent interface: existence and properties of interface object] - expected: FAIL - [Window interface: attribute sessionStorage] expected: FAIL diff --git a/tests/wpt/metadata/workers/interfaces.worker.js.ini b/tests/wpt/metadata/workers/interfaces.worker.js.ini index c8839fa803b..ace10433f09 100644 --- a/tests/wpt/metadata/workers/interfaces.worker.js.ini +++ b/tests/wpt/metadata/workers/interfaces.worker.js.ini @@ -1,8 +1,5 @@ [interfaces.worker] type: testharness - [WorkerGlobalScope interface: existence and properties of interface object] - expected: FAIL - [WorkerGlobalScope interface: operation close()] expected: FAIL @@ -18,9 +15,6 @@ [WorkerGlobalScope interface: attribute ononline] expected: FAIL - [DedicatedWorkerGlobalScope interface: existence and properties of interface object] - expected: FAIL - [DedicatedWorkerGlobalScope interface: operation postMessage(any,[object Object\])] expected: FAIL