Title: [274408] trunk
Revision
274408
Author
wei...@apple.com
Date
2021-03-14 23:20:04 -0700 (Sun, 14 Mar 2021)

Log Message

Match other browsers by interpolating colors in floating point space rather than uint8_t space
https://bugs.webkit.org/show_bug.cgi?id=223165

Reviewed by Antoine Quint.

LayoutTests/imported/w3c:

* web-platform-tests/css/css-backgrounds/animations/background-color-interpolation-expected.txt:
* web-platform-tests/css/css-backgrounds/animations/box-shadow-interpolation-expected.txt:
* web-platform-tests/css/css-transitions/animations/text-shadow-interpolation-expected.txt:
* web-platform-tests/css/css-ui/animation/caret-color-interpolation-expected.txt:
* web-platform-tests/css/css-ui/outline-017-expected.txt:
Update color interpolation results.

Source/WebCore:

* platform/graphics/ColorBlending.cpp:
(WebCore::blend):
(WebCore::blendWithoutPremultiply):
Rather than blending the components as uint8_t channels, match other browsers by blending
them as float channels. I have not yet determined if a spec says this, but matching other
browsers makes sense and fixes a bunch of WPT results. I will follow up with the CSS WG to
determine where/if this is/should be specified.

* platform/graphics/ColorUtilities.cpp:
(WebCore::unpremultiplied):
Avoid division by zero.

Modified Paths

Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (274407 => 274408)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2021-03-15 00:57:22 UTC (rev 274407)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2021-03-15 06:20:04 UTC (rev 274408)
@@ -1,3 +1,17 @@
+2021-03-14  Sam Weinig  <wei...@apple.com>
+
+        Match other browsers by interpolating colors in floating point space rather than uint8_t space
+        https://bugs.webkit.org/show_bug.cgi?id=223165
+
+        Reviewed by Antoine Quint.
+
+        * web-platform-tests/css/css-backgrounds/animations/background-color-interpolation-expected.txt:
+        * web-platform-tests/css/css-backgrounds/animations/box-shadow-interpolation-expected.txt:
+        * web-platform-tests/css/css-transitions/animations/text-shadow-interpolation-expected.txt:
+        * web-platform-tests/css/css-ui/animation/caret-color-interpolation-expected.txt:
+        * web-platform-tests/css/css-ui/outline-017-expected.txt:
+        Update color interpolation results.
+
 2021-03-14  Yusuke Suzuki  <ysuz...@apple.com>
 
         Prevent dynamic import in service worker

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/animations/background-color-interpolation-expected.txt (274407 => 274408)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/animations/background-color-interpolation-expected.txt	2021-03-15 00:57:22 UTC (rev 274407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/animations/background-color-interpolation-expected.txt	2021-03-15 06:20:04 UTC (rev 274408)
@@ -25,26 +25,26 @@
 PASS Web Animations: property <background-color> from neutral to [green] at (1.5) should be [rgb(0, 192, 0)]
 PASS CSS Transitions: property <background-color> from [initial] to [green] at (-0.3) should be [rgba(0, 0, 0, 0)]
 PASS CSS Transitions: property <background-color> from [initial] to [green] at (0) should be [rgba(0, 0, 0, 0)]
-FAIL CSS Transitions: property <background-color> from [initial] to [green] at (0.3) should be [rgba(0, 128, 0, 0.3)] assert_equals: expected "rgba ( 0 , 128 , 0 , 0.3 ) " but got "rgba ( 0 , 126 , 0 , 0.3 ) "
-FAIL CSS Transitions: property <background-color> from [initial] to [green] at (0.6) should be [rgba(0, 128, 0, 0.6)] assert_equals: expected "rgba ( 0 , 128 , 0 , 0.6 ) " but got "rgba ( 0 , 129 , 0 , 0.6 ) "
+PASS CSS Transitions: property <background-color> from [initial] to [green] at (0.3) should be [rgba(0, 128, 0, 0.3)]
+PASS CSS Transitions: property <background-color> from [initial] to [green] at (0.6) should be [rgba(0, 128, 0, 0.6)]
 PASS CSS Transitions: property <background-color> from [initial] to [green] at (1) should be [rgb(0, 128, 0)]
 PASS CSS Transitions: property <background-color> from [initial] to [green] at (1.5) should be [rgb(0, 192, 0)]
 PASS CSS Transitions with transition: all: property <background-color> from [initial] to [green] at (-0.3) should be [rgba(0, 0, 0, 0)]
 PASS CSS Transitions with transition: all: property <background-color> from [initial] to [green] at (0) should be [rgba(0, 0, 0, 0)]
-FAIL CSS Transitions with transition: all: property <background-color> from [initial] to [green] at (0.3) should be [rgba(0, 128, 0, 0.3)] assert_equals: expected "rgba ( 0 , 128 , 0 , 0.3 ) " but got "rgba ( 0 , 126 , 0 , 0.3 ) "
-FAIL CSS Transitions with transition: all: property <background-color> from [initial] to [green] at (0.6) should be [rgba(0, 128, 0, 0.6)] assert_equals: expected "rgba ( 0 , 128 , 0 , 0.6 ) " but got "rgba ( 0 , 129 , 0 , 0.6 ) "
+PASS CSS Transitions with transition: all: property <background-color> from [initial] to [green] at (0.3) should be [rgba(0, 128, 0, 0.3)]
+PASS CSS Transitions with transition: all: property <background-color> from [initial] to [green] at (0.6) should be [rgba(0, 128, 0, 0.6)]
 PASS CSS Transitions with transition: all: property <background-color> from [initial] to [green] at (1) should be [rgb(0, 128, 0)]
 PASS CSS Transitions with transition: all: property <background-color> from [initial] to [green] at (1.5) should be [rgb(0, 192, 0)]
 PASS CSS Animations: property <background-color> from [initial] to [green] at (-0.3) should be [rgba(0, 0, 0, 0)]
 PASS CSS Animations: property <background-color> from [initial] to [green] at (0) should be [rgba(0, 0, 0, 0)]
-FAIL CSS Animations: property <background-color> from [initial] to [green] at (0.3) should be [rgba(0, 128, 0, 0.3)] assert_equals: expected "rgba ( 0 , 128 , 0 , 0.3 ) " but got "rgba ( 0 , 126 , 0 , 0.3 ) "
-FAIL CSS Animations: property <background-color> from [initial] to [green] at (0.6) should be [rgba(0, 128, 0, 0.6)] assert_equals: expected "rgba ( 0 , 128 , 0 , 0.6 ) " but got "rgba ( 0 , 129 , 0 , 0.6 ) "
+PASS CSS Animations: property <background-color> from [initial] to [green] at (0.3) should be [rgba(0, 128, 0, 0.3)]
+PASS CSS Animations: property <background-color> from [initial] to [green] at (0.6) should be [rgba(0, 128, 0, 0.6)]
 PASS CSS Animations: property <background-color> from [initial] to [green] at (1) should be [rgb(0, 128, 0)]
 PASS CSS Animations: property <background-color> from [initial] to [green] at (1.5) should be [rgb(0, 192, 0)]
 PASS Web Animations: property <background-color> from [initial] to [green] at (-0.3) should be [rgba(0, 0, 0, 0)]
 PASS Web Animations: property <background-color> from [initial] to [green] at (0) should be [rgba(0, 0, 0, 0)]
-FAIL Web Animations: property <background-color> from [initial] to [green] at (0.3) should be [rgba(0, 128, 0, 0.3)] assert_equals: expected "rgba ( 0 , 128 , 0 , 0.3 ) " but got "rgba ( 0 , 126 , 0 , 0.3 ) "
-FAIL Web Animations: property <background-color> from [initial] to [green] at (0.6) should be [rgba(0, 128, 0, 0.6)] assert_equals: expected "rgba ( 0 , 128 , 0 , 0.6 ) " but got "rgba ( 0 , 129 , 0 , 0.6 ) "
+PASS Web Animations: property <background-color> from [initial] to [green] at (0.3) should be [rgba(0, 128, 0, 0.3)]
+PASS Web Animations: property <background-color> from [initial] to [green] at (0.6) should be [rgba(0, 128, 0, 0.6)]
 PASS Web Animations: property <background-color> from [initial] to [green] at (1) should be [rgb(0, 128, 0)]
 PASS Web Animations: property <background-color> from [initial] to [green] at (1.5) should be [rgb(0, 192, 0)]
 PASS CSS Transitions: property <background-color> from [inherit] to [green] at (-0.3) should be [rgb(255, 255, 255)]
@@ -73,26 +73,26 @@
 PASS Web Animations: property <background-color> from [inherit] to [green] at (1.5) should be [rgb(0, 73, 0)]
 PASS CSS Transitions: property <background-color> from [unset] to [green] at (-0.3) should be [rgba(0, 0, 0, 0)]
 PASS CSS Transitions: property <background-color> from [unset] to [green] at (0) should be [rgba(0, 0, 0, 0)]
-FAIL CSS Transitions: property <background-color> from [unset] to [green] at (0.3) should be [rgba(0, 128, 0, 0.3)] assert_equals: expected "rgba ( 0 , 128 , 0 , 0.3 ) " but got "rgba ( 0 , 126 , 0 , 0.3 ) "
-FAIL CSS Transitions: property <background-color> from [unset] to [green] at (0.6) should be [rgba(0, 128, 0, 0.6)] assert_equals: expected "rgba ( 0 , 128 , 0 , 0.6 ) " but got "rgba ( 0 , 129 , 0 , 0.6 ) "
+PASS CSS Transitions: property <background-color> from [unset] to [green] at (0.3) should be [rgba(0, 128, 0, 0.3)]
+PASS CSS Transitions: property <background-color> from [unset] to [green] at (0.6) should be [rgba(0, 128, 0, 0.6)]
 PASS CSS Transitions: property <background-color> from [unset] to [green] at (1) should be [rgb(0, 128, 0)]
 PASS CSS Transitions: property <background-color> from [unset] to [green] at (1.5) should be [rgb(0, 192, 0)]
 PASS CSS Transitions with transition: all: property <background-color> from [unset] to [green] at (-0.3) should be [rgba(0, 0, 0, 0)]
 PASS CSS Transitions with transition: all: property <background-color> from [unset] to [green] at (0) should be [rgba(0, 0, 0, 0)]
-FAIL CSS Transitions with transition: all: property <background-color> from [unset] to [green] at (0.3) should be [rgba(0, 128, 0, 0.3)] assert_equals: expected "rgba ( 0 , 128 , 0 , 0.3 ) " but got "rgba ( 0 , 126 , 0 , 0.3 ) "
-FAIL CSS Transitions with transition: all: property <background-color> from [unset] to [green] at (0.6) should be [rgba(0, 128, 0, 0.6)] assert_equals: expected "rgba ( 0 , 128 , 0 , 0.6 ) " but got "rgba ( 0 , 129 , 0 , 0.6 ) "
+PASS CSS Transitions with transition: all: property <background-color> from [unset] to [green] at (0.3) should be [rgba(0, 128, 0, 0.3)]
+PASS CSS Transitions with transition: all: property <background-color> from [unset] to [green] at (0.6) should be [rgba(0, 128, 0, 0.6)]
 PASS CSS Transitions with transition: all: property <background-color> from [unset] to [green] at (1) should be [rgb(0, 128, 0)]
 PASS CSS Transitions with transition: all: property <background-color> from [unset] to [green] at (1.5) should be [rgb(0, 192, 0)]
 PASS CSS Animations: property <background-color> from [unset] to [green] at (-0.3) should be [rgba(0, 0, 0, 0)]
 PASS CSS Animations: property <background-color> from [unset] to [green] at (0) should be [rgba(0, 0, 0, 0)]
-FAIL CSS Animations: property <background-color> from [unset] to [green] at (0.3) should be [rgba(0, 128, 0, 0.3)] assert_equals: expected "rgba ( 0 , 128 , 0 , 0.3 ) " but got "rgba ( 0 , 126 , 0 , 0.3 ) "
-FAIL CSS Animations: property <background-color> from [unset] to [green] at (0.6) should be [rgba(0, 128, 0, 0.6)] assert_equals: expected "rgba ( 0 , 128 , 0 , 0.6 ) " but got "rgba ( 0 , 129 , 0 , 0.6 ) "
+PASS CSS Animations: property <background-color> from [unset] to [green] at (0.3) should be [rgba(0, 128, 0, 0.3)]
+PASS CSS Animations: property <background-color> from [unset] to [green] at (0.6) should be [rgba(0, 128, 0, 0.6)]
 PASS CSS Animations: property <background-color> from [unset] to [green] at (1) should be [rgb(0, 128, 0)]
 PASS CSS Animations: property <background-color> from [unset] to [green] at (1.5) should be [rgb(0, 192, 0)]
 PASS Web Animations: property <background-color> from [unset] to [green] at (-0.3) should be [rgba(0, 0, 0, 0)]
 PASS Web Animations: property <background-color> from [unset] to [green] at (0) should be [rgba(0, 0, 0, 0)]
-FAIL Web Animations: property <background-color> from [unset] to [green] at (0.3) should be [rgba(0, 128, 0, 0.3)] assert_equals: expected "rgba ( 0 , 128 , 0 , 0.3 ) " but got "rgba ( 0 , 126 , 0 , 0.3 ) "
-FAIL Web Animations: property <background-color> from [unset] to [green] at (0.6) should be [rgba(0, 128, 0, 0.6)] assert_equals: expected "rgba ( 0 , 128 , 0 , 0.6 ) " but got "rgba ( 0 , 129 , 0 , 0.6 ) "
+PASS Web Animations: property <background-color> from [unset] to [green] at (0.3) should be [rgba(0, 128, 0, 0.3)]
+PASS Web Animations: property <background-color> from [unset] to [green] at (0.6) should be [rgba(0, 128, 0, 0.6)]
 PASS Web Animations: property <background-color> from [unset] to [green] at (1) should be [rgb(0, 128, 0)]
 PASS Web Animations: property <background-color> from [unset] to [green] at (1.5) should be [rgb(0, 192, 0)]
 PASS CSS Transitions: property <background-color> from [white] to [orange] at (-0.3) should be [white]
@@ -121,26 +121,26 @@
 PASS Web Animations: property <background-color> from [white] to [orange] at (1.5) should be [rgb(255, 120, 0)]
 PASS CSS Transitions: property <background-color> from [transparent] to [green] at (-0.3) should be [rgba(0, 0, 0, 0)]
 PASS CSS Transitions: property <background-color> from [transparent] to [green] at (0) should be [rgba(0, 0, 0, 0)]
-FAIL CSS Transitions: property <background-color> from [transparent] to [green] at (0.3) should be [rgba(0, 128, 0, 0.3)] assert_equals: expected "rgba ( 0 , 128 , 0 , 0.3 ) " but got "rgba ( 0 , 126 , 0 , 0.3 ) "
-FAIL CSS Transitions: property <background-color> from [transparent] to [green] at (0.6) should be [rgba(0, 128, 0, 0.6)] assert_equals: expected "rgba ( 0 , 128 , 0 , 0.6 ) " but got "rgba ( 0 , 129 , 0 , 0.6 ) "
+PASS CSS Transitions: property <background-color> from [transparent] to [green] at (0.3) should be [rgba(0, 128, 0, 0.3)]
+PASS CSS Transitions: property <background-color> from [transparent] to [green] at (0.6) should be [rgba(0, 128, 0, 0.6)]
 PASS CSS Transitions: property <background-color> from [transparent] to [green] at (1) should be [rgb(0, 128, 0)]
 PASS CSS Transitions: property <background-color> from [transparent] to [green] at (1.5) should be [rgb(0, 192, 0)]
 PASS CSS Transitions with transition: all: property <background-color> from [transparent] to [green] at (-0.3) should be [rgba(0, 0, 0, 0)]
 PASS CSS Transitions with transition: all: property <background-color> from [transparent] to [green] at (0) should be [rgba(0, 0, 0, 0)]
-FAIL CSS Transitions with transition: all: property <background-color> from [transparent] to [green] at (0.3) should be [rgba(0, 128, 0, 0.3)] assert_equals: expected "rgba ( 0 , 128 , 0 , 0.3 ) " but got "rgba ( 0 , 126 , 0 , 0.3 ) "
-FAIL CSS Transitions with transition: all: property <background-color> from [transparent] to [green] at (0.6) should be [rgba(0, 128, 0, 0.6)] assert_equals: expected "rgba ( 0 , 128 , 0 , 0.6 ) " but got "rgba ( 0 , 129 , 0 , 0.6 ) "
+PASS CSS Transitions with transition: all: property <background-color> from [transparent] to [green] at (0.3) should be [rgba(0, 128, 0, 0.3)]
+PASS CSS Transitions with transition: all: property <background-color> from [transparent] to [green] at (0.6) should be [rgba(0, 128, 0, 0.6)]
 PASS CSS Transitions with transition: all: property <background-color> from [transparent] to [green] at (1) should be [rgb(0, 128, 0)]
 PASS CSS Transitions with transition: all: property <background-color> from [transparent] to [green] at (1.5) should be [rgb(0, 192, 0)]
 PASS CSS Animations: property <background-color> from [transparent] to [green] at (-0.3) should be [rgba(0, 0, 0, 0)]
 PASS CSS Animations: property <background-color> from [transparent] to [green] at (0) should be [rgba(0, 0, 0, 0)]
-FAIL CSS Animations: property <background-color> from [transparent] to [green] at (0.3) should be [rgba(0, 128, 0, 0.3)] assert_equals: expected "rgba ( 0 , 128 , 0 , 0.3 ) " but got "rgba ( 0 , 126 , 0 , 0.3 ) "
-FAIL CSS Animations: property <background-color> from [transparent] to [green] at (0.6) should be [rgba(0, 128, 0, 0.6)] assert_equals: expected "rgba ( 0 , 128 , 0 , 0.6 ) " but got "rgba ( 0 , 129 , 0 , 0.6 ) "
+PASS CSS Animations: property <background-color> from [transparent] to [green] at (0.3) should be [rgba(0, 128, 0, 0.3)]
+PASS CSS Animations: property <background-color> from [transparent] to [green] at (0.6) should be [rgba(0, 128, 0, 0.6)]
 PASS CSS Animations: property <background-color> from [transparent] to [green] at (1) should be [rgb(0, 128, 0)]
 PASS CSS Animations: property <background-color> from [transparent] to [green] at (1.5) should be [rgb(0, 192, 0)]
 PASS Web Animations: property <background-color> from [transparent] to [green] at (-0.3) should be [rgba(0, 0, 0, 0)]
 PASS Web Animations: property <background-color> from [transparent] to [green] at (0) should be [rgba(0, 0, 0, 0)]
-FAIL Web Animations: property <background-color> from [transparent] to [green] at (0.3) should be [rgba(0, 128, 0, 0.3)] assert_equals: expected "rgba ( 0 , 128 , 0 , 0.3 ) " but got "rgba ( 0 , 126 , 0 , 0.3 ) "
-FAIL Web Animations: property <background-color> from [transparent] to [green] at (0.6) should be [rgba(0, 128, 0, 0.6)] assert_equals: expected "rgba ( 0 , 128 , 0 , 0.6 ) " but got "rgba ( 0 , 129 , 0 , 0.6 ) "
+PASS Web Animations: property <background-color> from [transparent] to [green] at (0.3) should be [rgba(0, 128, 0, 0.3)]
+PASS Web Animations: property <background-color> from [transparent] to [green] at (0.6) should be [rgba(0, 128, 0, 0.6)]
 PASS Web Animations: property <background-color> from [transparent] to [green] at (1) should be [rgb(0, 128, 0)]
 PASS Web Animations: property <background-color> from [transparent] to [green] at (1.5) should be [rgb(0, 192, 0)]
 PASS CSS Transitions: property <background-color> from [currentcolor] to [rgba(0, 255, 0, 0.75)] at (-0.5) should be [rgba(0, 0, 255, 0.38)]
@@ -147,7 +147,7 @@
 PASS CSS Transitions: property <background-color> from [currentcolor] to [rgba(0, 255, 0, 0.75)] at (0) should be [rgba(0, 0, 255, 0.5)]
 PASS CSS Transitions: property <background-color> from [currentcolor] to [rgba(0, 255, 0, 0.75)] at (0.25) should be [rgba(0, 85, 170, 0.56)]
 PASS CSS Transitions: property <background-color> from [currentcolor] to [rgba(0, 255, 0, 0.75)] at (0.5) should be [rgba(0, 153, 102, 0.63)]
-FAIL CSS Transitions: property <background-color> from [currentcolor] to [rgba(0, 255, 0, 0.75)] at (0.75) should be [rgba(0, 208, 47, 0.69)] assert_equals: expected "rgba ( 0 , 208 , 47 , 0.69 ) " but got "rgba ( 0 , 209 , 47 , 0.69 ) "
+PASS CSS Transitions: property <background-color> from [currentcolor] to [rgba(0, 255, 0, 0.75)] at (0.75) should be [rgba(0, 208, 47, 0.69)]
 PASS CSS Transitions: property <background-color> from [currentcolor] to [rgba(0, 255, 0, 0.75)] at (1) should be [rgba(0, 255, 0, 0.75)]
 PASS CSS Transitions: property <background-color> from [currentcolor] to [rgba(0, 255, 0, 0.75)] at (1.5) should be [rgba(0, 255, 0, 0.88)]
 PASS CSS Transitions with transition: all: property <background-color> from [currentcolor] to [rgba(0, 255, 0, 0.75)] at (-0.5) should be [rgba(0, 0, 255, 0.38)]
@@ -154,7 +154,7 @@
 PASS CSS Transitions with transition: all: property <background-color> from [currentcolor] to [rgba(0, 255, 0, 0.75)] at (0) should be [rgba(0, 0, 255, 0.5)]
 PASS CSS Transitions with transition: all: property <background-color> from [currentcolor] to [rgba(0, 255, 0, 0.75)] at (0.25) should be [rgba(0, 85, 170, 0.56)]
 PASS CSS Transitions with transition: all: property <background-color> from [currentcolor] to [rgba(0, 255, 0, 0.75)] at (0.5) should be [rgba(0, 153, 102, 0.63)]
-FAIL CSS Transitions with transition: all: property <background-color> from [currentcolor] to [rgba(0, 255, 0, 0.75)] at (0.75) should be [rgba(0, 208, 47, 0.69)] assert_equals: expected "rgba ( 0 , 208 , 47 , 0.69 ) " but got "rgba ( 0 , 209 , 47 , 0.69 ) "
+PASS CSS Transitions with transition: all: property <background-color> from [currentcolor] to [rgba(0, 255, 0, 0.75)] at (0.75) should be [rgba(0, 208, 47, 0.69)]
 PASS CSS Transitions with transition: all: property <background-color> from [currentcolor] to [rgba(0, 255, 0, 0.75)] at (1) should be [rgba(0, 255, 0, 0.75)]
 PASS CSS Transitions with transition: all: property <background-color> from [currentcolor] to [rgba(0, 255, 0, 0.75)] at (1.5) should be [rgba(0, 255, 0, 0.88)]
 PASS CSS Animations: property <background-color> from [currentcolor] to [rgba(0, 255, 0, 0.75)] at (-0.5) should be [rgba(0, 0, 255, 0.38)]
@@ -161,7 +161,7 @@
 PASS CSS Animations: property <background-color> from [currentcolor] to [rgba(0, 255, 0, 0.75)] at (0) should be [rgba(0, 0, 255, 0.5)]
 PASS CSS Animations: property <background-color> from [currentcolor] to [rgba(0, 255, 0, 0.75)] at (0.25) should be [rgba(0, 85, 170, 0.56)]
 PASS CSS Animations: property <background-color> from [currentcolor] to [rgba(0, 255, 0, 0.75)] at (0.5) should be [rgba(0, 153, 102, 0.63)]
-FAIL CSS Animations: property <background-color> from [currentcolor] to [rgba(0, 255, 0, 0.75)] at (0.75) should be [rgba(0, 208, 47, 0.69)] assert_equals: expected "rgba ( 0 , 208 , 47 , 0.69 ) " but got "rgba ( 0 , 209 , 47 , 0.69 ) "
+PASS CSS Animations: property <background-color> from [currentcolor] to [rgba(0, 255, 0, 0.75)] at (0.75) should be [rgba(0, 208, 47, 0.69)]
 PASS CSS Animations: property <background-color> from [currentcolor] to [rgba(0, 255, 0, 0.75)] at (1) should be [rgba(0, 255, 0, 0.75)]
 PASS CSS Animations: property <background-color> from [currentcolor] to [rgba(0, 255, 0, 0.75)] at (1.5) should be [rgba(0, 255, 0, 0.88)]
 PASS Web Animations: property <background-color> from [currentcolor] to [rgba(0, 255, 0, 0.75)] at (-0.5) should be [rgba(0, 0, 255, 0.38)]
@@ -168,7 +168,7 @@
 PASS Web Animations: property <background-color> from [currentcolor] to [rgba(0, 255, 0, 0.75)] at (0) should be [rgba(0, 0, 255, 0.5)]
 PASS Web Animations: property <background-color> from [currentcolor] to [rgba(0, 255, 0, 0.75)] at (0.25) should be [rgba(0, 85, 170, 0.56)]
 PASS Web Animations: property <background-color> from [currentcolor] to [rgba(0, 255, 0, 0.75)] at (0.5) should be [rgba(0, 153, 102, 0.63)]
-FAIL Web Animations: property <background-color> from [currentcolor] to [rgba(0, 255, 0, 0.75)] at (0.75) should be [rgba(0, 208, 47, 0.69)] assert_equals: expected "rgba ( 0 , 208 , 47 , 0.69 ) " but got "rgba ( 0 , 209 , 47 , 0.69 ) "
+PASS Web Animations: property <background-color> from [currentcolor] to [rgba(0, 255, 0, 0.75)] at (0.75) should be [rgba(0, 208, 47, 0.69)]
 PASS Web Animations: property <background-color> from [currentcolor] to [rgba(0, 255, 0, 0.75)] at (1) should be [rgba(0, 255, 0, 0.75)]
 PASS Web Animations: property <background-color> from [currentcolor] to [rgba(0, 255, 0, 0.75)] at (1.5) should be [rgba(0, 255, 0, 0.88)]
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/animations/box-shadow-interpolation-expected.txt (274407 => 274408)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/animations/box-shadow-interpolation-expected.txt	2021-03-15 00:57:22 UTC (rev 274407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/animations/box-shadow-interpolation-expected.txt	2021-03-15 06:20:04 UTC (rev 274408)
@@ -217,25 +217,25 @@
 PASS Web Animations: property <box-shadow> from [10px 10px 10px 10px black] to [10px 10px 10px 10px currentColor] at (1.5) should be [rgb(0, 192, 0) 10px 10px 10px 10px]
 PASS CSS Transitions: property <box-shadow> from [10px 20px rgba(255, 255, 0, 0.5), inset 5px 10em #008000] to [none] at (-0.3) should be [rgba(255, 255, 0, 0.65) 13px 26px 0px 0px, rgb(0, 166, 0) 6.5px 39px 0px 0px inset]
 PASS CSS Transitions: property <box-shadow> from [10px 20px rgba(255, 255, 0, 0.5), inset 5px 10em #008000] to [none] at (0) should be [rgba(255, 255, 0, 0.5) 10px 20px 0px 0px, rgb(0, 128, 0) 5px 30px 0px 0px inset]
-FAIL CSS Transitions: property <box-shadow> from [10px 20px rgba(255, 255, 0, 0.5), inset 5px 10em #008000] to [none] at (0.3) should be [rgba(255, 255, 0, 0.353) 7px 14px 0px 0px, rgba(0, 128, 0, 0.7) 3.5px 21px 0px 0px inset] assert_equals: expected "rgba ( 255 , 255 , 0 , 0.35 ) 7px 14px 0px 0px , rgba ( 0 , 128 , 0 , 0.7 ) 3.5px 21px 0px 0px inset " but got "rgba ( 255 , 255 , 0 , 0.35 ) 7px 14px 0px 0px , rgba ( 0 , 129 , 0 , 0.7 ) 3.5px 21px 0px 0px inset "
+PASS CSS Transitions: property <box-shadow> from [10px 20px rgba(255, 255, 0, 0.5), inset 5px 10em #008000] to [none] at (0.3) should be [rgba(255, 255, 0, 0.353) 7px 14px 0px 0px, rgba(0, 128, 0, 0.7) 3.5px 21px 0px 0px inset]
 PASS CSS Transitions: property <box-shadow> from [10px 20px rgba(255, 255, 0, 0.5), inset 5px 10em #008000] to [none] at (0.6) should be [rgba(255, 255, 0, 0.2) 4px 8px 0px 0px, rgba(0, 128, 0, 0.4) 2px 12px 0px 0px inset]
 PASS CSS Transitions: property <box-shadow> from [10px 20px rgba(255, 255, 0, 0.5), inset 5px 10em #008000] to [none] at (1) should be [rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px inset]
 PASS CSS Transitions: property <box-shadow> from [10px 20px rgba(255, 255, 0, 0.5), inset 5px 10em #008000] to [none] at (1.5) should be [rgba(0, 0, 0, 0) -5px -10px 0px 0px, rgba(0, 0, 0, 0) -2.5px -15px 0px 0px inset]
 PASS CSS Transitions with transition: all: property <box-shadow> from [10px 20px rgba(255, 255, 0, 0.5), inset 5px 10em #008000] to [none] at (-0.3) should be [rgba(255, 255, 0, 0.65) 13px 26px 0px 0px, rgb(0, 166, 0) 6.5px 39px 0px 0px inset]
 PASS CSS Transitions with transition: all: property <box-shadow> from [10px 20px rgba(255, 255, 0, 0.5), inset 5px 10em #008000] to [none] at (0) should be [rgba(255, 255, 0, 0.5) 10px 20px 0px 0px, rgb(0, 128, 0) 5px 30px 0px 0px inset]
-FAIL CSS Transitions with transition: all: property <box-shadow> from [10px 20px rgba(255, 255, 0, 0.5), inset 5px 10em #008000] to [none] at (0.3) should be [rgba(255, 255, 0, 0.353) 7px 14px 0px 0px, rgba(0, 128, 0, 0.7) 3.5px 21px 0px 0px inset] assert_equals: expected "rgba ( 255 , 255 , 0 , 0.35 ) 7px 14px 0px 0px , rgba ( 0 , 128 , 0 , 0.7 ) 3.5px 21px 0px 0px inset " but got "rgba ( 255 , 255 , 0 , 0.35 ) 7px 14px 0px 0px , rgba ( 0 , 129 , 0 , 0.7 ) 3.5px 21px 0px 0px inset "
+PASS CSS Transitions with transition: all: property <box-shadow> from [10px 20px rgba(255, 255, 0, 0.5), inset 5px 10em #008000] to [none] at (0.3) should be [rgba(255, 255, 0, 0.353) 7px 14px 0px 0px, rgba(0, 128, 0, 0.7) 3.5px 21px 0px 0px inset]
 PASS CSS Transitions with transition: all: property <box-shadow> from [10px 20px rgba(255, 255, 0, 0.5), inset 5px 10em #008000] to [none] at (0.6) should be [rgba(255, 255, 0, 0.2) 4px 8px 0px 0px, rgba(0, 128, 0, 0.4) 2px 12px 0px 0px inset]
 PASS CSS Transitions with transition: all: property <box-shadow> from [10px 20px rgba(255, 255, 0, 0.5), inset 5px 10em #008000] to [none] at (1) should be [rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px inset]
 PASS CSS Transitions with transition: all: property <box-shadow> from [10px 20px rgba(255, 255, 0, 0.5), inset 5px 10em #008000] to [none] at (1.5) should be [rgba(0, 0, 0, 0) -5px -10px 0px 0px, rgba(0, 0, 0, 0) -2.5px -15px 0px 0px inset]
 PASS CSS Animations: property <box-shadow> from [10px 20px rgba(255, 255, 0, 0.5), inset 5px 10em #008000] to [none] at (-0.3) should be [rgba(255, 255, 0, 0.65) 13px 26px 0px 0px, rgb(0, 166, 0) 6.5px 39px 0px 0px inset]
 PASS CSS Animations: property <box-shadow> from [10px 20px rgba(255, 255, 0, 0.5), inset 5px 10em #008000] to [none] at (0) should be [rgba(255, 255, 0, 0.5) 10px 20px 0px 0px, rgb(0, 128, 0) 5px 30px 0px 0px inset]
-FAIL CSS Animations: property <box-shadow> from [10px 20px rgba(255, 255, 0, 0.5), inset 5px 10em #008000] to [none] at (0.3) should be [rgba(255, 255, 0, 0.353) 7px 14px 0px 0px, rgba(0, 128, 0, 0.7) 3.5px 21px 0px 0px inset] assert_equals: expected "rgba ( 255 , 255 , 0 , 0.35 ) 7px 14px 0px 0px , rgba ( 0 , 128 , 0 , 0.7 ) 3.5px 21px 0px 0px inset " but got "rgba ( 255 , 255 , 0 , 0.35 ) 7px 14px 0px 0px , rgba ( 0 , 129 , 0 , 0.7 ) 3.5px 21px 0px 0px inset "
+PASS CSS Animations: property <box-shadow> from [10px 20px rgba(255, 255, 0, 0.5), inset 5px 10em #008000] to [none] at (0.3) should be [rgba(255, 255, 0, 0.353) 7px 14px 0px 0px, rgba(0, 128, 0, 0.7) 3.5px 21px 0px 0px inset]
 PASS CSS Animations: property <box-shadow> from [10px 20px rgba(255, 255, 0, 0.5), inset 5px 10em #008000] to [none] at (0.6) should be [rgba(255, 255, 0, 0.2) 4px 8px 0px 0px, rgba(0, 128, 0, 0.4) 2px 12px 0px 0px inset]
 PASS CSS Animations: property <box-shadow> from [10px 20px rgba(255, 255, 0, 0.5), inset 5px 10em #008000] to [none] at (1) should be [rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px inset]
 PASS CSS Animations: property <box-shadow> from [10px 20px rgba(255, 255, 0, 0.5), inset 5px 10em #008000] to [none] at (1.5) should be [rgba(0, 0, 0, 0) -5px -10px 0px 0px, rgba(0, 0, 0, 0) -2.5px -15px 0px 0px inset]
 PASS Web Animations: property <box-shadow> from [10px 20px rgba(255, 255, 0, 0.5), inset 5px 10em #008000] to [none] at (-0.3) should be [rgba(255, 255, 0, 0.65) 13px 26px 0px 0px, rgb(0, 166, 0) 6.5px 39px 0px 0px inset]
 PASS Web Animations: property <box-shadow> from [10px 20px rgba(255, 255, 0, 0.5), inset 5px 10em #008000] to [none] at (0) should be [rgba(255, 255, 0, 0.5) 10px 20px 0px 0px, rgb(0, 128, 0) 5px 30px 0px 0px inset]
-FAIL Web Animations: property <box-shadow> from [10px 20px rgba(255, 255, 0, 0.5), inset 5px 10em #008000] to [none] at (0.3) should be [rgba(255, 255, 0, 0.353) 7px 14px 0px 0px, rgba(0, 128, 0, 0.7) 3.5px 21px 0px 0px inset] assert_equals: expected "rgba ( 255 , 255 , 0 , 0.35 ) 7px 14px 0px 0px , rgba ( 0 , 128 , 0 , 0.7 ) 3.5px 21px 0px 0px inset " but got "rgba ( 255 , 255 , 0 , 0.35 ) 7px 14px 0px 0px , rgba ( 0 , 129 , 0 , 0.7 ) 3.5px 21px 0px 0px inset "
+PASS Web Animations: property <box-shadow> from [10px 20px rgba(255, 255, 0, 0.5), inset 5px 10em #008000] to [none] at (0.3) should be [rgba(255, 255, 0, 0.353) 7px 14px 0px 0px, rgba(0, 128, 0, 0.7) 3.5px 21px 0px 0px inset]
 PASS Web Animations: property <box-shadow> from [10px 20px rgba(255, 255, 0, 0.5), inset 5px 10em #008000] to [none] at (0.6) should be [rgba(255, 255, 0, 0.2) 4px 8px 0px 0px, rgba(0, 128, 0, 0.4) 2px 12px 0px 0px inset]
 PASS Web Animations: property <box-shadow> from [10px 20px rgba(255, 255, 0, 0.5), inset 5px 10em #008000] to [none] at (1) should be [rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px inset]
 PASS Web Animations: property <box-shadow> from [10px 20px rgba(255, 255, 0, 0.5), inset 5px 10em #008000] to [none] at (1.5) should be [rgba(0, 0, 0, 0) -5px -10px 0px 0px, rgba(0, 0, 0, 0) -2.5px -15px 0px 0px inset]

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/animations/text-shadow-interpolation-expected.txt (274407 => 274408)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/animations/text-shadow-interpolation-expected.txt	2021-03-15 00:57:22 UTC (rev 274407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/animations/text-shadow-interpolation-expected.txt	2021-03-15 06:20:04 UTC (rev 274408)
@@ -25,26 +25,26 @@
 PASS Web Animations: property <text-shadow> from neutral to [green 20px 20px 20px] at (1.5) should be [rgb(0, 110, 0) 25px 15px 25px]
 FAIL CSS Transitions: property <text-shadow> from [initial] to [green 20px 20px 20px] at (-0.3) should be [rgba(0, 0, 0, 0) -6px -6px 0px] assert_equals: expected "rgba ( 0 , 0 , 0 , 0 ) - 6px - 6px 0px " but got "rgba ( 0 , 0 , 0 , 0 ) - 5.98px - 5.98px - 6px "
 PASS CSS Transitions: property <text-shadow> from [initial] to [green 20px 20px 20px] at (0) should be [rgba(0, 0, 0, 0) 0px 0px 0px]
-FAIL CSS Transitions: property <text-shadow> from [initial] to [green 20px 20px 20px] at (0.3) should be [rgba(0, 128, 0, 0.3) 6px 6px 6px] assert_equals: expected "rgba ( 0 , 128 , 0 , 0.3 ) 6px 6px 6px " but got "rgba ( 0 , 126 , 0 , 0.3 ) 6px 6px 6px "
-FAIL CSS Transitions: property <text-shadow> from [initial] to [green 20px 20px 20px] at (0.6) should be [rgba(0, 128, 0, 0.6) 12px 12px 12px] assert_equals: expected "rgba ( 0 , 128 , 0 , 0.6 ) 12px 12px 12px " but got "rgba ( 0 , 129 , 0 , 0.6 ) 12px 12px 12px "
+PASS CSS Transitions: property <text-shadow> from [initial] to [green 20px 20px 20px] at (0.3) should be [rgba(0, 128, 0, 0.3) 6px 6px 6px]
+PASS CSS Transitions: property <text-shadow> from [initial] to [green 20px 20px 20px] at (0.6) should be [rgba(0, 128, 0, 0.6) 12px 12px 12px]
 PASS CSS Transitions: property <text-shadow> from [initial] to [green 20px 20px 20px] at (1) should be [rgb(0, 128, 0) 20px 20px 20px]
 PASS CSS Transitions: property <text-shadow> from [initial] to [green 20px 20px 20px] at (1.5) should be [rgb(0, 192, 0) 30px 30px 30px]
 FAIL CSS Transitions with transition: all: property <text-shadow> from [initial] to [green 20px 20px 20px] at (-0.3) should be [rgba(0, 0, 0, 0) -6px -6px 0px] assert_equals: expected "rgba ( 0 , 0 , 0 , 0 ) - 6px - 6px 0px " but got "rgba ( 0 , 0 , 0 , 0 ) - 5.98px - 5.98px - 6px "
 PASS CSS Transitions with transition: all: property <text-shadow> from [initial] to [green 20px 20px 20px] at (0) should be [rgba(0, 0, 0, 0) 0px 0px 0px]
-FAIL CSS Transitions with transition: all: property <text-shadow> from [initial] to [green 20px 20px 20px] at (0.3) should be [rgba(0, 128, 0, 0.3) 6px 6px 6px] assert_equals: expected "rgba ( 0 , 128 , 0 , 0.3 ) 6px 6px 6px " but got "rgba ( 0 , 126 , 0 , 0.3 ) 6px 6px 6px "
-FAIL CSS Transitions with transition: all: property <text-shadow> from [initial] to [green 20px 20px 20px] at (0.6) should be [rgba(0, 128, 0, 0.6) 12px 12px 12px] assert_equals: expected "rgba ( 0 , 128 , 0 , 0.6 ) 12px 12px 12px " but got "rgba ( 0 , 129 , 0 , 0.6 ) 12px 12px 12px "
+PASS CSS Transitions with transition: all: property <text-shadow> from [initial] to [green 20px 20px 20px] at (0.3) should be [rgba(0, 128, 0, 0.3) 6px 6px 6px]
+PASS CSS Transitions with transition: all: property <text-shadow> from [initial] to [green 20px 20px 20px] at (0.6) should be [rgba(0, 128, 0, 0.6) 12px 12px 12px]
 PASS CSS Transitions with transition: all: property <text-shadow> from [initial] to [green 20px 20px 20px] at (1) should be [rgb(0, 128, 0) 20px 20px 20px]
 PASS CSS Transitions with transition: all: property <text-shadow> from [initial] to [green 20px 20px 20px] at (1.5) should be [rgb(0, 192, 0) 30px 30px 30px]
 FAIL CSS Animations: property <text-shadow> from [initial] to [green 20px 20px 20px] at (-0.3) should be [rgba(0, 0, 0, 0) -6px -6px 0px] assert_equals: expected "rgba ( 0 , 0 , 0 , 0 ) - 6px - 6px 0px " but got "rgba ( 0 , 0 , 0 , 0 ) - 5.98px - 5.98px - 6px "
 PASS CSS Animations: property <text-shadow> from [initial] to [green 20px 20px 20px] at (0) should be [rgba(0, 0, 0, 0) 0px 0px 0px]
-FAIL CSS Animations: property <text-shadow> from [initial] to [green 20px 20px 20px] at (0.3) should be [rgba(0, 128, 0, 0.3) 6px 6px 6px] assert_equals: expected "rgba ( 0 , 128 , 0 , 0.3 ) 6px 6px 6px " but got "rgba ( 0 , 126 , 0 , 0.3 ) 6px 6px 6px "
-FAIL CSS Animations: property <text-shadow> from [initial] to [green 20px 20px 20px] at (0.6) should be [rgba(0, 128, 0, 0.6) 12px 12px 12px] assert_equals: expected "rgba ( 0 , 128 , 0 , 0.6 ) 12px 12px 12px " but got "rgba ( 0 , 129 , 0 , 0.6 ) 12px 12px 12px "
+PASS CSS Animations: property <text-shadow> from [initial] to [green 20px 20px 20px] at (0.3) should be [rgba(0, 128, 0, 0.3) 6px 6px 6px]
+PASS CSS Animations: property <text-shadow> from [initial] to [green 20px 20px 20px] at (0.6) should be [rgba(0, 128, 0, 0.6) 12px 12px 12px]
 PASS CSS Animations: property <text-shadow> from [initial] to [green 20px 20px 20px] at (1) should be [rgb(0, 128, 0) 20px 20px 20px]
 PASS CSS Animations: property <text-shadow> from [initial] to [green 20px 20px 20px] at (1.5) should be [rgb(0, 192, 0) 30px 30px 30px]
 FAIL Web Animations: property <text-shadow> from [initial] to [green 20px 20px 20px] at (-0.3) should be [rgba(0, 0, 0, 0) -6px -6px 0px] assert_equals: expected "rgba ( 0 , 0 , 0 , 0 ) - 6px - 6px 0px " but got "rgba ( 0 , 0 , 0 , 0 ) - 5.98px - 5.98px - 6px "
 PASS Web Animations: property <text-shadow> from [initial] to [green 20px 20px 20px] at (0) should be [rgba(0, 0, 0, 0) 0px 0px 0px]
-FAIL Web Animations: property <text-shadow> from [initial] to [green 20px 20px 20px] at (0.3) should be [rgba(0, 128, 0, 0.3) 6px 6px 6px] assert_equals: expected "rgba ( 0 , 128 , 0 , 0.3 ) 6px 6px 6px " but got "rgba ( 0 , 126 , 0 , 0.3 ) 6px 6px 6px "
-FAIL Web Animations: property <text-shadow> from [initial] to [green 20px 20px 20px] at (0.6) should be [rgba(0, 128, 0, 0.6) 12px 12px 12px] assert_equals: expected "rgba ( 0 , 128 , 0 , 0.6 ) 12px 12px 12px " but got "rgba ( 0 , 129 , 0 , 0.6 ) 12px 12px 12px "
+PASS Web Animations: property <text-shadow> from [initial] to [green 20px 20px 20px] at (0.3) should be [rgba(0, 128, 0, 0.3) 6px 6px 6px]
+PASS Web Animations: property <text-shadow> from [initial] to [green 20px 20px 20px] at (0.6) should be [rgba(0, 128, 0, 0.6) 12px 12px 12px]
 PASS Web Animations: property <text-shadow> from [initial] to [green 20px 20px 20px] at (1) should be [rgb(0, 128, 0) 20px 20px 20px]
 PASS Web Animations: property <text-shadow> from [initial] to [green 20px 20px 20px] at (1.5) should be [rgb(0, 192, 0) 30px 30px 30px]
 PASS CSS Transitions: property <text-shadow> from [inherit] to [green 20px 20px 20px] at (-0.3) should be [rgb(255, 176, 0) 33px 7px 33px]

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-ui/animation/caret-color-interpolation-expected.txt (274407 => 274408)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-ui/animation/caret-color-interpolation-expected.txt	2021-03-15 00:57:22 UTC (rev 274407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-ui/animation/caret-color-interpolation-expected.txt	2021-03-15 06:20:04 UTC (rev 274408)
@@ -25,82 +25,82 @@
 PASS Web Animations: property <caret-color> from neutral to [green] at (1.5) should be [rgb(0, 65, 0)]
 FAIL CSS Transitions: property <caret-color> from [initial] to [green] at (-0.3) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 0 , 0 , 0 ) "
 FAIL CSS Transitions: property <caret-color> from [initial] to [green] at (0) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 0 , 0 , 0 ) "
-FAIL CSS Transitions: property <caret-color> from [initial] to [green] at (0.3) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 126 , 0 , 0.3 ) "
+FAIL CSS Transitions: property <caret-color> from [initial] to [green] at (0.3) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.3 ) "
 FAIL CSS Transitions: property <caret-color> from [initial] to [green] at (0.5) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.5 ) "
-FAIL CSS Transitions: property <caret-color> from [initial] to [green] at (0.6) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 129 , 0 , 0.6 ) "
+FAIL CSS Transitions: property <caret-color> from [initial] to [green] at (0.6) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.6 ) "
 PASS CSS Transitions: property <caret-color> from [initial] to [green] at (1) should be [green]
 FAIL CSS Transitions: property <caret-color> from [initial] to [green] at (1.5) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgb ( 0 , 192 , 0 ) "
 FAIL CSS Transitions with transition: all: property <caret-color> from [initial] to [green] at (-0.3) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 0 , 0 , 0 ) "
 FAIL CSS Transitions with transition: all: property <caret-color> from [initial] to [green] at (0) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 0 , 0 , 0 ) "
-FAIL CSS Transitions with transition: all: property <caret-color> from [initial] to [green] at (0.3) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 126 , 0 , 0.3 ) "
+FAIL CSS Transitions with transition: all: property <caret-color> from [initial] to [green] at (0.3) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.3 ) "
 FAIL CSS Transitions with transition: all: property <caret-color> from [initial] to [green] at (0.5) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.5 ) "
-FAIL CSS Transitions with transition: all: property <caret-color> from [initial] to [green] at (0.6) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 129 , 0 , 0.6 ) "
+FAIL CSS Transitions with transition: all: property <caret-color> from [initial] to [green] at (0.6) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.6 ) "
 PASS CSS Transitions with transition: all: property <caret-color> from [initial] to [green] at (1) should be [green]
 FAIL CSS Transitions with transition: all: property <caret-color> from [initial] to [green] at (1.5) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgb ( 0 , 192 , 0 ) "
 FAIL CSS Animations: property <caret-color> from [initial] to [green] at (-0.3) should be [initial] assert_equals: expected "rgb ( 0 , 0 , 0 ) " but got "rgba ( 0 , 0 , 0 , 0 ) "
 FAIL CSS Animations: property <caret-color> from [initial] to [green] at (0) should be [initial] assert_equals: expected "rgb ( 0 , 0 , 0 ) " but got "rgba ( 0 , 0 , 0 , 0 ) "
-FAIL CSS Animations: property <caret-color> from [initial] to [green] at (0.3) should be [initial] assert_equals: expected "rgb ( 0 , 0 , 0 ) " but got "rgba ( 0 , 126 , 0 , 0.3 ) "
+FAIL CSS Animations: property <caret-color> from [initial] to [green] at (0.3) should be [initial] assert_equals: expected "rgb ( 0 , 0 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.3 ) "
 FAIL CSS Animations: property <caret-color> from [initial] to [green] at (0.5) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.5 ) "
-FAIL CSS Animations: property <caret-color> from [initial] to [green] at (0.6) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 129 , 0 , 0.6 ) "
+FAIL CSS Animations: property <caret-color> from [initial] to [green] at (0.6) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.6 ) "
 PASS CSS Animations: property <caret-color> from [initial] to [green] at (1) should be [green]
 FAIL CSS Animations: property <caret-color> from [initial] to [green] at (1.5) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgb ( 0 , 192 , 0 ) "
 FAIL Web Animations: property <caret-color> from [initial] to [green] at (-0.3) should be [initial] assert_equals: expected "rgb ( 0 , 0 , 0 ) " but got "rgba ( 0 , 0 , 0 , 0 ) "
 FAIL Web Animations: property <caret-color> from [initial] to [green] at (0) should be [initial] assert_equals: expected "rgb ( 0 , 0 , 0 ) " but got "rgba ( 0 , 0 , 0 , 0 ) "
-FAIL Web Animations: property <caret-color> from [initial] to [green] at (0.3) should be [initial] assert_equals: expected "rgb ( 0 , 0 , 0 ) " but got "rgba ( 0 , 126 , 0 , 0.3 ) "
+FAIL Web Animations: property <caret-color> from [initial] to [green] at (0.3) should be [initial] assert_equals: expected "rgb ( 0 , 0 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.3 ) "
 FAIL Web Animations: property <caret-color> from [initial] to [green] at (0.5) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.5 ) "
-FAIL Web Animations: property <caret-color> from [initial] to [green] at (0.6) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 129 , 0 , 0.6 ) "
+FAIL Web Animations: property <caret-color> from [initial] to [green] at (0.6) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.6 ) "
 PASS Web Animations: property <caret-color> from [initial] to [green] at (1) should be [green]
 FAIL Web Animations: property <caret-color> from [initial] to [green] at (1.5) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgb ( 0 , 192 , 0 ) "
 FAIL CSS Transitions: property <caret-color> from [auto] to [green] at (-0.3) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 0 , 0 , 0 ) "
 FAIL CSS Transitions: property <caret-color> from [auto] to [green] at (0) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 0 , 0 , 0 ) "
-FAIL CSS Transitions: property <caret-color> from [auto] to [green] at (0.3) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 126 , 0 , 0.3 ) "
+FAIL CSS Transitions: property <caret-color> from [auto] to [green] at (0.3) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.3 ) "
 FAIL CSS Transitions: property <caret-color> from [auto] to [green] at (0.5) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.5 ) "
-FAIL CSS Transitions: property <caret-color> from [auto] to [green] at (0.6) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 129 , 0 , 0.6 ) "
+FAIL CSS Transitions: property <caret-color> from [auto] to [green] at (0.6) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.6 ) "
 PASS CSS Transitions: property <caret-color> from [auto] to [green] at (1) should be [green]
 FAIL CSS Transitions: property <caret-color> from [auto] to [green] at (1.5) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgb ( 0 , 192 , 0 ) "
 FAIL CSS Transitions with transition: all: property <caret-color> from [auto] to [green] at (-0.3) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 0 , 0 , 0 ) "
 FAIL CSS Transitions with transition: all: property <caret-color> from [auto] to [green] at (0) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 0 , 0 , 0 ) "
-FAIL CSS Transitions with transition: all: property <caret-color> from [auto] to [green] at (0.3) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 126 , 0 , 0.3 ) "
+FAIL CSS Transitions with transition: all: property <caret-color> from [auto] to [green] at (0.3) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.3 ) "
 FAIL CSS Transitions with transition: all: property <caret-color> from [auto] to [green] at (0.5) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.5 ) "
-FAIL CSS Transitions with transition: all: property <caret-color> from [auto] to [green] at (0.6) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 129 , 0 , 0.6 ) "
+FAIL CSS Transitions with transition: all: property <caret-color> from [auto] to [green] at (0.6) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.6 ) "
 PASS CSS Transitions with transition: all: property <caret-color> from [auto] to [green] at (1) should be [green]
 FAIL CSS Transitions with transition: all: property <caret-color> from [auto] to [green] at (1.5) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgb ( 0 , 192 , 0 ) "
 FAIL CSS Animations: property <caret-color> from [auto] to [green] at (-0.3) should be [auto] assert_equals: expected "rgb ( 0 , 0 , 0 ) " but got "rgba ( 0 , 0 , 0 , 0 ) "
 FAIL CSS Animations: property <caret-color> from [auto] to [green] at (0) should be [auto] assert_equals: expected "rgb ( 0 , 0 , 0 ) " but got "rgba ( 0 , 0 , 0 , 0 ) "
-FAIL CSS Animations: property <caret-color> from [auto] to [green] at (0.3) should be [auto] assert_equals: expected "rgb ( 0 , 0 , 0 ) " but got "rgba ( 0 , 126 , 0 , 0.3 ) "
+FAIL CSS Animations: property <caret-color> from [auto] to [green] at (0.3) should be [auto] assert_equals: expected "rgb ( 0 , 0 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.3 ) "
 FAIL CSS Animations: property <caret-color> from [auto] to [green] at (0.5) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.5 ) "
-FAIL CSS Animations: property <caret-color> from [auto] to [green] at (0.6) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 129 , 0 , 0.6 ) "
+FAIL CSS Animations: property <caret-color> from [auto] to [green] at (0.6) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.6 ) "
 PASS CSS Animations: property <caret-color> from [auto] to [green] at (1) should be [green]
 FAIL CSS Animations: property <caret-color> from [auto] to [green] at (1.5) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgb ( 0 , 192 , 0 ) "
 FAIL Web Animations: property <caret-color> from [auto] to [green] at (-0.3) should be [auto] assert_equals: expected "rgb ( 0 , 0 , 0 ) " but got "rgba ( 0 , 0 , 0 , 0 ) "
 FAIL Web Animations: property <caret-color> from [auto] to [green] at (0) should be [auto] assert_equals: expected "rgb ( 0 , 0 , 0 ) " but got "rgba ( 0 , 0 , 0 , 0 ) "
-FAIL Web Animations: property <caret-color> from [auto] to [green] at (0.3) should be [auto] assert_equals: expected "rgb ( 0 , 0 , 0 ) " but got "rgba ( 0 , 126 , 0 , 0.3 ) "
+FAIL Web Animations: property <caret-color> from [auto] to [green] at (0.3) should be [auto] assert_equals: expected "rgb ( 0 , 0 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.3 ) "
 FAIL Web Animations: property <caret-color> from [auto] to [green] at (0.5) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.5 ) "
-FAIL Web Animations: property <caret-color> from [auto] to [green] at (0.6) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 129 , 0 , 0.6 ) "
+FAIL Web Animations: property <caret-color> from [auto] to [green] at (0.6) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.6 ) "
 PASS Web Animations: property <caret-color> from [auto] to [green] at (1) should be [green]
 FAIL Web Animations: property <caret-color> from [auto] to [green] at (1.5) should be [green] assert_equals: expected "rgb ( 0 , 128 , 0 ) " but got "rgb ( 0 , 192 , 0 ) "
 FAIL CSS Transitions: property <caret-color> from [currentColor] to [green] at (-0.3) should be [rgb(0, 0, 0)] assert_equals: expected "rgb ( 0 , 0 , 0 ) " but got "rgba ( 0 , 0 , 0 , 0 ) "
 FAIL CSS Transitions: property <caret-color> from [currentColor] to [green] at (0) should be [rgb(0, 0, 0)] assert_equals: expected "rgb ( 0 , 0 , 0 ) " but got "rgba ( 0 , 0 , 0 , 0 ) "
-FAIL CSS Transitions: property <caret-color> from [currentColor] to [green] at (0.3) should be [rgb(0, 38, 0)] assert_equals: expected "rgb ( 0 , 38 , 0 ) " but got "rgba ( 0 , 126 , 0 , 0.3 ) "
-FAIL CSS Transitions: property <caret-color> from [currentColor] to [green] at (0.6) should be [rgb(0, 77, 0)] assert_equals: expected "rgb ( 0 , 77 , 0 ) " but got "rgba ( 0 , 129 , 0 , 0.6 ) "
+FAIL CSS Transitions: property <caret-color> from [currentColor] to [green] at (0.3) should be [rgb(0, 38, 0)] assert_equals: expected "rgb ( 0 , 38 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.3 ) "
+FAIL CSS Transitions: property <caret-color> from [currentColor] to [green] at (0.6) should be [rgb(0, 77, 0)] assert_equals: expected "rgb ( 0 , 77 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.6 ) "
 PASS CSS Transitions: property <caret-color> from [currentColor] to [green] at (1) should be [rgb(0, 128, 0)]
 PASS CSS Transitions: property <caret-color> from [currentColor] to [green] at (1.5) should be [rgb(0, 192, 0)]
 FAIL CSS Transitions with transition: all: property <caret-color> from [currentColor] to [green] at (-0.3) should be [rgb(0, 0, 0)] assert_equals: expected "rgb ( 0 , 0 , 0 ) " but got "rgba ( 0 , 0 , 0 , 0 ) "
 FAIL CSS Transitions with transition: all: property <caret-color> from [currentColor] to [green] at (0) should be [rgb(0, 0, 0)] assert_equals: expected "rgb ( 0 , 0 , 0 ) " but got "rgba ( 0 , 0 , 0 , 0 ) "
-FAIL CSS Transitions with transition: all: property <caret-color> from [currentColor] to [green] at (0.3) should be [rgb(0, 38, 0)] assert_equals: expected "rgb ( 0 , 38 , 0 ) " but got "rgba ( 0 , 126 , 0 , 0.3 ) "
-FAIL CSS Transitions with transition: all: property <caret-color> from [currentColor] to [green] at (0.6) should be [rgb(0, 77, 0)] assert_equals: expected "rgb ( 0 , 77 , 0 ) " but got "rgba ( 0 , 129 , 0 , 0.6 ) "
+FAIL CSS Transitions with transition: all: property <caret-color> from [currentColor] to [green] at (0.3) should be [rgb(0, 38, 0)] assert_equals: expected "rgb ( 0 , 38 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.3 ) "
+FAIL CSS Transitions with transition: all: property <caret-color> from [currentColor] to [green] at (0.6) should be [rgb(0, 77, 0)] assert_equals: expected "rgb ( 0 , 77 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.6 ) "
 PASS CSS Transitions with transition: all: property <caret-color> from [currentColor] to [green] at (1) should be [rgb(0, 128, 0)]
 PASS CSS Transitions with transition: all: property <caret-color> from [currentColor] to [green] at (1.5) should be [rgb(0, 192, 0)]
 FAIL CSS Animations: property <caret-color> from [currentColor] to [green] at (-0.3) should be [rgb(0, 0, 0)] assert_equals: expected "rgb ( 0 , 0 , 0 ) " but got "rgba ( 0 , 0 , 0 , 0 ) "
 FAIL CSS Animations: property <caret-color> from [currentColor] to [green] at (0) should be [rgb(0, 0, 0)] assert_equals: expected "rgb ( 0 , 0 , 0 ) " but got "rgba ( 0 , 0 , 0 , 0 ) "
-FAIL CSS Animations: property <caret-color> from [currentColor] to [green] at (0.3) should be [rgb(0, 38, 0)] assert_equals: expected "rgb ( 0 , 38 , 0 ) " but got "rgba ( 0 , 126 , 0 , 0.3 ) "
-FAIL CSS Animations: property <caret-color> from [currentColor] to [green] at (0.6) should be [rgb(0, 77, 0)] assert_equals: expected "rgb ( 0 , 77 , 0 ) " but got "rgba ( 0 , 129 , 0 , 0.6 ) "
+FAIL CSS Animations: property <caret-color> from [currentColor] to [green] at (0.3) should be [rgb(0, 38, 0)] assert_equals: expected "rgb ( 0 , 38 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.3 ) "
+FAIL CSS Animations: property <caret-color> from [currentColor] to [green] at (0.6) should be [rgb(0, 77, 0)] assert_equals: expected "rgb ( 0 , 77 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.6 ) "
 PASS CSS Animations: property <caret-color> from [currentColor] to [green] at (1) should be [rgb(0, 128, 0)]
 PASS CSS Animations: property <caret-color> from [currentColor] to [green] at (1.5) should be [rgb(0, 192, 0)]
 FAIL Web Animations: property <caret-color> from [currentColor] to [green] at (-0.3) should be [rgb(0, 0, 0)] assert_equals: expected "rgb ( 0 , 0 , 0 ) " but got "rgba ( 0 , 0 , 0 , 0 ) "
 FAIL Web Animations: property <caret-color> from [currentColor] to [green] at (0) should be [rgb(0, 0, 0)] assert_equals: expected "rgb ( 0 , 0 , 0 ) " but got "rgba ( 0 , 0 , 0 , 0 ) "
-FAIL Web Animations: property <caret-color> from [currentColor] to [green] at (0.3) should be [rgb(0, 38, 0)] assert_equals: expected "rgb ( 0 , 38 , 0 ) " but got "rgba ( 0 , 126 , 0 , 0.3 ) "
-FAIL Web Animations: property <caret-color> from [currentColor] to [green] at (0.6) should be [rgb(0, 77, 0)] assert_equals: expected "rgb ( 0 , 77 , 0 ) " but got "rgba ( 0 , 129 , 0 , 0.6 ) "
+FAIL Web Animations: property <caret-color> from [currentColor] to [green] at (0.3) should be [rgb(0, 38, 0)] assert_equals: expected "rgb ( 0 , 38 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.3 ) "
+FAIL Web Animations: property <caret-color> from [currentColor] to [green] at (0.6) should be [rgb(0, 77, 0)] assert_equals: expected "rgb ( 0 , 77 , 0 ) " but got "rgba ( 0 , 128 , 0 , 0.6 ) "
 PASS Web Animations: property <caret-color> from [currentColor] to [green] at (1) should be [rgb(0, 128, 0)]
 PASS Web Animations: property <caret-color> from [currentColor] to [green] at (1.5) should be [rgb(0, 192, 0)]
 PASS CSS Transitions: property <caret-color> from [inherit] to [green] at (-0.3) should be [rgb(0, 0, 255)]

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-ui/outline-017-expected.txt (274407 => 274408)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-ui/outline-017-expected.txt	2021-03-15 00:57:22 UTC (rev 274407)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-ui/outline-017-expected.txt	2021-03-15 06:20:04 UTC (rev 274408)
@@ -1,5 +1,5 @@
 
-FAIL outline-color is animated as a color assert_equals: expected "rgba(2, 0, 0, 0.5)" but got "rgba(4, 0, 0, 0.5)"
+PASS outline-color is animated as a color
 PASS outline-width is animated as a length
 PASS outline-offset is animated as a length
 

Modified: trunk/Source/WebCore/ChangeLog (274407 => 274408)


--- trunk/Source/WebCore/ChangeLog	2021-03-15 00:57:22 UTC (rev 274407)
+++ trunk/Source/WebCore/ChangeLog	2021-03-15 06:20:04 UTC (rev 274408)
@@ -1,3 +1,22 @@
+2021-03-14  Sam Weinig  <wei...@apple.com>
+
+        Match other browsers by interpolating colors in floating point space rather than uint8_t space
+        https://bugs.webkit.org/show_bug.cgi?id=223165
+
+        Reviewed by Antoine Quint.
+
+        * platform/graphics/ColorBlending.cpp:
+        (WebCore::blend):
+        (WebCore::blendWithoutPremultiply):
+        Rather than blending the components as uint8_t channels, match other browsers by blending
+        them as float channels. I have not yet determined if a spec says this, but matching other
+        browsers makes sense and fixes a bunch of WPT results. I will follow up with the CSS WG to
+        determine where/if this is/should be specified.
+
+        * platform/graphics/ColorUtilities.cpp:
+        (WebCore::unpremultiplied):
+        Avoid division by zero.
+
 2021-03-14  Yusuke Suzuki  <ysuz...@apple.com>
 
         Prevent dynamic import in service worker

Modified: trunk/Source/WebCore/platform/graphics/ColorBlending.cpp (274407 => 274408)


--- trunk/Source/WebCore/platform/graphics/ColorBlending.cpp	2021-03-15 00:57:22 UTC (rev 274407)
+++ trunk/Source/WebCore/platform/graphics/ColorBlending.cpp	2021-03-15 06:20:04 UTC (rev 274408)
@@ -97,10 +97,10 @@
     if (progress == 1 && !to.isValid())
         return { };
 
-    auto premultipliedFrom = premultipliedCeiling(from.toSRGBALossy<uint8_t>());
-    auto premultipliedTo = premultipliedCeiling(to.toSRGBALossy<uint8_t>());
+    auto premultipliedFrom = premultiplied(from.toColorTypeLossy<SRGBA<float>>());
+    auto premultipliedTo = premultiplied(to.toColorTypeLossy<SRGBA<float>>());
 
-    auto premultipliedBlended = makeFromComponentsClamping<SRGBA<uint8_t>>(
+    auto premultipliedBlended = makeFromComponentsClamping<SRGBA<float>>(
         WebCore::blend(premultipliedFrom.red, premultipliedTo.red, progress),
         WebCore::blend(premultipliedFrom.green, premultipliedTo.green, progress),
         WebCore::blend(premultipliedFrom.blue, premultipliedTo.blue, progress),
@@ -107,7 +107,7 @@
         WebCore::blend(premultipliedFrom.alpha, premultipliedTo.alpha, progress)
     );
 
-    return unpremultiplied(premultipliedBlended);
+    return convertColor<SRGBA<uint8_t>>(unpremultiplied(premultipliedBlended));
 }
 
 Color blendWithoutPremultiply(const Color& from, const Color& to, double progress)
@@ -117,15 +117,17 @@
     if (progress == 1 && !to.isValid())
         return { };
 
-    auto fromSRGB = from.toSRGBALossy<uint8_t>();
-    auto toSRGB = to.toSRGBALossy<uint8_t>();
+    auto fromSRGB = from.toColorTypeLossy<SRGBA<float>>();
+    auto toSRGB = to.toColorTypeLossy<SRGBA<float>>();
 
-    return makeFromComponentsClamping<SRGBA<uint8_t>>(
+    auto blended = makeFromComponentsClamping<SRGBA<float>>(
         WebCore::blend(fromSRGB.red, toSRGB.red, progress),
         WebCore::blend(fromSRGB.green, toSRGB.green, progress),
         WebCore::blend(fromSRGB.blue, toSRGB.blue, progress),
         WebCore::blend(fromSRGB.alpha, toSRGB.alpha, progress)
     );
+
+    return convertColor<SRGBA<uint8_t>>(blended);
 }
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/platform/graphics/ColorUtilities.cpp (274407 => 274408)


--- trunk/Source/WebCore/platform/graphics/ColorUtilities.cpp	2021-03-15 00:57:22 UTC (rev 274407)
+++ trunk/Source/WebCore/platform/graphics/ColorUtilities.cpp	2021-03-15 06:20:04 UTC (rev 274408)
@@ -37,7 +37,9 @@
 SRGBA<float> unpremultiplied(const SRGBA<float>& color)
 {
     auto [r, g, b, a] = color;
-    return { r / a, g / a, b / a, a };
+    if (!a)
+        return color;
+    return makeFromComponentsClampingExceptAlpha<SRGBA<float>>(r / a, g / a, b / a, a);
 }
 
 SRGBA<uint8_t> premultipliedFlooring(SRGBA<uint8_t> color)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to