Closed Bug 1864851 Opened 7 months ago Closed 7 months ago

[css-color] Hue longer interpolation method is incorrect when angles are equal

Categories

(Core :: CSS Parsing and Computation, defect)

defect

Tracking

()

RESOLVED FIXED
121 Branch
Tracking Status
firefox121 --- fixed

People

(Reporter: tlouw, Assigned: tlouw)

Details

Attachments

(1 file)

For example:

color-mix(in hsl longer hue, hsl(0, 100%, 50%), hue(0, 100%, 50%))

will result in:

hsl(0, 100%, 50%)

but should interpolate the hue around the longer side which is:

hsl(180, 100%, 50%)

There is a small discrepancy in the code here:
https://searchfox.org/mozilla-central/rev/7e60ac48dc5b3e3f06c1baf2a9a6e0352bd85c01/servo/components/style/color/mix.rs#407

The second if statement should be: delta <= 0. and not delta < 0

as per: https://drafts.csswg.org/css-color-4/#hue-longer

Component: Graphics: WebRender → CSS Parsing and Computation
Assignee: nobody → tlouw
Status: NEW → ASSIGNED
Pushed by tlouw@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/61082f7c029f
Fix the hue longer interpolation method. r=layout-reviewers,emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/43187 for changes under testing/web-platform/tests
Status: ASSIGNED → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 121 Branch
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: