Make Element::attach_shadow() and ShadowRoot closer to spec (#36024)

Signed-off-by: batu_hoang <longvatrong111@gmail.com>
This commit is contained in:
batu_hoang 2025-03-20 01:58:16 +08:00 committed by GitHub
parent 11d47558b3
commit db74179dc8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 117 additions and 158 deletions

View file

@ -1,4 +0,0 @@
[element-internals-shadowroot.html]
expected: ERROR
[ElementInternals.shadowRoot doesn't reveal pre-attached closed shadowRoot]
expected: FAIL

View file

@ -164,9 +164,6 @@
[AbortSignal interface: new AbortController().signal must inherit property "abort()" with the proper type]
expected: FAIL
[ShadowRoot interface: attribute delegatesFocus]
expected: FAIL
[XSLTProcessor interface: existence and properties of interface object]
expected: FAIL
@ -347,9 +344,6 @@
[DocumentFragment interface: operation replaceChildren((Node or TrustedScript or DOMString)...)]
expected: FAIL
[ShadowRoot interface: attribute serializable]
expected: FAIL
[Element interface: operation prepend((Node or TrustedScript or DOMString)...)]
expected: FAIL
@ -442,6 +436,3 @@
[Element interface: calling moveBefore(Node, Node?) on element with too few arguments must throw TypeError]
expected: FAIL
[idlharness.window.html?include=Node]

View file

@ -1,6 +0,0 @@
[Element-interface-attachShadow-custom-element.html]
[Element.attachShadow for an autonomous custom element with disabledFeatures=["shadow"\] should throw a NotSupportedError]
expected: FAIL
[Element.attachShadow for a customized built-in element with disabledFeatures=["shadow"\] should throw a NotSupportedError]
expected: FAIL

View file

@ -1,3 +0,0 @@
[Element-interface-attachShadow.html]
[Element.attachShadow must throw a NotSupportedError if the context object already hosts a shadow tree]
expected: FAIL

View file

@ -50,57 +50,6 @@
[Declarative Shadow DOM as a child of <span>, with mode=open, delegatesFocus=false. Should be safelisted.]
expected: FAIL
[Declarative Shadow DOM as a child of <article>, with mode=closed, delegatesFocus=false. Should be safelisted.]
expected: FAIL
[Declarative Shadow DOM as a child of <aside>, with mode=closed, delegatesFocus=false. Should be safelisted.]
expected: FAIL
[Declarative Shadow DOM as a child of <blockquote>, with mode=closed, delegatesFocus=false. Should be safelisted.]
expected: FAIL
[Declarative Shadow DOM as a child of <div>, with mode=closed, delegatesFocus=false. Should be safelisted.]
expected: FAIL
[Declarative Shadow DOM as a child of <footer>, with mode=closed, delegatesFocus=false. Should be safelisted.]
expected: FAIL
[Declarative Shadow DOM as a child of <h1>, with mode=closed, delegatesFocus=false. Should be safelisted.]
expected: FAIL
[Declarative Shadow DOM as a child of <h2>, with mode=closed, delegatesFocus=false. Should be safelisted.]
expected: FAIL
[Declarative Shadow DOM as a child of <h3>, with mode=closed, delegatesFocus=false. Should be safelisted.]
expected: FAIL
[Declarative Shadow DOM as a child of <h4>, with mode=closed, delegatesFocus=false. Should be safelisted.]
expected: FAIL
[Declarative Shadow DOM as a child of <h5>, with mode=closed, delegatesFocus=false. Should be safelisted.]
expected: FAIL
[Declarative Shadow DOM as a child of <h6>, with mode=closed, delegatesFocus=false. Should be safelisted.]
expected: FAIL
[Declarative Shadow DOM as a child of <header>, with mode=closed, delegatesFocus=false. Should be safelisted.]
expected: FAIL
[Declarative Shadow DOM as a child of <main>, with mode=closed, delegatesFocus=false. Should be safelisted.]
expected: FAIL
[Declarative Shadow DOM as a child of <nav>, with mode=closed, delegatesFocus=false. Should be safelisted.]
expected: FAIL
[Declarative Shadow DOM as a child of <p>, with mode=closed, delegatesFocus=false. Should be safelisted.]
expected: FAIL
[Declarative Shadow DOM as a child of <section>, with mode=closed, delegatesFocus=false. Should be safelisted.]
expected: FAIL
[Declarative Shadow DOM as a child of <span>, with mode=closed, delegatesFocus=false. Should be safelisted.]
expected: FAIL
[Declarative Shadow DOM as a child of <article>, with mode=open, delegatesFocus=true. Should be safelisted.]
expected: FAIL
@ -151,54 +100,3 @@
[Declarative Shadow DOM as a child of <span>, with mode=open, delegatesFocus=true. Should be safelisted.]
expected: FAIL
[Declarative Shadow DOM as a child of <article>, with mode=closed, delegatesFocus=true. Should be safelisted.]
expected: FAIL
[Declarative Shadow DOM as a child of <aside>, with mode=closed, delegatesFocus=true. Should be safelisted.]
expected: FAIL
[Declarative Shadow DOM as a child of <blockquote>, with mode=closed, delegatesFocus=true. Should be safelisted.]
expected: FAIL
[Declarative Shadow DOM as a child of <div>, with mode=closed, delegatesFocus=true. Should be safelisted.]
expected: FAIL
[Declarative Shadow DOM as a child of <footer>, with mode=closed, delegatesFocus=true. Should be safelisted.]
expected: FAIL
[Declarative Shadow DOM as a child of <h1>, with mode=closed, delegatesFocus=true. Should be safelisted.]
expected: FAIL
[Declarative Shadow DOM as a child of <h2>, with mode=closed, delegatesFocus=true. Should be safelisted.]
expected: FAIL
[Declarative Shadow DOM as a child of <h3>, with mode=closed, delegatesFocus=true. Should be safelisted.]
expected: FAIL
[Declarative Shadow DOM as a child of <h4>, with mode=closed, delegatesFocus=true. Should be safelisted.]
expected: FAIL
[Declarative Shadow DOM as a child of <h5>, with mode=closed, delegatesFocus=true. Should be safelisted.]
expected: FAIL
[Declarative Shadow DOM as a child of <h6>, with mode=closed, delegatesFocus=true. Should be safelisted.]
expected: FAIL
[Declarative Shadow DOM as a child of <header>, with mode=closed, delegatesFocus=true. Should be safelisted.]
expected: FAIL
[Declarative Shadow DOM as a child of <main>, with mode=closed, delegatesFocus=true. Should be safelisted.]
expected: FAIL
[Declarative Shadow DOM as a child of <nav>, with mode=closed, delegatesFocus=true. Should be safelisted.]
expected: FAIL
[Declarative Shadow DOM as a child of <p>, with mode=closed, delegatesFocus=true. Should be safelisted.]
expected: FAIL
[Declarative Shadow DOM as a child of <section>, with mode=closed, delegatesFocus=true. Should be safelisted.]
expected: FAIL
[Declarative Shadow DOM as a child of <span>, with mode=closed, delegatesFocus=true. Should be safelisted.]
expected: FAIL

View file

@ -4,6 +4,3 @@
[Declarative Shadow DOM: Fragment parser basic test]
expected: FAIL
[Declarative Shadow DOM: delegates focus attribute]
expected: FAIL

View file

@ -1,3 +0,0 @@
[declarative-with-disabled-shadow.html]
[Declarative Shadow DOM: declarative shadow should fail if attachShadow() already called]
expected: FAIL

View file

@ -1,9 +0,0 @@
[ShadowRoot-delegatesFocus.html]
[default delegatesFocus value]
expected: FAIL
[delegatesFocus set to false in init dict]
expected: FAIL
[delegatesFocus set to true in init dict]
expected: FAIL