Skip to content

A selectedcontent element's option clones must not be options of its select - #77273

Open
annevk wants to merge 1 commit into
WebKit:mainfrom
annevk:eng/A-selectedcontent-element-s-option-clones-must-not-be-options-of-its-select
Open

annevk wants to merge 1 commit into
WebKit:mainfrom
annevk:eng/A-selectedcontent-element-s-option-clones-must-not-be-options-of-its-select

Conversation

@annevk

@annevk annevk commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

8d4efe2

A selectedcontent element's option clones must not be options of its select
https://bugs.webkit.org/show_bug.cgi?id=327828
rdar://190223089

Reviewed by NOBODY (OOPS!).

When a selected option's subtree contains a nested option, cloning it into a
selectedcontent element placed a cloned option into the select's list of
options. With a selected nested option this looped forever (each clone became
the selected option, re-running the update); without one, select.options still
wrongly included the clone.

A selectedcontent element only ever holds clones, on both the single and the
multiple selection paths, so treat it as such unconditionally.

Test: imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/selectedcontent-cloned-option-is-not-an-option.tentative.html

8d4efe2

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows Apple Internal
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 win ⏳ 🛠 ios-apple
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2 ⏳ 🧪 win-tests ⏳ 🛠 mac-apple
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 loading-orange 🧪 api-mac ✅ 🧪 api-wpe ⏳ 🛠 vision-apple
✅ 🧪 ios-wk2-wpt ⏳ 🧪 api-mac-debug
⏳ 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🛠 gtk3-gcc
loading 🛠 ios-safer-cpp ⏳ 🧪 mac-AS-debug-wk2 ✅ 🛠 gtk
✅ 🛠 vision ✅ 🧪 mac-wk2-stress ✅ 🧪 gtk-wk2
✅ 🛠 vision-sim ⏳ 🧪 mac-intel-wk2 ✅ 🧪 api-gtk
✅ 🧪 vision-wk2 ✅ 🛠 mac-safer-cpp ✅ 🛠 playstation
✅ 🛠 tv ✅ 🧪 mac-site-isolation
✅ 🛠 tv-sim
✅ 🛠 watch
✅ 🛠 watch-sim

…select

https://bugs.webkit.org/show_bug.cgi?id=327828
rdar://190223089

Reviewed by NOBODY (OOPS!).

When a selected option's subtree contains a nested option, cloning it into a
selectedcontent element placed a cloned option into the select's list of
options. With a selected nested option this looped forever (each clone became
the selected option, re-running the update); without one, select.options still
wrongly included the clone.

A selectedcontent element only ever holds clones, on both the single and the
multiple selection paths, so treat it as such unconditionally.

Test: imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/selectedcontent-cloned-option-is-not-an-option.tentative.html
@annevk annevk self-assigned this Oct 16, 2026
@annevk
annevk requested review from cdumez and rniwa as code owners October 16, 2026 14:02
@annevk annevk added the DOM For bugs specific to XML/HTML DOM elements (including parsing). label Oct 16, 2026
@annevk
annevk requested a review from nt1m October 16, 2026 15:00
@annevk annevk added the safe-merge-queue Applied to automatically send a pull-request to merge-queue after passing EWS checks label Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DOM For bugs specific to XML/HTML DOM elements (including parsing). safe-merge-queue Applied to automatically send a pull-request to merge-queue after passing EWS checks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants