Skip to content

script: Support shadowrootslotassignment on template elements#44246

Merged
simonwuelker merged 5 commits intoservo:mainfrom
simonwuelker:template-slotassignment
Apr 19, 2026
Merged

script: Support shadowrootslotassignment on template elements#44246
simonwuelker merged 5 commits intoservo:mainfrom
simonwuelker:template-slotassignment

Conversation

@simonwuelker
Copy link
Copy Markdown
Member

@simonwuelker simonwuelker commented Apr 15, 2026

This brings up to date with the specification for declarative shadow roots: whatwg/html#12267.

The shadowrootslotassignment attribute on <template> elements specifies the slot assignment mode used by the declarative shadow root created by the template.

Testing: New tests start to pass

@simonwuelker simonwuelker requested a review from gterzian as a code owner April 15, 2026 17:25
@servo-highfive servo-highfive added S-awaiting-review There is new code that needs to be reviewed. S-needs-rebase There are merge conflict errors. labels Apr 15, 2026
@simonwuelker simonwuelker force-pushed the template-slotassignment branch from 163e36c to c950cfd Compare April 15, 2026 17:28
@servo-highfive servo-highfive removed the S-needs-rebase There are merge conflict errors. label Apr 15, 2026
@simonwuelker simonwuelker added the T-linux-wpt Do a try run of the WPT label Apr 15, 2026
@github-actions github-actions Bot removed the T-linux-wpt Do a try run of the WPT label Apr 15, 2026
@github-actions
Copy link
Copy Markdown

🔨 Triggering try run (#24468619482) for Linux (WPT)

@github-actions
Copy link
Copy Markdown

⚠️ Try run (#24468619482) failed!

@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Apr 15, 2026
@simonwuelker simonwuelker force-pushed the template-slotassignment branch from 38b9196 to 8f899ea Compare April 15, 2026 17:58
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Apr 15, 2026
@simonwuelker simonwuelker force-pushed the template-slotassignment branch from 8f899ea to 6e2bf4e Compare April 15, 2026 18:01
@simonwuelker simonwuelker added the T-linux-wpt Do a try run of the WPT label Apr 15, 2026
@github-actions github-actions Bot removed the T-linux-wpt Do a try run of the WPT label Apr 15, 2026
@github-actions
Copy link
Copy Markdown

🔨 Triggering try run (#24470757042) for Linux (WPT)

@github-actions
Copy link
Copy Markdown

Test results for linux-wpt from try job (#24470757042):

Flaky unexpected result (38)
  • OK /IndexedDB/idbdatabase_deleteObjectStore.any.worker.html (#43776)
    • PASS [expected FAIL] subtest: Deleted object store's name should be removed from database's list. Attempting to use a deleted IDBObjectStore should throw an InvalidStateError
  • OK /IndexedDB/idbtransaction-oncomplete.any.worker.html (#42804)
    • FAIL [expected PASS] subtest: IDBTransaction - complete event

      assert_array_equals: lengths differ, expected array ["upgradeneeded", "complete", "success", "opencursor"] length 4, got ["upgradeneeded", "complete", "success"] length 3
      

  • OK /_mozilla/css/offset_properties_inline.html (#40543)
    • FAIL [expected PASS] subtest: offsetTop

      assert_equals: offsetTop of #inline-1 should be 0. expected 0 but got -1
      

    • FAIL [expected PASS] subtest: offsetLeft

      assert_equals: offsetLeft of #inline-2 should be 40. expected 40 but got 25
      

  • ERROR [expected CRASH] /_webgl/conformance2/textures/misc/tex-3d-size-limit.html (#42881)
    • PASS [expected FAIL] subtest: WebGL test #1
    • FAIL [expected PASS] subtest: WebGL test #3

      assert_true: getError expected: INVALID_VALUE. Was NO_ERROR : texImage3D should fail for dimension out of range. expected true got false
      

    • FAIL [expected PASS] subtest: WebGL test #4

      assert_true: getError expected: INVALID_VALUE. Was NO_ERROR : texImage3D should fail for dimension out of range. expected true got false
      

    • FAIL [expected PASS] subtest: WebGL test #5

      assert_true: getError expected: INVALID_VALUE. Was NO_ERROR : texImage3D should fail for dimension out of range. expected true got false
      

    • FAIL [expected PASS] subtest: WebGL test #6

      assert_true: getError expected: INVALID_VALUE. Was NO_ERROR : texImage3D should fail for dimension out of range. expected true got false
      

    • FAIL [expected PASS] subtest: WebGL test #7

      assert_true: getError expected: INVALID_VALUE. Was NO_ERROR : texImage3D should fail for dimension out of range. expected true got false
      

    • FAIL [expected PASS] subtest: WebGL test #8

      assert_true: getError expected: INVALID_VALUE. Was NO_ERROR : texImage3D should fail for dimension out of range. expected true got false
      

    • FAIL [expected PASS] subtest: WebGL test #9

      assert_true: getError expected: INVALID_VALUE. Was NO_ERROR : texImage3D should fail for dimension out of range. expected true got false
      

    • FAIL [expected PASS] subtest: WebGL test #10

      assert_true: getError expected: INVALID_VALUE. Was NO_ERROR : texImage3D should fail for dimension out of range. expected true got false
      

    • FAIL [expected PASS] subtest: WebGL test #11

      assert_true: getError expected: INVALID_VALUE. Was NO_ERROR : texImage3D should fail for dimension out of range. expected true got false
      

    • And 27 more unexpected results...
  • CRASH [expected OK] /content-security-policy/meta/sandbox-iframe.html (#43478)
  • FAIL [expected PASS] /css/css-backgrounds/background-size-042.html
  • OK /css/css-cascade/layer-font-face-override.html (#35935)
    • PASS [expected FAIL] subtest: @font-face override update with appended sheet 1
    • PASS [expected FAIL] subtest: @font-face override update with appended sheet 2
  • FAIL [expected PASS] /css/css-ui/appearance-menulist-button-001.html
  • FAIL [expected PASS] /css/css-ui/compute-kind-widget-generated/grouped-kind-of-widget-fallback-border-block-start-style-001.html
  • FAIL [expected PASS] /css/css-ui/compute-kind-widget-generated/grouped-kind-of-widget-fallback-border-image-source-001.html
  • FAIL [expected PASS] /css/css-ui/compute-kind-widget-generated/kind-of-widget-fallback-radio-input-border-block-end-width-001.html
  • FAIL [expected PASS] /css/css-ui/webkit-appearance-menulist-001.html
  • CRASH [expected OK] /fetch/api/cors/cors-cookies.any.html
  • CRASH [expected OK] /fetch/api/headers/headers-no-cors.any.worker.html
  • OK /fetch/metadata/generated/css-font-face.https.sub.tentative.html (#32732)
    • PASS [expected FAIL] subtest: sec-fetch-mode
    • PASS [expected FAIL] subtest: sec-fetch-storage-access - Cross-site
    • PASS [expected FAIL] subtest: sec-fetch-storage-access - Same site
  • OK /fetch/metadata/generated/css-font-face.sub.tentative.html (#34624)
    • PASS [expected FAIL] subtest: sec-fetch-storage-access - Not sent to non-trustworthy same-site destination
  • OK /fetch/metadata/window-open.https.sub.html (#40339)
    • FAIL [expected PASS] subtest: Cross-site window, forced, reloaded

      The operation is insecure.
      

  • OK /html/browsers/history/the-history-interface/traverse_the_history_4.html (#21383)
    • FAIL [expected PASS] subtest: Multiple history traversals, last would be aborted

      assert_array_equals: Pages opened during history navigation expected property 1 to be 5 but got 3 (expected array [6, 5] got [6, 3])
      

  • OK /html/browsers/history/the-history-interface/traverse_the_history_5.html (#21383)
    • FAIL [expected PASS] subtest: Multiple history traversals, last would be aborted

      assert_array_equals: Pages opened during history navigation expected property 1 to be 5 but got 3 (expected array [6, 5] got [6, 3])
      

  • CRASH [expected OK] /html/browsers/history/the-location-interface/assign-replace-from-iframe.html
  • CRASH [expected OK] /html/browsers/the-window-object/window-open-noopener.html?_top
  • OK /html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/allow-scripts-flag-changing-1.html (#39694)
    • FAIL [expected PASS] subtest: Meta refresh is blocked by the allow-scripts sandbox flag at its creation time, not when refresh comes due

      uncaught exception: Error: assert_unreached: The iframe from which the meta came from must not refresh Reached unreachable code
      

  • TIMEOUT [expected OK] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_other_frame_popup.sub.html (#39702)
    • TIMEOUT [expected FAIL] subtest: Sandboxed iframe can not navigate other frame's popup

      Test timed out
      

  • TIMEOUT [expected OK] /html/semantics/forms/form-submission-0/form-submit-iframe-then-location-navigate.html (#29634)
    • TIMEOUT [expected FAIL] subtest: Verifies that location navigations take precedence when following form submissions.

      Test timed out
      

  • OK /html/semantics/forms/form-submission-0/jsurl-form-submit.tentative.html (#36489)
    • PASS [expected FAIL] subtest: Verifies that form submissions scheduled inside javascript: urls take precedence over the javascript: url's return value.
  • CRASH [expected ERROR] /html/semantics/forms/the-select-element/customizable-select/select-appearance-button-after-span.html
  • OK /html/semantics/scripting-1/the-script-element/module/dynamic-import/blob-url.any.html (#33948)
    • FAIL [expected PASS] subtest: Revoking a blob URL immediately after calling import will not fail

      promise_test: Unhandled rejection with value: object "TypeError: Module fetching failed"
      

  • TIMEOUT [expected OK] /html/user-activation/navigation-state-reset-sameorigin.html
    • TIMEOUT [expected PASS] subtest: Post-navigation state reset.

      Test timed out
      

  • OK /mixed-content/tentative/autoupgrades/video-upgrade.https.sub.html (#41135)
    • FAIL [expected PASS] subtest: Video of other host autoupgraded

      assert_equals: Length. Other host expected 1 but got Infinity
      

  • FAIL [expected PASS] /png/apng/fcTL-dispose-previous.html (#41561)
  • TIMEOUT [expected OK] /pointerevents/compat/pointerevent_touch-action_two-finger_interaction.html
    • NOTRUN [expected PASS] subtest: touch two-finger pan on 'touch-action: pan-x pan-y'
    • NOTRUN [expected FAIL] subtest: touch two-finger pan on 'touch-action: pinch-zoom'
  • OK /preload/prefetch-document.html (#37210)
    • FAIL [expected PASS] subtest: different-site document prefetch with 'as=document' should not be consumed

      assert_equals: expected 2 but got 1
      

  • OK /resource-timing/test_resource_timing.https.html (#25216)
    • PASS [expected FAIL] subtest: PerformanceEntry has correct name, initiatorType, startTime, and duration (link)
  • OK [expected TIMEOUT] /trusted-types/trusted-types-navigation.html?01-05 (#38975)
    • PASS [expected TIMEOUT] subtest: Navigate a window via anchor with javascript:-urls in report-only mode.
    • PASS [expected NOTRUN] subtest: Navigate a window via anchor with javascript:-urls w/ default policy in report-only mode.
    • PASS [expected NOTRUN] subtest: Navigate a frame via anchor with javascript:-urls in enforcing mode.
  • TIMEOUT /trusted-types/trusted-types-navigation.html?06-10 (#37920)
    • TIMEOUT [expected FAIL] subtest: Navigate a frame via anchor with javascript:-urls in report-only mode.

      Test timed out
      

    • NOTRUN [expected TIMEOUT] subtest: Navigate a frame via anchor with javascript:-urls w/ default policy in report-only mode.
  • OK /wasm/webapi/abort.any.worker.html (#40013)
    • FAIL [expected PASS] subtest: compileStreaming() asynchronously racing with abort should succeed or reject with AbortError

      assert_equals: expected "AbortError" but got "CompileError"
      

  • OK [expected ERROR] /webxr/render_state_update.https.html (#27535)
  • CRASH [expected OK] /workers/constructors/Worker/use-base-url.html
Stable unexpected results that are known to be intermittent (15)
  • OK /IndexedDB/idbdatabase_deleteObjectStore.any.html (#43823)
    • PASS [expected FAIL] subtest: Deleted object store's name should be removed from database's list. Attempting to use a deleted IDBObjectStore should throw an InvalidStateError
  • TIMEOUT [expected OK] /_mozilla/mozilla/window_resize_event.html (#36741)
    • TIMEOUT [expected PASS] subtest: Popup onresize event fires after resizeTo

      Test timed out
      

  • OK [expected ERROR] /_webgl/conformance2/textures/misc/origin-clean-conformance-offscreencanvas.html (#29589)
    • PASS [expected NOTRUN] subtest: Overall test
  • OK /css/css-fonts/generic-family-keywords-001.html (#37467)
    • PASS [expected FAIL] subtest: @font-face matching for quoted and unquoted generic(kai)
  • OK /css/css-fonts/generic-family-keywords-003.html (#38994)
    • FAIL [expected PASS] subtest: @font-face matching for quoted and unquoted fantasy (drawing text in a canvas)

      assert_equals: quoted fantasy matches  @font-face rule expected 125 but got 40
      

    • FAIL [expected PASS] subtest: @font-face matching for quoted and unquoted system-ui (drawing text in a canvas)

      assert_equals: quoted system-ui matches  @font-face rule expected 125 but got 40
      

    • FAIL [expected PASS] subtest: @font-face matching for quoted and unquoted generic(fangsong) (drawing text in a canvas)

      assert_equals: quoted generic(fangsong) matches  @font-face rule expected 125 but got 40
      

    • FAIL [expected PASS] subtest: @font-face matching for quoted and unquoted generic(khmer-mul) (drawing text in a canvas)

      assert_equals: unquoted generic(khmer-mul) does not match @font-face rule expected 40 but got 125
      

    • PASS [expected FAIL] subtest: @font-face matching for quoted and unquoted generic(nastaliq) (drawing text in a canvas)
    • FAIL [expected PASS] subtest: @font-face matching for quoted and unquoted ui-serif (drawing text in a canvas)

      assert_equals: unquoted ui-serif does not match @font-face rule expected 40 but got 125
      

    • FAIL [expected PASS] subtest: @font-face matching for quoted and unquoted ui-sans-serif (drawing text in a canvas)

      assert_equals: quoted ui-sans-serif matches  @font-face rule expected 125 but got 40
      

  • OK /dom/nodes/moveBefore/iframe-document-preserve.window.html (#43152)
    • FAIL [expected PASS] subtest: moveBefore(): cross-origin iframe is preserved: remove self

      assert_equals: iframe does not fire a second load event expected 1 but got 0
      

  • OK [expected ERROR] /fetch/fetch-later/quota/same-origin-iframe/accumulated-oversized-payload.https.window.html (#41705)
  • ERROR [expected OK] /fetch/fetch-later/quota/same-origin-iframe/multiple-iframes.https.window.html (#35176)
  • TIMEOUT /fetch/metadata/generated/css-images.https.sub.tentative.html (#42229)
    • FAIL [expected PASS] subtest: content sec-fetch-site - Same-Origin -&gt; Same Origin

      assert_unreached: Reached unreachable code
      

  • ERROR [expected OK] /focus/focus-event-after-switching-iframes.sub.html (#40368)
  • OK [expected TIMEOUT] /html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/form-submit.html (#44028)
  • TIMEOUT /html/interaction/focus/the-autofocus-attribute/supported-elements.html (#24145)
    • TIMEOUT [expected FAIL] subtest: Element with tabindex should support autofocus

      Test timed out
      

    • NOTRUN [expected PASS] subtest: Non-HTMLElement should not support autofocus
  • OK /mixed-content/tentative/autoupgrades/mixed-content-cors.https.sub.html (#41123)
    • PASS [expected FAIL] subtest: Cross-Origin video should get upgraded even if CORS is set
  • TIMEOUT [expected OK] /trusted-types/trusted-types-navigation.html?26-30 (#38807)
    • TIMEOUT [expected PASS] subtest: Navigate a window via form-submission with javascript:-urls in report-only mode.

      Test timed out
      

    • NOTRUN [expected PASS] subtest: Navigate a window via form-submission with javascript:-urls w/ default policy in report-only mode.
    • NOTRUN [expected PASS] subtest: Navigate a frame via form-submission with javascript:-urls in enforcing mode.
    • NOTRUN [expected PASS] subtest: Navigate a frame via form-submission with javascript:-urls w/ default policy in enforcing mode.
  • OK /trusted-types/trusted-types-reporting.html (#43737)
    • PASS [expected FAIL] subtest: Trusted Type violation report: creating a forbidden-but-not-reported policy.
    • PASS [expected FAIL] subtest: Trusted Type violation report: sample for SVGScriptElement href assignment by setAttribute
    • PASS [expected FAIL] subtest: Trusted Type violation report: Worker constructor

@github-actions
Copy link
Copy Markdown

✨ Try run (#24470757042) succeeded.

@simonwuelker simonwuelker force-pushed the template-slotassignment branch from 6e2bf4e to dd10a65 Compare April 18, 2026 23:49
@codecov-commenter
Copy link
Copy Markdown

❌ 4 Tests Failed:

Tests completed Failed Passed Skipped
906 4 902 0
View the top 3 failed test(s) by shortest run time
servo-net::main::cookie::test_cookie_eviction_all_nonsecure_new_secure
Stack Traces | 0.008s run time
thread 'cookie::test_cookie_eviction_all_nonsecure_new_secure' (50119) panicked at .../net/tests/cookie.rs:493:5:
assertion `left == right` failed
  left: "foo=bar"
 right: "extra2=bar; extra3=bar; extra4=bar; extra5=bar; foo=bar"
stack backtrace:
   0: __rustc::rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::panicking::assert_failed_inner
   3: core::panicking::assert_failed
   4: main::cookie::test_cookie_eviction_all_nonsecure_new_secure
   5: core::ops::function::FnOnce::call_once
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
servo-net::main::cookie::test_cookie_eviction_all_secure_new_nonsecure
Stack Traces | 0.008s run time
thread 'cookie::test_cookie_eviction_all_secure_new_nonsecure' (50120) panicked at .../net/tests/cookie.rs:474:5:
assertion `left == right` failed
  left: "foo=bar"
 right: "extra1=bar; extra2=bar; extra3=bar; extra4=bar; extra5=bar"
stack backtrace:
   0: __rustc::rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::panicking::assert_failed_inner
   3: core::panicking::assert_failed
   4: main::cookie::test_cookie_eviction_all_secure_new_nonsecure
   5: core::ops::function::FnOnce::call_once
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
servo-net::main::cookie::test_cookie_eviction_all_secure_one_nonsecure
Stack Traces | 0.008s run time
thread 'cookie::test_cookie_eviction_all_secure_one_nonsecure' (50122) panicked at .../net/tests/cookie.rs:452:5:
assertion `left == right` failed
  left: "foo2=bar"
 right: "extra1=bar; extra2=bar; extra3=bar; extra4=bar; foo2=bar"
stack backtrace:
   0: __rustc::rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::panicking::assert_failed_inner
   3: core::panicking::assert_failed
   4: main::cookie::test_cookie_eviction_all_secure_one_nonsecure
   5: core::ops::function::FnOnce::call_once
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
servo-net::main::cookie::test_cookie_eviction_all_nonsecure_new_nonsecure
Stack Traces | 0.009s run time
thread 'cookie::test_cookie_eviction_all_nonsecure_new_nonsecure' (50117) panicked at .../net/tests/cookie.rs:512:5:
assertion `left == right` failed
  left: "foo=bar"
 right: "extra2=bar; extra3=bar; extra4=bar; extra5=bar; foo=bar"
stack backtrace:
   0: __rustc::rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::panicking::assert_failed_inner
   3: core::panicking::assert_failed
   4: main::cookie::test_cookie_eviction_all_nonsecure_new_nonsecure
   5: core::ops::function::FnOnce::call_once
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@simonwuelker simonwuelker enabled auto-merge April 19, 2026 00:08
@TimvdLippe
Copy link
Copy Markdown
Contributor

main was broken. A simple rebase should suffice to merge this PR.

@simonwuelker simonwuelker disabled auto-merge April 19, 2026 08:30
@simonwuelker simonwuelker force-pushed the template-slotassignment branch from 5754ab0 to 0807b13 Compare April 19, 2026 08:38
@simonwuelker simonwuelker enabled auto-merge April 19, 2026 08:38
@simonwuelker simonwuelker added this pull request to the merge queue Apr 19, 2026
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Apr 19, 2026
@servo-highfive servo-highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Apr 19, 2026
@simonwuelker simonwuelker added this pull request to the merge queue Apr 19, 2026
@servo-highfive servo-highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-tests-failed The changes caused existing tests to fail. labels Apr 19, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 19, 2026
@servo-highfive servo-highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Apr 19, 2026
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
@simonwuelker simonwuelker force-pushed the template-slotassignment branch from 0807b13 to da1c659 Compare April 19, 2026 10:57
@servo-highfive servo-highfive removed the S-tests-failed The changes caused existing tests to fail. label Apr 19, 2026
@simonwuelker simonwuelker enabled auto-merge April 19, 2026 10:58
@simonwuelker simonwuelker added this pull request to the merge queue Apr 19, 2026
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Apr 19, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 19, 2026
@servo-highfive servo-highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Apr 19, 2026
@simonwuelker
Copy link
Copy Markdown
Member Author

simonwuelker commented Apr 19, 2026

Blocked on #44344 (comment)

@simonwuelker
Copy link
Copy Markdown
Member Author

Lets try again now that #44280 is open again

@simonwuelker simonwuelker added this pull request to the merge queue Apr 19, 2026
@servo-highfive servo-highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-tests-failed The changes caused existing tests to fail. labels Apr 19, 2026
Merged via the queue into servo:main with commit 18d3ad5 Apr 19, 2026
36 checks passed
@simonwuelker simonwuelker deleted the template-slotassignment branch April 19, 2026 15:23
@servo-highfive servo-highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Apr 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-awaiting-review There is new code that needs to be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants