Make traverse_preorder follow shadow roots (#34503)

* script: Ensure shadow-inclusve preorder traversals follow hosted shadow roots.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* script: Handle unregistering element id/name values inside of a shadow root.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* script: Merge shadow root tree iteration logic.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
Josh Matthews 2024-12-06 23:28:34 -05:00 committed by GitHub
parent ad48ab7ec3
commit 4242ff9626
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 20733 additions and 123 deletions

View file

@ -1,82 +1,40 @@
[adopted-callback.html]
[Inserting the shadow host of a custom element into the document of the template elements must enqueue and invoke adoptedCallback]
expected: FAIL
[Moving the shadow host of a custom element from the owner document into the document of the template elements must enqueue and invoke adoptedCallback]
expected: FAIL
[Moving the shadow host's shadow of a custom element from the owner document into the document of the template elements must enqueue and invoke adoptedCallback]
expected: FAIL
[Moving the <template>'s content of a custom element from the owner document into the document of the template elements must enqueue and invoke adoptedCallback]
expected: FAIL
[Inserting the shadow host of a custom element into a new document must enqueue and invoke adoptedCallback]
expected: FAIL
[Moving the shadow host of a custom element from the owner document into a new document must enqueue and invoke adoptedCallback]
expected: FAIL
[Moving the shadow host's shadow of a custom element from the owner document into a new document must enqueue and invoke adoptedCallback]
expected: FAIL
[Moving the <template>'s content of a custom element from the owner document into a new document must enqueue and invoke adoptedCallback]
expected: FAIL
[Inserting the shadow host of a custom element into a cloned document must enqueue and invoke adoptedCallback]
expected: FAIL
[Moving the shadow host of a custom element from the owner document into a cloned document must enqueue and invoke adoptedCallback]
expected: FAIL
[Moving the shadow host's shadow of a custom element from the owner document into a cloned document must enqueue and invoke adoptedCallback]
expected: FAIL
[Moving the <template>'s content of a custom element from the owner document into a cloned document must enqueue and invoke adoptedCallback]
expected: FAIL
[Inserting the shadow host of a custom element into a document created by createHTMLDocument must enqueue and invoke adoptedCallback]
expected: FAIL
[Moving the shadow host of a custom element from the owner document into a document created by createHTMLDocument must enqueue and invoke adoptedCallback]
expected: FAIL
[Moving the shadow host's shadow of a custom element from the owner document into a document created by createHTMLDocument must enqueue and invoke adoptedCallback]
expected: FAIL
[Moving the <template>'s content of a custom element from the owner document into a document created by createHTMLDocument must enqueue and invoke adoptedCallback]
expected: FAIL
[Inserting the shadow host of a custom element into an HTML document created by createDocument must enqueue and invoke adoptedCallback]
expected: FAIL
[Moving the shadow host of a custom element from the owner document into an HTML document created by createDocument must enqueue and invoke adoptedCallback]
expected: FAIL
[Moving the shadow host's shadow of a custom element from the owner document into an HTML document created by createDocument must enqueue and invoke adoptedCallback]
expected: FAIL
[Moving the <template>'s content of a custom element from the owner document into an HTML document created by createDocument must enqueue and invoke adoptedCallback]
expected: FAIL
[Inserting the shadow host of a custom element into the document of an iframe must enqueue and invoke adoptedCallback]
expected: FAIL
[Moving the shadow host of a custom element from the owner document into the document of an iframe must enqueue and invoke adoptedCallback]
expected: FAIL
[Moving the shadow host's shadow of a custom element from the owner document into the document of an iframe must enqueue and invoke adoptedCallback]
expected: FAIL
[Moving the <template>'s content of a custom element from the owner document into the document of an iframe must enqueue and invoke adoptedCallback]
expected: FAIL
[Inserting the shadow host of a custom element into an HTML document fetched by XHR must enqueue and invoke adoptedCallback]
expected: FAIL
[Moving the shadow host of a custom element from the owner document into an HTML document fetched by XHR must enqueue and invoke adoptedCallback]
expected: FAIL
[Moving the shadow host's shadow of a custom element from the owner document into an HTML document fetched by XHR must enqueue and invoke adoptedCallback]
expected: FAIL

View file

@ -1,24 +0,0 @@
[connected-callbacks.html]
[Inserting the shadow host of a custom element into the document must enqueue and invoke connectedCallback]
expected: FAIL
[Inserting the shadow host of a custom element into the document of the template elements must enqueue and invoke connectedCallback]
expected: FAIL
[Inserting the shadow host of a custom element into a new document must enqueue and invoke connectedCallback]
expected: FAIL
[Inserting the shadow host of a custom element into a cloned document must enqueue and invoke connectedCallback]
expected: FAIL
[Inserting the shadow host of a custom element into a document created by createHTMLDocument must enqueue and invoke connectedCallback]
expected: FAIL
[Inserting the shadow host of a custom element into an HTML document created by createDocument must enqueue and invoke connectedCallback]
expected: FAIL
[Inserting the shadow host of a custom element into the document of an iframe must enqueue and invoke connectedCallback]
expected: FAIL
[Inserting the shadow host of a custom element into an HTML document fetched by XHR must enqueue and invoke connectedCallback]
expected: FAIL

View file

@ -1,3 +0,0 @@
[upgrade.html]
[Two elements as shadow-including descendants (and not descendants) of the upgraded node]
expected: FAIL

View file

@ -1,48 +1,24 @@
[disconnected-callbacks.html]
[Removing the shadow host of a custom element from athe document must enqueue and invoke disconnectedCallback]
expected: FAIL
[Removing a custom element from a detached shadow tree that belongs to the document must not enqueue and invoke disconnectedCallback]
expected: FAIL
[Removing the shadow host of a custom element from athe document of the template elements must enqueue and invoke disconnectedCallback]
expected: FAIL
[Removing a custom element from a detached shadow tree that belongs to the document of the template elements must not enqueue and invoke disconnectedCallback]
expected: FAIL
[Removing the shadow host of a custom element from aa new document must enqueue and invoke disconnectedCallback]
expected: FAIL
[Removing a custom element from a detached shadow tree that belongs to a new document must not enqueue and invoke disconnectedCallback]
expected: FAIL
[Removing the shadow host of a custom element from aa cloned document must enqueue and invoke disconnectedCallback]
expected: FAIL
[Removing a custom element from a detached shadow tree that belongs to a cloned document must not enqueue and invoke disconnectedCallback]
expected: FAIL
[Removing the shadow host of a custom element from aa document created by createHTMLDocument must enqueue and invoke disconnectedCallback]
expected: FAIL
[Removing a custom element from a detached shadow tree that belongs to a document created by createHTMLDocument must not enqueue and invoke disconnectedCallback]
expected: FAIL
[Removing the shadow host of a custom element from aan HTML document created by createDocument must enqueue and invoke disconnectedCallback]
expected: FAIL
[Removing a custom element from a detached shadow tree that belongs to an HTML document created by createDocument must not enqueue and invoke disconnectedCallback]
expected: FAIL
[Removing the shadow host of a custom element from athe document of an iframe must enqueue and invoke disconnectedCallback]
expected: FAIL
[Removing a custom element from a detached shadow tree that belongs to the document of an iframe must not enqueue and invoke disconnectedCallback]
expected: FAIL
[Removing the shadow host of a custom element from aan HTML document fetched by XHR must enqueue and invoke disconnectedCallback]
expected: FAIL
[Removing a custom element from a detached shadow tree that belongs to an HTML document fetched by XHR must not enqueue and invoke disconnectedCallback]
expected: FAIL

View file

@ -2,9 +2,6 @@
[Adding definition to global registry should not affect shadow roots using scoped registry]
expected: FAIL
[Adding definition to global registry should affect shadow roots also using global registry]
expected: FAIL
[Adding definition to scoped registry should affect all associated shadow roots]
expected: FAIL

View file

@ -13,6 +13,3 @@
[Event listeners are to be removed with immediate effect]
expected: FAIL
[Event listeners are to be removed from shadow trees as well]
expected: FAIL

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,4 @@
[getinnerhtml.tentative.html]
expected: TIMEOUT
[Element.getInnerHTML() on <a>]
expected: FAIL

View file

@ -1,2 +0,0 @@
[input-element-list.html]
expected: CRASH

View file

@ -1,2 +0,0 @@
[input-type-radio.html]
expected: CRASH

View file

@ -0,0 +1,3 @@
[window-frames.html]
[window.frames should not leak frames in Shadow DOM.]
expected: FAIL

View file

@ -1,2 +1,3 @@
[window-named-properties-001.html]
expected: TIMEOUT
[An iframe element in a shadow tree should not be accessible from window's named properties with its "name" attribute value.]
expected: FAIL