Closed Bug 1793479 Opened 4 years ago Closed 4 years ago

[wpt-sync] Sync PR 36233 - Add image reference tests for gradient interpolation spaces

Categories

(Core :: Layout: Images, Video, and HTML Frames, task, P4)

task

Tracking

()

RESOLVED FIXED
108 Branch
Tracking Status
firefox108 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 36233 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/36233
Details from upstream follow.

Aaron Krajeski <aaronhk@chromium.org> wrote:

Add image reference tests for gradient interpolation spaces

https://www.w3.org/TR/css-color-4/#interpolation

All of these tests are fuzzy with an allowance of 1-2 pixel difference for all pixels. This is enough to determine that the wrong color-space is being used in a particular circumstance, but is enough to allow some wiggle room in things like rounding errors for actual color space conversions.

There are many more spaces to be tested but 1) this seems like a good start and 2) generating neutral references is not trivial. References are generated here using this tool: https://raphlinus.github.io/color/2021/01/18/oklab-critique.html

For the four color spaces tested safari technology preview produces identical results for sRGB, sRGB-linear and OKLab, but not for XYZ (which Levien's blog calls "CIELAB").

We're also testing here that legacy color inputs default to sRGB color space and that "new" color inputs (i.e. those defined by CSS Color 4/5) use OKLab to interpolate by default.

Lab, xyz-D65, hsl, hwb, lch and oklch are still untested, save for the "gradient-eval-###" tests that are in this same directory, but only test a single value in the very middle of the gradient.

It may be worth adding even more tests to the polor color spaces to also validate hue-interpolation-methods.

Bug: 1362022
Change-Id: Ieb3b306d6a5a450148a2c713d6f265788de5e4d1

Reviewed-on: https://chromium-review.googlesource.com/3933269
WPT-Export-Revision: cb5ea919d8af5a4331dccef3e19f53c636290b2f

Component: web-platform-tests → Layout: Images, Video, and HTML Frames
Product: Testing → Core

CI Results

Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 6 tests

Status Summary

Firefox

PASS: 1
FAIL: 5

Chrome

PASS: 2
FAIL: 4

Safari

PASS: 2
FAIL: 4

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

Firefox-only Failures

New Tests That Don't Pass

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7466a57230a5 [wpt PR 36233] - Add image reference tests for gradient interpolation spaces, a=testonly https://hg.mozilla.org/integration/autoland/rev/6fe836d70c22 [wpt PR 36233] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 108 Branch
You need to log in before you can comment on or make changes to this bug.