Automatic update from web-platform-tests Make kSRGB the default SkInterpolation for gradients Previously unknown gradient interpolation defaulted to the color space of the device display. This, in practice was always sRGB because until https://skia-review.googlesource.com/c/skia/+/942876 display-p3 was not available as a gradient interpolation space in skia. Now that it is, legacy gradients for p3 devices have changed everywhere. Sadly, we did not catch this regression because we were not running the requisite tests inside a p3 gamut test runner. As a part of this CL I've added external/wpt/css/css-images/gradient to the "wide-gamut" virtual test suite. Similar regressions will be caught by this test suite in the future. See https://chromium-review.googlesource.com/c/chromium/src/+/4144561 for a previous attempt. Bug: 398066384 Change-Id: Ic66a537ca2d5fbe28adf29556c045f98d9c24f73 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6340630 Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org> Commit-Queue: Aaron Krajeski <aaronhk@chromium.org> Cr-Commit-Position: refs/heads/main@{#1431086} -- wpt-commits: 2472ea3d89dbc6a2aced2ee14935ea0b9fa29e66 wpt-pr: 51270
51 lines
2.0 KiB
HTML
51 lines
2.0 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Gradient interpolation</title>
|
|
<link rel="author" title="Aaron Krajeski" href="mailto:aaronhk@chromium.org">
|
|
<link rel="help" href="https://www.w3.org/TR/css-color-4/#interpolation">
|
|
<meta name="assert" content="Color stops with missing components should split into two stops and take their neighboring values.">
|
|
<link rel="match" href="gradient-none-interpolation-ref.html">
|
|
<meta name="fuzzy" content="maxDifference=1; totalPixels=0-15000">
|
|
<style>
|
|
div {
|
|
height: 50px;
|
|
}
|
|
#basic {
|
|
/* "none" should split into two and take each neighboring value. */
|
|
background: linear-gradient(to right in srgb, color(srgb 0.5 0 0), color(srgb none 0.5 0.5), color(srgb 1 1 1));
|
|
}
|
|
#multipleNone {
|
|
/* "none" and "none" gives zero. */
|
|
background: linear-gradient(to right in srgb, color(srgb none 0 0), color(srgb none 0.5 0.5), color(srgb 1 1 1));
|
|
}
|
|
#allNone {
|
|
/* "none" and "none" gives zero. */
|
|
background: linear-gradient(to right in srgb, color(srgb none 0 0), color(srgb none 1 1));
|
|
}
|
|
#noneHue {
|
|
background: linear-gradient(to right in oklch, oklch(0.2 0.1 90), oklch(0.8 0.4 none), oklch(0.3 0.2 180));
|
|
}
|
|
#noneHueLonger {
|
|
background: linear-gradient(to right in oklch longer hue, oklch(0.2 0.1 90), oklch(0.5 0.3 none), oklch(0.8 0.4 180));
|
|
}
|
|
#transparentHueIsPowerless {
|
|
/* When "transparent" is converted to oklch, the hue of the resulting stop should act as if it were missing. */
|
|
background: linear-gradient(to right in oklch, red, transparent, blue);
|
|
}
|
|
#srgb-mixing-with-named-color {
|
|
background: linear-gradient(90deg in srgb, rgb(none 255 none), yellow);
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div id="basic"></div>
|
|
<div id="multipleNone"></div>
|
|
<div id="allNone"></div>
|
|
<div id="noneHue"></div>
|
|
<div id="noneHueLonger"></div>
|
|
<div id="transparentHueIsPowerless"></div>
|
|
<div id="srgb-mixing-with-named-color"></div>
|
|
</body>
|
|
</html>
|