Fix: Slot Assignment mode according to the spec (#36620)

When parsing a Declarative Shadow DOM, the slot assignment isn't being
triggered as mentioned in the
[spec](https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inhead:~:text=Attach%20a%20shadow%20root%20with%20declarative%20shadow%20host%20element%2C%20mode%2C%20clonable%2C%20serializable%2C%20delegatesFocus%2C%20%22named%22%2C%20and%20registry.).

When creating a shadow root declaratively, SlotAssignment mode was set
to "manual" instead of "named".

Tests: The followings should get fully passed with this change, so
`.ini`s are removed.
 - `declarative-shadow-dom-basic.html` 
 - `declarative-shadow-dom-write-to-iframe.html`
 - `declarative-shadow-dom-repeats.html`

Fixes: #36100

---------

Signed-off-by: saku <saku@email.sakupi01.com>
This commit is contained in:
saku 2025-04-21 01:09:31 +09:00 committed by GitHub
parent 2366a67260
commit 436dee8450
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 1 additions and 13 deletions

View file

@ -1462,7 +1462,7 @@ impl TreeSink for Sink {
clonable,
serializable,
delegatesfocus,
SlotAssignmentMode::Manual,
SlotAssignmentMode::Named,
CanGc::note(),
) {
Ok(shadow_root) => {

View file

@ -1,6 +0,0 @@
[declarative-shadow-dom-basic.html]
[Declarative Shadow DOM: Basic test]
expected: FAIL
[Declarative Shadow DOM: Fragment parser basic test]
expected: FAIL

View file

@ -1,3 +0,0 @@
[declarative-shadow-dom-repeats.html]
[Calling attachShadow() on declarative shadow root must match all parameters]
expected: FAIL

View file

@ -1,3 +0,0 @@
[declarative-shadow-dom-write-to-iframe.html]
[`document.write` on inner iframe handles declarative shadow DOM]
expected: FAIL