Bug 245552 - Hue interpolation "specified" is not correctly implemented for hues < 0 or > 360
Summary: Hue interpolation "specified" is not correctly implemented for hues < 0 or > 360
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sam Weinig
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-09-22 19:26 PDT by Sam Weinig
Modified: 2022-09-24 19:25 PDT (History)
1 user (show)

See Also:


Attachments
Test case (211 bytes, text/html)
2022-09-22 19:40 PDT, Sam Weinig
no flags Details
Existing top / With fix bottom (741.48 KB, image/png)
2022-09-22 19:41 PDT, Sam Weinig
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Weinig 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).
Comment 1 Sam Weinig 2022-09-22 19:40:11 PDT
Created attachment 462553 [details]
Test case
Comment 2 Sam Weinig 2022-09-22 19:41:39 PDT
Created attachment 462554 [details]
Existing top / With fix bottom
Comment 3 Radar WebKit Bug Importer 2022-09-23 16:11:23 PDT
<rdar://problem/100344615>
Comment 4 Sam Weinig 2022-09-23 16:24:25 PDT
Pull request: https://github.com/WebKit/WebKit/pull/4654
Comment 5 EWS 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.