Skip to content

Commit

Permalink
none values should be treated as 0 during conversion
Browse files Browse the repository at this point in the history
This fixes a test where serializing `none` values should be treated as
`0` for hsl and hwb.

See: #42677

Differential Revision: https://phabricator.services.mozilla.com/D191691

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1860661
gecko-commit: 5ff1ceab2635be491fdda5ca61c10560f732ba39
gecko-reviewers: jwatt
  • Loading branch information
tiaanl authored and moz-wptsync-bot committed Oct 24, 2023
1 parent c1f15ed commit 892583e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions css/css-color/parsing/color-computed-color-mix-function.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
fuzzy_test_computed_color(`color-mix(in hsl decreasing hue, hsl(20deg 50% 50%), hsl(320deg 50% 50%))`, `color(srgb 0.75 0.25 0.333333)`);
fuzzy_test_computed_color(`color-mix(in hsl decreasing hue, hsl(320deg 50% 50%), hsl(20deg 50% 50%))`, `color(srgb 0.25 0.75 0.666667)`);

fuzzy_test_computed_color(`color-mix(in hsl, hsl(none none none), hsl(none none none))`, `color(srgb none none none)`);
fuzzy_test_computed_color(`color-mix(in hsl, hsl(none none none), hsl(none none none))`, `color(srgb 0 0 0)`);
fuzzy_test_computed_color(`color-mix(in hsl, hsl(none none none), hsl(30deg 40% 80%))`, `color(srgb 0.88 0.8 0.72)`);
fuzzy_test_computed_color(`color-mix(in hsl, hsl(120deg 20% 40%), hsl(none none none))`, `color(srgb 0.32 0.48 0.32)`);
fuzzy_test_computed_color(`color-mix(in hsl, hsl(120deg 20% none), hsl(30deg 40% 60%))`, `color(srgb 0.66 0.72 0.48)`);
Expand Down Expand Up @@ -149,7 +149,7 @@
fuzzy_test_computed_color(`color-mix(in hwb decreasing hue, hwb(20deg 30% 40%), hwb(320deg 30% 40%))`, `color(srgb 0.6 0.3 0.35)`);
fuzzy_test_computed_color(`color-mix(in hwb decreasing hue, hwb(320deg 30% 40%), hwb(20deg 30% 40%))`, `color(srgb 0.3 0.6 0.55)`);

fuzzy_test_computed_color(`color-mix(in hwb, hwb(none none none), hwb(none none none))`, `color(srgb none none none)`);
fuzzy_test_computed_color(`color-mix(in hwb, hwb(none none none), hwb(none none none))`, `color(srgb 1 0 0)`);
fuzzy_test_computed_color(`color-mix(in hwb, hwb(none none none), hwb(30deg 30% 40%))`, `color(srgb 0.6 0.45 0.3)`);
fuzzy_test_computed_color(`color-mix(in hwb, hwb(120deg 10% 20%), hwb(none none none))`, `color(srgb 0.1 0.8 0.1)`);
fuzzy_test_computed_color(`color-mix(in hwb, hwb(120deg 10% none), hwb(30deg 30% 40%))`, `color(srgb 0.5 0.6 0.2)`);
Expand Down

0 comments on commit 892583e

Please sign in to comment.