Diff
Modified: trunk/LayoutTests/ChangeLog (287816 => 287817)
--- trunk/LayoutTests/ChangeLog 2022-01-09 04:16:50 UTC (rev 287816)
+++ trunk/LayoutTests/ChangeLog 2022-01-09 07:43:09 UTC (rev 287817)
@@ -1,3 +1,21 @@
+2022-01-08 Simon Fraser <simon.fra...@apple.com>
+
+ If the drop-shadow filter has no color, it should use the value of the color property
+ https://bugs.webkit.org/show_bug.cgi?id=235012
+
+ Reviewed by Alan Bujtas.
+
+ Fix tests to serialize with rgb(0, 0, 0) instead of the transparent color.
+
+ * css3/filters/backdrop/backdropfilter-property-computed-style-expected.txt:
+ * css3/filters/backdrop/backdropfilter-property-computed-style.html:
+ * css3/filters/drop-shadow-no-color-expected.html: Added.
+ * css3/filters/drop-shadow-no-color.html: Added.
+ * css3/filters/filter-property-computed-style-expected.txt:
+ * css3/filters/filter-property-computed-style.html:
+ * css3/filters/unprefixed-expected.txt:
+ * css3/filters/unprefixed.html:
+
2022-01-08 Arcady Goldmints-Orlov <agoldmi...@igalia.com>
[GLIB] Update test expectations for known failures.
Modified: trunk/LayoutTests/css3/filters/backdrop/backdropfilter-property-computed-style-expected.txt (287816 => 287817)
--- trunk/LayoutTests/css3/filters/backdrop/backdropfilter-property-computed-style-expected.txt 2022-01-09 04:16:50 UTC (rev 287816)
+++ trunk/LayoutTests/css3/filters/backdrop/backdropfilter-property-computed-style-expected.txt 2022-01-09 07:43:09 UTC (rev 287817)
@@ -266,11 +266,11 @@
Three values with zero length : drop-shadow(0 0 0)
PASS filterStyle.length is 1
-PASS subRule.cssText is "drop-shadow(rgba(0, 0, 0, 0) 0px 0px 0px)"
+PASS subRule.cssText is "drop-shadow(rgb(0, 0, 0) 0px 0px 0px)"
Two values no color : drop-shadow(1px 2px)
PASS filterStyle.length is 1
-PASS subRule.cssText is "drop-shadow(rgba(0, 0, 0, 0) 1px 2px 0px)"
+PASS subRule.cssText is "drop-shadow(rgb(0, 0, 0) 1px 2px 0px)"
Multiple operations : grayscale(0.5) sepia(0.25) saturate(0.75) hue-rotate(35deg) invert(0.2) opacity(0.9) blur(5px)
PASS filterStyle.length is 7
Modified: trunk/LayoutTests/css3/filters/backdrop/backdropfilter-property-computed-style.html (287816 => 287817)
--- trunk/LayoutTests/css3/filters/backdrop/backdropfilter-property-computed-style.html 2022-01-09 04:16:50 UTC (rev 287816)
+++ trunk/LayoutTests/css3/filters/backdrop/backdropfilter-property-computed-style.html 2022-01-09 07:43:09 UTC (rev 287817)
@@ -1,5 +1,4 @@
-<!DOCTYPE>
-<html>
+<!DOCTYPE html>
<head>
<script src=""
</head>
@@ -277,11 +276,11 @@
testComputedFilterRule("Three values with zero length",
"drop-shadow(0 0 0)", 1,
- ["drop-shadow(rgba(0, 0, 0, 0) 0px 0px 0px)"]);
+ ["drop-shadow(rgb(0, 0, 0) 0px 0px 0px)"]);
testComputedFilterRule("Two values no color",
"drop-shadow(1px 2px)", 1,
- ["drop-shadow(rgba(0, 0, 0, 0) 1px 2px 0px)"]);
+ ["drop-shadow(rgb(0, 0, 0) 1px 2px 0px)"]);
testComputedFilterRule("Multiple operations",
"grayscale(0.5) sepia(0.25) saturate(0.75) hue-rotate(35deg) invert(0.2) opacity(0.9) blur(5px)", 7,
Added: trunk/LayoutTests/css3/filters/drop-shadow-no-color-expected.html (0 => 287817)
--- trunk/LayoutTests/css3/filters/drop-shadow-no-color-expected.html (rev 0)
+++ trunk/LayoutTests/css3/filters/drop-shadow-no-color-expected.html 2022-01-09 07:43:09 UTC (rev 287817)
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <style>
+ .filtered {
+ margin: 40px;
+ height: 200px;
+ width: 200px;
+ color: red;
+ background-color: silver;
+ filter: drop-shadow(100px 100px green);
+ }
+ </style>
+</head>
+<body>
+ <div class="filtered"></div>
+</body>
+</html>
Added: trunk/LayoutTests/css3/filters/drop-shadow-no-color.html (0 => 287817)
--- trunk/LayoutTests/css3/filters/drop-shadow-no-color.html (rev 0)
+++ trunk/LayoutTests/css3/filters/drop-shadow-no-color.html 2022-01-09 07:43:09 UTC (rev 287817)
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <style>
+ body {
+ color: green;
+ }
+ .filtered {
+ margin: 40px;
+ height: 200px;
+ width: 200px;
+ background-color: silver;
+ filter: drop-shadow(100px 100px);
+ }
+ </style>
+</head>
+<body>
+ <div class="filtered"></div>
+</body>
+</html>
Modified: trunk/LayoutTests/css3/filters/filter-property-computed-style-expected.txt (287816 => 287817)
--- trunk/LayoutTests/css3/filters/filter-property-computed-style-expected.txt 2022-01-09 04:16:50 UTC (rev 287816)
+++ trunk/LayoutTests/css3/filters/filter-property-computed-style-expected.txt 2022-01-09 07:43:09 UTC (rev 287817)
@@ -266,11 +266,11 @@
Three values with zero length : drop-shadow(0 0 0)
PASS filterStyle.length is 1
-PASS subRule.cssText is "drop-shadow(rgba(0, 0, 0, 0) 0px 0px 0px)"
+PASS subRule.cssText is "drop-shadow(rgb(0, 0, 0) 0px 0px 0px)"
Two values no color : drop-shadow(1px 2px)
PASS filterStyle.length is 1
-PASS subRule.cssText is "drop-shadow(rgba(0, 0, 0, 0) 1px 2px 0px)"
+PASS subRule.cssText is "drop-shadow(rgb(0, 0, 0) 1px 2px 0px)"
Multiple operations : grayscale(0.5) sepia(0.25) saturate(0.75) hue-rotate(35deg) invert(0.2) opacity(0.9) blur(5px)
PASS filterStyle.length is 7
Modified: trunk/LayoutTests/css3/filters/filter-property-computed-style.html (287816 => 287817)
--- trunk/LayoutTests/css3/filters/filter-property-computed-style.html 2022-01-09 04:16:50 UTC (rev 287816)
+++ trunk/LayoutTests/css3/filters/filter-property-computed-style.html 2022-01-09 07:43:09 UTC (rev 287817)
@@ -277,11 +277,11 @@
testComputedFilterRule("Three values with zero length",
"drop-shadow(0 0 0)", 1,
- ["drop-shadow(rgba(0, 0, 0, 0) 0px 0px 0px)"]);
+ ["drop-shadow(rgb(0, 0, 0) 0px 0px 0px)"]);
testComputedFilterRule("Two values no color",
"drop-shadow(1px 2px)", 1,
- ["drop-shadow(rgba(0, 0, 0, 0) 1px 2px 0px)"]);
+ ["drop-shadow(rgb(0, 0, 0) 1px 2px 0px)"]);
testComputedFilterRule("Multiple operations",
"grayscale(0.5) sepia(0.25) saturate(0.75) hue-rotate(35deg) invert(0.2) opacity(0.9) blur(5px)", 7,
Modified: trunk/LayoutTests/css3/filters/unprefixed-expected.txt (287816 => 287817)
--- trunk/LayoutTests/css3/filters/unprefixed-expected.txt 2022-01-09 04:16:50 UTC (rev 287816)
+++ trunk/LayoutTests/css3/filters/unprefixed-expected.txt 2022-01-09 07:43:09 UTC (rev 287817)
@@ -266,11 +266,11 @@
Three values with zero length : drop-shadow(0 0 0)
PASS filterStyle.length is 1
-PASS subRule.cssText is "drop-shadow(rgba(0, 0, 0, 0) 0px 0px 0px)"
+PASS subRule.cssText is "drop-shadow(rgb(0, 0, 0) 0px 0px 0px)"
Two values no color : drop-shadow(1px 2px)
PASS filterStyle.length is 1
-PASS subRule.cssText is "drop-shadow(rgba(0, 0, 0, 0) 1px 2px 0px)"
+PASS subRule.cssText is "drop-shadow(rgb(0, 0, 0) 1px 2px 0px)"
Multiple operations : grayscale(0.5) sepia(0.25) saturate(0.75) hue-rotate(35deg) invert(0.2) opacity(0.9) blur(5px)
PASS filterStyle.length is 7
Modified: trunk/LayoutTests/css3/filters/unprefixed.html (287816 => 287817)
--- trunk/LayoutTests/css3/filters/unprefixed.html 2022-01-09 04:16:50 UTC (rev 287816)
+++ trunk/LayoutTests/css3/filters/unprefixed.html 2022-01-09 07:43:09 UTC (rev 287817)
@@ -277,11 +277,11 @@
testComputedFilterRule("Three values with zero length",
"drop-shadow(0 0 0)", 1,
- ["drop-shadow(rgba(0, 0, 0, 0) 0px 0px 0px)"]);
+ ["drop-shadow(rgb(0, 0, 0) 0px 0px 0px)"]);
testComputedFilterRule("Two values no color",
"drop-shadow(1px 2px)", 1,
- ["drop-shadow(rgba(0, 0, 0, 0) 1px 2px 0px)"]);
+ ["drop-shadow(rgb(0, 0, 0) 1px 2px 0px)"]);
testComputedFilterRule("Multiple operations",
"grayscale(0.5) sepia(0.25) saturate(0.75) hue-rotate(35deg) invert(0.2) opacity(0.9) blur(5px)", 7,
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (287816 => 287817)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2022-01-09 04:16:50 UTC (rev 287816)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2022-01-09 07:43:09 UTC (rev 287817)
@@ -1,5 +1,15 @@
2022-01-08 Simon Fraser <simon.fra...@apple.com>
+ If the drop-shadow filter has no color, it should use the value of the color property
+ https://bugs.webkit.org/show_bug.cgi?id=235012
+
+ Reviewed by Alan Bujtas.
+
+ * web-platform-tests/css/filter-effects/animation/filter-interpolation-004-expected.txt:
+ * web-platform-tests/css/filter-effects/parsing/filter-computed-expected.txt:
+
+2022-01-08 Simon Fraser <simon.fra...@apple.com>
+
Fix some CSS filter interpolation issues
https://bugs.webkit.org/show_bug.cgi?id=235007
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/filter-effects/animation/filter-interpolation-004-expected.txt (287816 => 287817)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/filter-effects/animation/filter-interpolation-004-expected.txt 2022-01-09 04:16:50 UTC (rev 287816)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/filter-effects/animation/filter-interpolation-004-expected.txt 2022-01-09 07:43:09 UTC (rev 287817)
@@ -59,24 +59,24 @@
PASS Web Animations: property <filter> from [contrast(0)] to [contrast()] at (0.5) should be [contrast(0.5)]
PASS Web Animations: property <filter> from [contrast(0)] to [contrast()] at (1) should be [contrast()]
PASS Web Animations: property <filter> from [contrast(0)] to [contrast()] at (1.5) should be [contrast(1.5)]
-FAIL CSS Transitions: property <filter> from [drop-shadow(0px 0px)] to [drop-shadow(20px 10px 30px green)] at (-1) should be [drop-shadow(-20px -10px blue)] assert_equals: expected "drop - shadow ( rgb ( 0 , 0 , 255 ) - 20px - 10px 0px ) " but got "drop - shadow ( rgba ( 0 , 0 , 0 , 0 ) - 20px - 10px 0px ) "
-FAIL CSS Transitions: property <filter> from [drop-shadow(0px 0px)] to [drop-shadow(20px 10px 30px green)] at (0) should be [drop-shadow(0px 0px blue)] assert_equals: expected "drop - shadow ( rgb ( 0 , 0 , 255 ) 0px 0px 0px ) " but got "drop - shadow ( rgba ( 0 , 0 , 0 , 0 ) 0px 0px 0px ) "
-FAIL CSS Transitions: property <filter> from [drop-shadow(0px 0px)] to [drop-shadow(20px 10px 30px green)] at (0.5) should be [drop-shadow(10px 5px 15px rgb(0, 64, 128))] assert_equals: expected "drop - shadow ( rgb ( 0 , 64 , 128 ) 10px 5px 15px ) " but got "drop - shadow ( rgba ( 0 , 128 , 0 , 0.5 ) 10px 5px 15px ) "
+PASS CSS Transitions: property <filter> from [drop-shadow(0px 0px)] to [drop-shadow(20px 10px 30px green)] at (-1) should be [drop-shadow(-20px -10px blue)]
+PASS CSS Transitions: property <filter> from [drop-shadow(0px 0px)] to [drop-shadow(20px 10px 30px green)] at (0) should be [drop-shadow(0px 0px blue)]
+PASS CSS Transitions: property <filter> from [drop-shadow(0px 0px)] to [drop-shadow(20px 10px 30px green)] at (0.5) should be [drop-shadow(10px 5px 15px rgb(0, 64, 128))]
PASS CSS Transitions: property <filter> from [drop-shadow(0px 0px)] to [drop-shadow(20px 10px 30px green)] at (1) should be [drop-shadow(20px 10px 30px green)]
PASS CSS Transitions: property <filter> from [drop-shadow(0px 0px)] to [drop-shadow(20px 10px 30px green)] at (1.5) should be [drop-shadow(30px 15px 45px rgb(0, 192, 0))]
-FAIL CSS Transitions with transition: all: property <filter> from [drop-shadow(0px 0px)] to [drop-shadow(20px 10px 30px green)] at (-1) should be [drop-shadow(-20px -10px blue)] assert_equals: expected "drop - shadow ( rgb ( 0 , 0 , 255 ) - 20px - 10px 0px ) " but got "drop - shadow ( rgba ( 0 , 0 , 0 , 0 ) - 20px - 10px 0px ) "
-FAIL CSS Transitions with transition: all: property <filter> from [drop-shadow(0px 0px)] to [drop-shadow(20px 10px 30px green)] at (0) should be [drop-shadow(0px 0px blue)] assert_equals: expected "drop - shadow ( rgb ( 0 , 0 , 255 ) 0px 0px 0px ) " but got "drop - shadow ( rgba ( 0 , 0 , 0 , 0 ) 0px 0px 0px ) "
-FAIL CSS Transitions with transition: all: property <filter> from [drop-shadow(0px 0px)] to [drop-shadow(20px 10px 30px green)] at (0.5) should be [drop-shadow(10px 5px 15px rgb(0, 64, 128))] assert_equals: expected "drop - shadow ( rgb ( 0 , 64 , 128 ) 10px 5px 15px ) " but got "drop - shadow ( rgba ( 0 , 128 , 0 , 0.5 ) 10px 5px 15px ) "
+PASS CSS Transitions with transition: all: property <filter> from [drop-shadow(0px 0px)] to [drop-shadow(20px 10px 30px green)] at (-1) should be [drop-shadow(-20px -10px blue)]
+PASS CSS Transitions with transition: all: property <filter> from [drop-shadow(0px 0px)] to [drop-shadow(20px 10px 30px green)] at (0) should be [drop-shadow(0px 0px blue)]
+PASS CSS Transitions with transition: all: property <filter> from [drop-shadow(0px 0px)] to [drop-shadow(20px 10px 30px green)] at (0.5) should be [drop-shadow(10px 5px 15px rgb(0, 64, 128))]
PASS CSS Transitions with transition: all: property <filter> from [drop-shadow(0px 0px)] to [drop-shadow(20px 10px 30px green)] at (1) should be [drop-shadow(20px 10px 30px green)]
PASS CSS Transitions with transition: all: property <filter> from [drop-shadow(0px 0px)] to [drop-shadow(20px 10px 30px green)] at (1.5) should be [drop-shadow(30px 15px 45px rgb(0, 192, 0))]
-FAIL CSS Animations: property <filter> from [drop-shadow(0px 0px)] to [drop-shadow(20px 10px 30px green)] at (-1) should be [drop-shadow(-20px -10px blue)] assert_equals: expected "drop - shadow ( rgb ( 0 , 0 , 255 ) - 20px - 10px 0px ) " but got "drop - shadow ( rgba ( 0 , 0 , 0 , 0 ) - 20px - 10px 0px ) "
-FAIL CSS Animations: property <filter> from [drop-shadow(0px 0px)] to [drop-shadow(20px 10px 30px green)] at (0) should be [drop-shadow(0px 0px blue)] assert_equals: expected "drop - shadow ( rgb ( 0 , 0 , 255 ) 0px 0px 0px ) " but got "drop - shadow ( rgba ( 0 , 0 , 0 , 0 ) 0px 0px 0px ) "
-FAIL CSS Animations: property <filter> from [drop-shadow(0px 0px)] to [drop-shadow(20px 10px 30px green)] at (0.5) should be [drop-shadow(10px 5px 15px rgb(0, 64, 128))] assert_equals: expected "drop - shadow ( rgb ( 0 , 64 , 128 ) 10px 5px 15px ) " but got "drop - shadow ( rgba ( 0 , 128 , 0 , 0.5 ) 10px 5px 15px ) "
+PASS CSS Animations: property <filter> from [drop-shadow(0px 0px)] to [drop-shadow(20px 10px 30px green)] at (-1) should be [drop-shadow(-20px -10px blue)]
+PASS CSS Animations: property <filter> from [drop-shadow(0px 0px)] to [drop-shadow(20px 10px 30px green)] at (0) should be [drop-shadow(0px 0px blue)]
+PASS CSS Animations: property <filter> from [drop-shadow(0px 0px)] to [drop-shadow(20px 10px 30px green)] at (0.5) should be [drop-shadow(10px 5px 15px rgb(0, 64, 128))]
PASS CSS Animations: property <filter> from [drop-shadow(0px 0px)] to [drop-shadow(20px 10px 30px green)] at (1) should be [drop-shadow(20px 10px 30px green)]
PASS CSS Animations: property <filter> from [drop-shadow(0px 0px)] to [drop-shadow(20px 10px 30px green)] at (1.5) should be [drop-shadow(30px 15px 45px rgb(0, 192, 0))]
-FAIL Web Animations: property <filter> from [drop-shadow(0px 0px)] to [drop-shadow(20px 10px 30px green)] at (-1) should be [drop-shadow(-20px -10px blue)] assert_equals: expected "drop - shadow ( rgb ( 0 , 0 , 255 ) - 20px - 10px 0px ) " but got "drop - shadow ( rgba ( 0 , 0 , 0 , 0 ) - 20px - 10px 0px ) "
-FAIL Web Animations: property <filter> from [drop-shadow(0px 0px)] to [drop-shadow(20px 10px 30px green)] at (0) should be [drop-shadow(0px 0px blue)] assert_equals: expected "drop - shadow ( rgb ( 0 , 0 , 255 ) 0px 0px 0px ) " but got "drop - shadow ( rgba ( 0 , 0 , 0 , 0 ) 0px 0px 0px ) "
-FAIL Web Animations: property <filter> from [drop-shadow(0px 0px)] to [drop-shadow(20px 10px 30px green)] at (0.5) should be [drop-shadow(10px 5px 15px rgb(0, 64, 128))] assert_equals: expected "drop - shadow ( rgb ( 0 , 64 , 128 ) 10px 5px 15px ) " but got "drop - shadow ( rgba ( 0 , 128 , 0 , 0.5 ) 10px 5px 15px ) "
+PASS Web Animations: property <filter> from [drop-shadow(0px 0px)] to [drop-shadow(20px 10px 30px green)] at (-1) should be [drop-shadow(-20px -10px blue)]
+PASS Web Animations: property <filter> from [drop-shadow(0px 0px)] to [drop-shadow(20px 10px 30px green)] at (0) should be [drop-shadow(0px 0px blue)]
+PASS Web Animations: property <filter> from [drop-shadow(0px 0px)] to [drop-shadow(20px 10px 30px green)] at (0.5) should be [drop-shadow(10px 5px 15px rgb(0, 64, 128))]
PASS Web Animations: property <filter> from [drop-shadow(0px 0px)] to [drop-shadow(20px 10px 30px green)] at (1) should be [drop-shadow(20px 10px 30px green)]
PASS Web Animations: property <filter> from [drop-shadow(0px 0px)] to [drop-shadow(20px 10px 30px green)] at (1.5) should be [drop-shadow(30px 15px 45px rgb(0, 192, 0))]
PASS CSS Transitions: property <filter> from [grayscale(0)] to [grayscale()] at (-1) should be [grayscale(0)]
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/filter-effects/parsing/filter-computed-expected.txt (287816 => 287817)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/filter-effects/parsing/filter-computed-expected.txt 2022-01-09 04:16:50 UTC (rev 287816)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/filter-effects/parsing/filter-computed-expected.txt 2022-01-09 07:43:09 UTC (rev 287817)
@@ -8,7 +8,7 @@
PASS Property filter value 'contrast(0)'
PASS Property filter value 'contrast(300%)'
PASS Property filter value 'contrast()'
-FAIL Property filter value 'drop-shadow(1px 2px)' assert_equals: expected "drop-shadow(rgb(0, 255, 0) 1px 2px 0px)" but got "drop-shadow(rgba(0, 0, 0, 0) 1px 2px 0px)"
+PASS Property filter value 'drop-shadow(1px 2px)'
PASS Property filter value 'drop-shadow(rgb(4, 5, 6) 1px 2px 0px)'
PASS Property filter value 'grayscale(50%)'
PASS Property filter value 'grayscale(2)'
Modified: trunk/Source/WebCore/ChangeLog (287816 => 287817)
--- trunk/Source/WebCore/ChangeLog 2022-01-09 04:16:50 UTC (rev 287816)
+++ trunk/Source/WebCore/ChangeLog 2022-01-09 07:43:09 UTC (rev 287817)
@@ -1,5 +1,20 @@
2022-01-08 Simon Fraser <simon.fra...@apple.com>
+ If the drop-shadow filter has no color, it should use the value of the color property
+ https://bugs.webkit.org/show_bug.cgi?id=235012
+
+ Reviewed by Alan Bujtas.
+
+ https://drafts.fxtf.org/filter-effects-1/#funcdef-filter-drop-shadow states that if
+ drop-shadow() does not specify a color, the value of the color property should be used.
+
+ Test: css3/filters/drop-shadow-no-color.html
+
+ * style/StyleBuilderState.cpp:
+ (WebCore::Style::BuilderState::createFilterOperations):
+
+2022-01-08 Simon Fraser <simon.fra...@apple.com>
+
Fix some CSS filter interpolation issues
https://bugs.webkit.org/show_bug.cgi?id=235007
Modified: trunk/Source/WebCore/style/StyleBuilderState.cpp (287816 => 287817)
--- trunk/Source/WebCore/style/StyleBuilderState.cpp 2022-01-09 04:16:50 UTC (rev 287816)
+++ trunk/Source/WebCore/style/StyleBuilderState.cpp 2022-01-09 07:43:09 UTC (rev 287817)
@@ -263,9 +263,7 @@
int y = item.y->computeLength<int>(cssToLengthConversionData());
IntPoint location(x, y);
int blur = item.blur ? item.blur->computeLength<int>(cssToLengthConversionData()) : 0;
- Color color;
- if (item.color)
- color = colorFromPrimitiveValueWithResolvedCurrentColor(*item.color);
+ auto color = item.color ? colorFromPrimitiveValueWithResolvedCurrentColor(*item.color) : m_style.color();
operations.operations().append(DropShadowFilterOperation::create(location, blur, color.isValid() ? color : Color::transparentBlack));
break;