Bug 249351 - [CSS-Typed-OM] Reification of non-list valued properties is incorrect
Summary: [CSS-Typed-OM] Reification of non-list valued properties is incorrect
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks: 175733
  Show dependency treegraph
 
Reported: 2022-12-14 16:27 PST by Chris Dumez
Modified: 2022-12-15 09:20 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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>