[wpt-sync] Sync PR 36233 - Add image reference tests for gradient interpolation spaces
Categories
(Core :: Layout: Images, Video, and HTML Frames, task, P4)
Tracking
()
| 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: Ieb3b306d6a5a450148a2c713d6f265788de5e4d1Reviewed-on: https://chromium-review.googlesource.com/3933269
WPT-Export-Revision: cb5ea919d8af5a4331dccef3e19f53c636290b2f
| Assignee | ||
Updated•4 years ago
|
| Assignee | ||
Comment 1•4 years ago
|
||
| Assignee | ||
Comment 2•4 years ago
|
||
| Assignee | ||
Comment 3•4 years ago
|
||
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
- /css/css-images/gradient/css-color-4-colors-default-to-oklab-gradient.html [wpt.fyi]:
FAIL(Chrome:FAIL, Safari:FAIL) - /css/css-images/gradient/oklab-gradient.html [wpt.fyi]:
FAIL(Chrome:FAIL, Safari:FAIL) - /css/css-images/gradient/srgb-gradient.html [wpt.fyi]:
FAIL(Chrome:PASS, Safari:PASS) - /css/css-images/gradient/srgb-linear-gradient.html [wpt.fyi]:
FAIL(Chrome:FAIL, Safari:FAIL) - /css/css-images/gradient/xyz-gradient.html [wpt.fyi]:
FAIL(Chrome:FAIL, Safari:FAIL)
Comment 5•3 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/7466a57230a5
https://hg.mozilla.org/mozilla-central/rev/6fe836d70c22
Description
•