diff --git a/components/script/dom/customelementregistry.rs b/components/script/dom/customelementregistry.rs index 998c4fdcb12..89296884080 100644 --- a/components/script/dom/customelementregistry.rs +++ b/components/script/dom/customelementregistry.rs @@ -600,9 +600,11 @@ impl CustomElementReactionStack { unsafe { val.to_jsval(cx, value.handle_mut()); } } - let namespace = DOMString::from(&*namespace); - rooted!(in(cx) let mut namespace_value = UndefinedValue()); - unsafe { namespace.to_jsval(cx, namespace_value.handle_mut()); } + rooted!(in(cx) let mut namespace_value = NullValue()); + if namespace != ns!() { + let namespace = DOMString::from(&*namespace); + unsafe { namespace.to_jsval(cx, namespace_value.handle_mut()); } + } let args = vec![Heap::default(), Heap::default(), Heap::default(), Heap::default()]; args[0].set(name_value.get()); diff --git a/tests/wpt/metadata/custom-elements/attribute-changed-callback.html.ini b/tests/wpt/metadata/custom-elements/attribute-changed-callback.html.ini index 9f2850400e5..22242bc3ba4 100644 --- a/tests/wpt/metadata/custom-elements/attribute-changed-callback.html.ini +++ b/tests/wpt/metadata/custom-elements/attribute-changed-callback.html.ini @@ -1,26 +1,5 @@ [attribute-changed-callback.html] type: testharness - [setAttribute and removeAttribute must enqueue and invoke attributeChangedCallback] - expected: FAIL - - [setAttributeNode and removeAttributeNode must enqueue and invoke attributeChangedCallback for an HTML attribute] - expected: FAIL - - [Mutating attributeChangedCallback after calling customElements.define must not affect the callback being invoked] - expected: FAIL - - [attributedChangedCallback must not be invoked when the observed attributes does not contain the attribute] - expected: FAIL - - [Mutating observedAttributes after calling customElements.define must not affect the set of attributes for which attributedChangedCallback is invoked] - expected: FAIL - - [attributedChangedCallback must be enqueued for attributes specified in a non-Array iterable observedAttributes] - expected: FAIL - - [attributedChangedCallback must be enqueued for style attribute change by mutating inline style declaration] - expected: FAIL - - [attributedChangedCallback must not be enqueued when mutating inline style declaration if the style attribute is not observed] + [Custom Elements: attributeChangedCallback] expected: FAIL diff --git a/tests/wpt/metadata/custom-elements/reactions/Attr.html.ini b/tests/wpt/metadata/custom-elements/reactions/Attr.html.ini deleted file mode 100644 index bd4c3d13679..00000000000 --- a/tests/wpt/metadata/custom-elements/reactions/Attr.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[Attr.html] - type: testharness - [value on Attr must enqueue an attributeChanged reaction when replacing an existing attribute] - expected: FAIL - diff --git a/tests/wpt/metadata/custom-elements/reactions/CSSStyleDeclaration.html.ini b/tests/wpt/metadata/custom-elements/reactions/CSSStyleDeclaration.html.ini index 63215ffadfd..d60fba10180 100644 --- a/tests/wpt/metadata/custom-elements/reactions/CSSStyleDeclaration.html.ini +++ b/tests/wpt/metadata/custom-elements/reactions/CSSStyleDeclaration.html.ini @@ -1,47 +1,5 @@ [CSSStyleDeclaration.html] type: testharness - [cssText on CSSStyleDeclaration must enqueue an attributeChanged reaction when it adds the observed style attribute] - expected: FAIL - - [cssText on CSSStyleDeclaration must enqueue an attributeChanged reaction when it mutates the observed style attribute] - expected: FAIL - - [setProperty on CSSStyleDeclaration must enqueue an attributeChanged reaction when it adds the observed style attribute] - expected: FAIL - - [setProperty on CSSStyleDeclaration must enqueue an attributeChanged reaction when it mutates the observed style attribute] - expected: FAIL - - [setProperty on CSSStyleDeclaration must enqueue an attributeChanged reaction when it makes a property important and the style attribute is observed] - expected: FAIL - - [setPropertyValue on CSSStyleDeclaration must enqueue an attributeChanged reaction when it adds the observed style attribute] - expected: FAIL - - [setPropertyValue on CSSStyleDeclaration must enqueue an attributeChanged reaction when it mutates the observed style attribute] - expected: FAIL - - [setPropertyPriority on CSSStyleDeclaration must enqueue an attributeChanged reaction when it makes a property important and the style attribute is observed] - expected: FAIL - - [removeProperty on CSSStyleDeclaration must enqueue an attributeChanged reaction when it removes a property from the observed style attribute] - expected: FAIL - - [cssFloat on CSSStyleDeclaration must enqueue an attributeChanged reaction when it adds the observed style attribute] - expected: FAIL - - [A camel case attribute (borderWidth) on CSSStyleDeclaration must enqueue an attributeChanged reaction when it adds the observed style attribute] - expected: FAIL - - [A camel case attribute (borderWidth) on CSSStyleDeclaration must enqueue an attributeChanged reaction when it mutates the observed style attribute] - expected: FAIL - - [A dashed property (border-width) on CSSStyleDeclaration must enqueue an attributeChanged reaction when it adds the observed style attribute] - expected: FAIL - - [A dashed property (border-width) on CSSStyleDeclaration must enqueue an attributeChanged reaction when it mutates the observed style attribute] - expected: FAIL - [A webkit prefixed camel case attribute (webkitFilter) on CSSStyleDeclaration must enqueue an attributeChanged reaction when it adds the observed style attribute] expected: FAIL diff --git a/tests/wpt/metadata/custom-elements/reactions/DOMStringMap.html.ini b/tests/wpt/metadata/custom-elements/reactions/DOMStringMap.html.ini deleted file mode 100644 index f92cc7c1ae7..00000000000 --- a/tests/wpt/metadata/custom-elements/reactions/DOMStringMap.html.ini +++ /dev/null @@ -1,14 +0,0 @@ -[DOMStringMap.html] - type: testharness - [setter on DOMStringMap must enqueue an attributeChanged reaction when adding an observed data attribute] - expected: FAIL - - [setter on DOMStringMap must enqueue an attributeChanged reaction when mutating the value of an observed data attribute] - expected: FAIL - - [setter on DOMStringMap must enqueue an attributeChanged reaction when mutating the value of an observed data attribute to the same value] - expected: FAIL - - [deleter on DOMStringMap must enqueue an attributeChanged reaction when removing an observed data attribute] - expected: FAIL - diff --git a/tests/wpt/metadata/custom-elements/reactions/DOMTokenList.html.ini b/tests/wpt/metadata/custom-elements/reactions/DOMTokenList.html.ini index 471f7e8fccf..5056f704f45 100644 --- a/tests/wpt/metadata/custom-elements/reactions/DOMTokenList.html.ini +++ b/tests/wpt/metadata/custom-elements/reactions/DOMTokenList.html.ini @@ -1,41 +1,5 @@ [DOMTokenList.html] type: testharness - [add on DOMTokenList must enqueue an attributeChanged reaction when adding an attribute] - expected: FAIL - - [add on DOMTokenList must enqueue an attributeChanged reaction when adding a value to an existing attribute] - expected: FAIL - - [add on DOMTokenList must enqueue exactly one attributeChanged reaction when adding multiple values to an attribute] - expected: FAIL - - [remove on DOMTokenList must enqueue an attributeChanged reaction when removing a value from an attribute] - expected: FAIL - - [remove on DOMTokenList must enqueue exactly one attributeChanged reaction when removing multiple values to an attribute] - expected: FAIL - - [remove on DOMTokenList must enqueue an attributeChanged reaction even when removing a non-existent value from an attribute] - expected: FAIL - - [toggle on DOMTokenList must enqueue an attributeChanged reaction when adding a value to an attribute] - expected: FAIL - - [toggle on DOMTokenList must enqueue an attributeChanged reaction when removing a value from an attribute] - expected: FAIL - - [replace on DOMTokenList must enqueue an attributeChanged reaction when replacing a value in an attribute] - expected: FAIL - [replace on DOMTokenList must not enqueue an attributeChanged reaction when the token to replace does not exist in the attribute] expected: FAIL - [the stringifier of DOMTokenList must enqueue an attributeChanged reaction when adding an observed attribute] - expected: FAIL - - [the stringifier of DOMTokenList must enqueue an attributeChanged reaction when mutating the value of an observed attribute] - expected: FAIL - - [the stringifier of DOMTokenList must enqueue an attributeChanged reaction when the setter is called with the original value of the attribute] - expected: FAIL - diff --git a/tests/wpt/metadata/custom-elements/reactions/Element.html.ini b/tests/wpt/metadata/custom-elements/reactions/Element.html.ini index bf8e6529090..988eddc141a 100644 --- a/tests/wpt/metadata/custom-elements/reactions/Element.html.ini +++ b/tests/wpt/metadata/custom-elements/reactions/Element.html.ini @@ -1,56 +1,17 @@ [Element.html] type: testharness - [id on Element must enqueue an attributeChanged reaction when adding id content attribute] - expected: FAIL - - [id on Element must enqueue an attributeChanged reaction when replacing an existing attribute] - expected: FAIL - - [className on Element must enqueue an attributeChanged reaction when adding class content attribute] - expected: FAIL - - [className on Element must enqueue an attributeChanged reaction when replacing an existing attribute] - expected: FAIL - [slot on Element must enqueue an attributeChanged reaction when adding slot content attribute] expected: FAIL [slot on Element must enqueue an attributeChanged reaction when replacing an existing attribute] expected: FAIL - [setAttribute on Element must enqueue an attributeChanged reaction when adding an attribute] - expected: FAIL - - [setAttribute on Element must enqueue an attributeChanged reaction when replacing an existing attribute] - expected: FAIL - - [setAttributeNS on Element must enqueue an attributeChanged reaction when adding an attribute] - expected: FAIL - - [setAttributeNS on Element must enqueue an attributeChanged reaction when replacing an existing attribute] - expected: FAIL - - [removeAttribute on Element must enqueue an attributeChanged reaction when removing an existing attribute] - expected: FAIL - - [removeAttributeNS on Element must enqueue an attributeChanged reaction when removing an existing attribute] - expected: FAIL - - [setAttributeNode on Element must enqueue an attributeChanged reaction when adding an attribute] - expected: FAIL - [setAttributeNode on Element must enqueue an attributeChanged reaction when replacing an existing attribute] expected: FAIL - [setAttributeNodeNS on Element must enqueue an attributeChanged reaction when adding an attribute] - expected: FAIL - [setAttributeNodeNS on Element must enqueue an attributeChanged reaction when replacing an existing attribute] expected: FAIL - [removeAttributeNode on Element must enqueue an attributeChanged reaction when removing an existing attribute] - expected: FAIL - [innerHTML on Element must enqueue a connected reaction for a newly constructed custom element] expected: FAIL diff --git a/tests/wpt/metadata/custom-elements/reactions/HTMLElement.html.ini b/tests/wpt/metadata/custom-elements/reactions/HTMLElement.html.ini index 5fd50683d4c..44ad7d81adc 100644 --- a/tests/wpt/metadata/custom-elements/reactions/HTMLElement.html.ini +++ b/tests/wpt/metadata/custom-elements/reactions/HTMLElement.html.ini @@ -1,17 +1,5 @@ [HTMLElement.html] type: testharness - [title on HTMLElement must enqueue an attributeChanged reaction when adding title content attribute] - expected: FAIL - - [title on HTMLElement must enqueue an attributeChanged reaction when replacing an existing attribute] - expected: FAIL - - [lang on HTMLElement must enqueue an attributeChanged reaction when adding lang content attribute] - expected: FAIL - - [lang on HTMLElement must enqueue an attributeChanged reaction when replacing an existing attribute] - expected: FAIL - [translate on HTMLElement must enqueue an attributeChanged reaction when adding translate content attribute] expected: FAIL @@ -24,12 +12,6 @@ [dir on HTMLElement must enqueue an attributeChanged reaction when replacing an existing attribute] expected: FAIL - [hidden on HTMLElement must enqueue an attributeChanged reaction when adding hidden content attribute] - expected: FAIL - - [hidden on HTMLElement must enqueue an attributeChanged reaction when replacing an existing attribute] - expected: FAIL - [tabIndex on HTMLElement must enqueue an attributeChanged reaction when adding tabindex content attribute] expected: FAIL diff --git a/tests/wpt/metadata/custom-elements/reactions/NamedNodeMap.html.ini b/tests/wpt/metadata/custom-elements/reactions/NamedNodeMap.html.ini index f1ffa8a7189..f1dfcdc502e 100644 --- a/tests/wpt/metadata/custom-elements/reactions/NamedNodeMap.html.ini +++ b/tests/wpt/metadata/custom-elements/reactions/NamedNodeMap.html.ini @@ -1,20 +1,8 @@ [NamedNodeMap.html] type: testharness - [setNamedItem on NamedNodeMap must enqueue an attributeChanged reaction when adding an attribute] - expected: FAIL - [setNamedItem on NamedNodeMap must enqueue an attributeChanged reaction when replacing an existing attribute] expected: FAIL - [setNamedItemNS on NamedNodeMap must enqueue an attributeChanged reaction when adding an attribute] - expected: FAIL - [setNamedItemNS on NamedNodeMap must enqueue an attributeChanged reaction when replacing an existing attribute] expected: FAIL - [removeNamedItem on NamedNodeMap must enqueue an attributeChanged reaction when removing an existing attribute] - expected: FAIL - - [removeNamedItemNS on NamedNodeMap must enqueue an attributeChanged reaction when removing an existing attribute] - expected: FAIL - diff --git a/tests/wpt/metadata/custom-elements/reactions/Node.html.ini b/tests/wpt/metadata/custom-elements/reactions/Node.html.ini index 19256a1f7b7..fc8e80a9dcb 100644 --- a/tests/wpt/metadata/custom-elements/reactions/Node.html.ini +++ b/tests/wpt/metadata/custom-elements/reactions/Node.html.ini @@ -1,11 +1,5 @@ [Node.html] type: testharness - [nodeValue on Node must enqueue an attributeChanged reaction when replacing an existing attribute] - expected: FAIL - - [textContent on Node must enqueue an attributeChanged reaction when replacing an existing attribute] - expected: FAIL - [cloneNode on Node must enqueue an attributeChanged reaction when cloning an element with an observed attribute] expected: FAIL