Bug 245276

Summary: Update CSS Color parsing and serialization to match the current spec
Product: WebKit Reporter: Sam Weinig <sam>
Component: CSSAssignee: Sam Weinig <sam>
Status: RESOLVED FIXED    
Severity: Normal CC: karlcow, ntim, webkit-bug-importer
Priority: P2 Keywords: BrowserCompat, InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   

Description Sam Weinig 2022-09-16 08:31:51 PDT
CSS Color 4 has made a few parsing and serialization changes we should match:

- lch/lab/oklch/oklab all now take percent or number for all the non-hue components (with some new normalization / scaling rules for the percents)
- lch/lab/oklch/oklab all now serialize using the numeric form for all non-hue components.

Since we now want to serialize using the numeric form, we can also use this opportunity to remove the extra multiplications and divisions by 100 for oklch/oklab that we had to keep lightness as a percent, and just always keep it in the numeric form.
Comment 1 Radar WebKit Bug Importer 2022-09-16 08:40:45 PDT
<rdar://problem/100028649>
Comment 2 Sam Weinig 2022-09-16 09:33:51 PDT
Pull request: https://github.com/WebKit/WebKit/pull/4419
Comment 3 Tim Nguyen (:ntim) 2022-09-16 10:17:07 PDT
*** Bug 245134 has been marked as a duplicate of this bug. ***
Comment 4 EWS 2022-09-20 12:04:37 PDT
Committed 254688@main (8913e90d9b69): <https://commits.webkit.org/254688@main>

Reviewed commits have been landed. Closing PR #4419 and removing active labels.