Bug 235247

Summary: Clarify / Optimize <select> logic given that deeply nested <option> or <optgroup> are not supported
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: FormsAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, changseok, esprehn+autocc, ews-watchlist, ggaren, gyuyoung.kim, mifenton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 235237    
Attachments:
Description Flags
Patch none

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>