LibWeb: Add HTMLSelectedContentElement for customizable select

Introduce the HTMLSelectedContentElement and integrate it into
<select>, <option> and HTMLParser.

See whatwg/html#10548.

There are two bugs with WPT tests which causes the third subtest
in selectedcontent.html and selectedcontent-mutations.html fail.
See whatwg/html#11882, web-platform-tests/wpt#55849.
This commit is contained in:
Feng Yu
2025-12-07 16:37:54 -08:00
committed by Sam Atkins
parent 89d50befb0
commit b58fcaeecf
Notes: github-actions[bot] 2025-12-12 12:07:51 +00:00
25 changed files with 945 additions and 205 deletions

View File

@@ -0,0 +1,6 @@
Harness status: OK
Found 1 tests
1 Fail
Fail MutationObserver records during parsing of <select> with <selectedcontent>

View File

@@ -0,0 +1,9 @@
Harness status: OK
Found 3 tests
1 Pass
2 Fail
Fail The <selectedcontent> element should reflect the HTML contents of the selected <option>.
Pass When there are multiple <selectedcontent> elements, only the one in tree order should be kept up to date.
Fail <seletedcontent> behavior in disconnected <select>.