Bug 245552

Summary: Hue interpolation "specified" is not correctly implemented for hues < 0 or > 360
Product: WebKit Reporter: Sam Weinig <sam>
Component: CSSAssignee: Sam Weinig <sam>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Test case
none
Existing top / With fix bottom none

Sam Weinig
Reported 2022-09-22 19:26:52 PDT
We currently normalize hues (for CSS color functions hsl(), hwb(), lch(), and oklch()) to aggressively, and should instead be deferring normalization (hue % 360) until necessary, either because a conversation or interpolation method requires it. This should allow us to implement the "specified" hue interpolation method, which allows for the hue to circle the spectrum multiple times if necessary (i.e. 0 -> 720 would be two revolutions).
Attachments
Test case (211 bytes, text/html)
2022-09-22 19:40 PDT, Sam Weinig
no flags
Existing top / With fix bottom (741.48 KB, image/png)
2022-09-22 19:41 PDT, Sam Weinig
no flags
Sam Weinig
Comment 1 2022-09-22 19:40:11 PDT
Created attachment 462553 [details] Test case
Sam Weinig
Comment 2 2022-09-22 19:41:39 PDT
Created attachment 462554 [details] Existing top / With fix bottom
Radar WebKit Bug Importer
Comment 3 2022-09-23 16:11:23 PDT
Sam Weinig
Comment 4 2022-09-23 16:24:25 PDT
EWS
Comment 5 2022-09-24 19:25:34 PDT
Committed 254833@main (cf0675f3297a): <https://commits.webkit.org/254833@main> Reviewed commits have been landed. Closing PR #4654 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.