Bug 235247 - Clarify / Optimize <select> logic given that deeply nested <option> or <optgroup> are not supported
Summary: Clarify / Optimize <select> logic given that deeply nested <option> or <optgr...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks: 235237
  Show dependency treegraph
 
Reported: 2022-01-14 13:05 PST by Chris Dumez
Modified: 2022-01-14 14:48 PST (History)
9 users (show)

See Also:


Attachments
Patch (12.30 KB, patch)
2022-01-14 13:08 PST, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2022-01-14 13:05:35 PST
Clarify / Optimize <select> logic given that deeply nested <option> or <optgroup> are not supported, as per specification.

An <option> is only associated with a <select> element if it is either a child of the <select> or a child of an <optgroup> that is itself a child of the <select>:
- https://html.spec.whatwg.org/multipage/form-elements.html#concept-select-option-list

As a result, an <optgroup> is only associated with a <select> element if it is a child of that <select>.
Comment 1 Chris Dumez 2022-01-14 13:08:13 PST
Created attachment 449210 [details]
Patch
Comment 2 Geoffrey Garen 2022-01-14 13:13:39 PST
Comment on attachment 449210 [details]
Patch

r=me
Comment 3 EWS 2022-01-14 14:47:53 PST
Committed r288033 (246059@main): <https://commits.webkit.org/246059@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 449210 [details].
Comment 4 Radar WebKit Bug Importer 2022-01-14 14:48:26 PST
<rdar://problem/87619558>