Fix HSL/HWB/LCH/OKLCH gradient longer hue interpolation 1-stop case

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

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1885716
gecko-commit: a65ef2dc959b5fe431d3fcaa757b423aeec2677b
gecko-reviewers: emilio
diff --git a/css/css-images/gradient/gradient-single-stop-longer-hue-hsl-ref.html b/css/css-images/gradient/gradient-single-stop-longer-hue-hsl-ref.html
new file mode 100644
index 0000000..cf47c75
--- /dev/null
+++ b/css/css-images/gradient/gradient-single-stop-longer-hue-hsl-ref.html
@@ -0,0 +1,23 @@
+<!doctype html>
+<html lang="en">
+
+<head>
+    <meta charset="utf-8">
+    <title>Gradient in HSL space</title>
+    <style>
+        body {
+            background: #fff;
+        }
+
+        div {
+            width: 300px;
+            height: 300px;
+            background-image: linear-gradient(in hsl shorter hue 0deg, hsl(0, 100%, 50%) 0%, hsl(120, 100%, 50%) 33.3333%, hsl(240, 100%, 50%) 66.6667%, hsl(0, 100%, 50%) 100%);
+        }
+    </style>
+</head>
+
+<body>
+    <div></div>
+</body>
+</html>
diff --git a/css/css-images/gradient/gradient-single-stop-longer-hue-hsl.html b/css/css-images/gradient/gradient-single-stop-longer-hue-hsl.html
new file mode 100644
index 0000000..bbadccb
--- /dev/null
+++ b/css/css-images/gradient/gradient-single-stop-longer-hue-hsl.html
@@ -0,0 +1,28 @@
+<!doctype html>
+<html lang="en">
+
+<head>
+    <meta charset="utf-8">
+    <title>Gradient in HSL space</title>
+    <meta name="fuzzy" content="maxDifference=0-15;totalPixels=0-90000">
+    <link rel="author" title="Ashley Hale" href="mailto:ahale@mozilla.com">
+    <link rel="help" href="https://www.w3.org/TR/css-color-4/#interpolation">
+    <meta name="assert" content="Tests that a multi-stop shorter hue gradient and a single-stop longer hue (wrapping) gradient match in appearance">
+    <link rel="match" href="gradient-single-stop-longer-hue-hsl-ref.html">
+    <style>
+        body {
+            background: #fff;
+        }
+
+        div {
+            width: 300px;
+            height: 300px;
+            background-image: linear-gradient(in hsl longer hue 0deg, hsl(0, 100%, 50%) 0 0);
+        }
+    </style>
+</head>
+
+<body>
+    <div></div>
+</body>
+</html>
diff --git a/css/css-images/gradient/gradient-single-stop-longer-hue-oklch-ref.html b/css/css-images/gradient/gradient-single-stop-longer-hue-oklch-ref.html
new file mode 100644
index 0000000..c3f5178
--- /dev/null
+++ b/css/css-images/gradient/gradient-single-stop-longer-hue-oklch-ref.html
@@ -0,0 +1,23 @@
+<!doctype html>
+<html lang="en">
+
+<head>
+    <meta charset="utf-8">
+    <title>Gradient in OKLCH space</title>
+    <style>
+        body {
+            background: #fff;
+        }
+
+        div {
+            width: 300px;
+            height: 300px;
+            background-image: linear-gradient(in oklch shorter hue 0deg, oklch(0.62796 0.25768 29.23388) 0%, oklch(0.62796 0.25768 149.23388) 33.3333%, oklch(0.62796 0.25768 269.23388) 66.6667%, oklch(0.62796 0.25768 29.23388) 100%);
+        }
+    </style>
+</head>
+
+<body>
+    <div></div>
+</body>
+</html>
diff --git a/css/css-images/gradient/gradient-single-stop-longer-hue-oklch.html b/css/css-images/gradient/gradient-single-stop-longer-hue-oklch.html
new file mode 100644
index 0000000..abe6604
--- /dev/null
+++ b/css/css-images/gradient/gradient-single-stop-longer-hue-oklch.html
@@ -0,0 +1,28 @@
+<!doctype html>
+<html lang="en">
+
+<head>
+    <meta charset="utf-8">
+    <title>Gradient in OKLCH space</title>
+    <meta name="fuzzy" content="maxDifference=0-15;totalPixels=0-90000">
+    <link rel="author" title="Ashley Hale" href="mailto:ahale@mozilla.com">
+    <link rel="help" href="https://www.w3.org/TR/css-color-4/#interpolation">
+    <meta name="assert" content="Tests that a multi-stop shorter hue gradient and a single-stop longer hue (wrapping) gradient match in appearance">
+    <link rel="match" href="gradient-single-stop-longer-hue-oklch-ref.html">
+    <style>
+        body {
+            background: #fff;
+        }
+
+        div {
+            width: 300px;
+            height: 300px;
+            background-image: linear-gradient(in oklch longer hue 0deg, oklch(0.62796 0.25768 29.23388) 0 0);
+        }
+    </style>
+</head>
+
+<body>
+    <div></div>
+</body>
+</html>