commit 3d0b1f6784af5f031de174158f7355426d024b79
parent b811d034a123d1340bcff8a064c54a36e7e1749b
Author: Kevin Ellis <kevers@google.com>
Date: Tue, 21 Oct 2025 10:35:53 +0000
Bug 1995022 [wpt PR 55512] - [waapi] Fix handling of colorspace mismatch, a=testonly
Automatic update from web-platform-tests
[waapi] Fix handling of colorspace mismatch
Previously the "from", "to" and "result" interpolated values all
had to agree on the colorspace. Though the "from" and "to" must be
in alignment, the resultant colorspace can simply be set based on
the "from" keyframe's colorspace. This resultant colorspace can later
be converted to another colorspace as needed for further animations.
Bug: 433202354
Change-Id: Id21d1ac3faa1bd6a1201cec16746c79ba573b0e2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7055382
Reviewed-by: David Awogbemila <awogbemila@chromium.org>
Commit-Queue: Kevin Ellis <kevers@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1531541}
--
wpt-commits: 79e59eed4f7147d0dc7d453d385c6626fa3fa4d5
wpt-pr: 55512
Diffstat:
2 files changed, 53 insertions(+), 0 deletions(-)
diff --git a/testing/web-platform/tests/css/css-animations/animate-with-background-color-hsla-to-legacy-rgb-ref.html b/testing/web-platform/tests/css/css-animations/animate-with-background-color-hsla-to-legacy-rgb-ref.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8">
+ <link rel="help" href="https://www.w3.org/TR/css-color-4/#interpolation">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+</head>
+<script src="common/reftest-wait.js"></script>
+<style>
+ #target {
+ background-color: #00f;
+ height: 200px;
+ width: 200px;
+ }
+</style>
+<body>
+ <div id="target"></div>
+</body>
diff --git a/testing/web-platform/tests/css/css-animations/animate-with-background-color-hsla-to-legacy-rgb.html b/testing/web-platform/tests/css/css-animations/animate-with-background-color-hsla-to-legacy-rgb.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html class='reftest-wait'>
+<head>
+ <meta charset="utf-8">
+ <link rel="help" href="https://www.w3.org/TR/css-color-4/#interpolation">
+ <link rel="match"
+ href="animate-with-background-color-hsla-to-legacy-rgb-ref.html">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+</head>
+<script src="/common/reftest-wait.js"></script>
+<style>
+ #target {
+ background-color: hsla(from blue h 50% 50% / 100%);
+ height: 200px;
+ width: 200px;
+ }
+ @keyframes anim {
+ to { background-color: #00f; }
+ }
+ #target.animated {
+ animation: anim 1s both;
+ }
+</style>
+<body>
+ <div id="target"></div>
+</body>
+<script>
+ window.onload = () => {
+ target.classList.add('animated');
+ const anim = document.getAnimations()[0];
+ anim.ready.then(() => { anim.finish() });
+ anim.finished.then(() => { requestAnimationFrame(takeScreenshot) });
+ };
+</script>
+</html>