Don't run disconnected callback on already disconnected custom elements (#35883)

* Add missing step 11 of remove a node algorithm

Signed-off-by: Xiaocheng Hu <xiaochengh.work@gmail.com>

* Rebaseline tests

Signed-off-by: Xiaocheng Hu <xiaochengh.work@gmail.com>

---------

Signed-off-by: Xiaocheng Hu <xiaochengh.work@gmail.com>
This commit is contained in:
Xiaocheng Hu 2025-03-13 19:07:08 +08:00 committed by GitHub
parent 2ccb818a60
commit 3b724d5bbf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 38 additions and 52 deletions

View file

@ -2,9 +2,6 @@
[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
[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

View file

@ -1,24 +0,0 @@
[disconnected-callbacks.html]
[Removing a custom element from a detached shadow tree that belongs to the document must not 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 a custom element from a detached shadow tree that belongs to a new document must not 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 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 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 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 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

@ -1,6 +0,0 @@
[enqueue-custom-element-callback-reactions-inside-another-callback.html]
[Connecting a element with connectedCallback while it has a disconnectedCallback in its custom element reaction queue must result in disconnectedCallback getting invoked before the insertion completes]
expected: FAIL
[Connecting an element without connectedCallback while it has a disconnectedCallback in its custom element reaction queue must not result in disconnectedCallback getting invoked before the insertion completes]
expected: FAIL