Bug 249351

Summary: [CSS-Typed-OM] Reification of non-list valued properties is incorrect
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: CSSAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 175733    

Description Chris Dumez 2022-12-14 16:27:32 PST
During reification of CSSValues, if encountering a CSSValueList, we would:
1. Return the first value in the list for StylePropertyMap.get()
2. Return each item in the list in an array for StylePropertyMap.getAll()

However, we're only supposed to do this if he property is a list-valued property [1][2]. For non-list valued properties, we're should:
1. Return a generic CSSStyleValue wrapping the list for StylePropertyMap.get()
2. Return an array containing a single item that is a generic CSSStyleValue wrapping the list, for StylePropertyMap.getAll()

See:
[1] https://drafts.css-houdini.org/css-typed-om/#list-valued-properties
[2] https://drafts.css-houdini.org/css-typed-om/#reify-stylevalue
Comment 1 Chris Dumez 2022-12-14 16:39:36 PST
Pull request: https://github.com/WebKit/WebKit/pull/7651
Comment 2 EWS 2022-12-15 09:19:08 PST
Committed 257927@main (1d99a936a0db): <https://commits.webkit.org/257927@main>

Reviewed commits have been landed. Closing PR #7651 and removing active labels.
Comment 3 Radar WebKit Bug Importer 2022-12-15 09:20:27 PST
<rdar://problem/103405986>