Skip to content

WebKit export of https://bugs.webkit.org/show_bug.cgi?id=334318 - #66138

Open
annevk wants to merge 1 commit into
web-platform-tests:masterfrom
annevk:wpt-export-for-webkit-334318
Open

annevk wants to merge 1 commit into
web-platform-tests:masterfrom
annevk:wpt-export-for-webkit-334318

Conversation

@annevk

@annevk annevk commented Dec 4, 2026

Copy link
Copy Markdown
Member

WebKit export from bug: Clone the options of <select multiple> into <selectedcontent> when HTML does

Clone the options of <select multiple> into <selectedcontent> when HTML does

whatwg/html#12430 specified <selectedcontent> for
<select multiple>, and WebKit clones the options at other times:

- Inserting a <selectedcontent> cloned into that element only, so the other
  ones could stay stale, and inserting options in the same call cloned again
  in a microtask. Now it queues an update and performs it from its
  post-connection steps, as for a <select> without multiple. Options queue
  from their insertion steps.
- While the <select> is parsed, nothing is cloned or queued.
  finishParsingChildren() clones once, also when the <select> isn't
  connected.

Also hide unchecked options in the <selectedcontent> of any <select>, as HTML
does.

Import the upstream <selectedcontent> tests that changed. selectedcontent.html
asserted that setting option.selected without changing selectedness leaves
<selectedcontent> alone, which contradicts HTML; correct it here and upstream.

WebKit-Bug: https://bugs.webkit.org/show_bug.cgi?id=334318

…ML does

whatwg/html#12430 specified <selectedcontent> for
<select multiple>, and WebKit clones the options at other times:

- Inserting a <selectedcontent> cloned into that element only, so the other
  ones could stay stale, and inserting options in the same call cloned again
  in a microtask. Now it queues an update and performs it from its
  post-connection steps, as for a <select> without multiple. Options queue
  from their insertion steps.
- While the <select> is parsed, nothing is cloned or queued.
  finishParsingChildren() clones once, also when the <select> isn't
  connected.

Also hide unchecked options in the <selectedcontent> of any <select>, as HTML
does.

Import the upstream <selectedcontent> tests that changed. selectedcontent.html
asserted that setting option.selected without changing selectedness leaves
<selectedcontent> alone, which contradicts HTML; correct it here and upstream.

WebKit-Bug: https://bugs.webkit.org/show_bug.cgi?id=334318
@annevk annevk self-assigned this Dec 4, 2026
@annevk
annevk enabled auto-merge (rebase) December 4, 2026 12:12
@wpt-pr-bot wpt-pr-bot added the html label Dec 4, 2026
@wpt-pr-bot

Copy link
Copy Markdown
Collaborator

This patch has been exported from WebKit; it will be approved automatically once the downstream patch is r+.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants