<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[287817] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/287817">287817</a></dd>
<dt>Author</dt> <dd>simon.fraser@apple.com</dd>
<dt>Date</dt> <dd>2022-01-08 23:43:09 -0800 (Sat, 08 Jan 2022)</dd>
</dl>

<h3>Log Message</h3>
<pre>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.

LayoutTests/imported/w3c:

* web-platform-tests/css/filter-effects/animation/filter-interpolation-004-expected.txt:
* web-platform-tests/css/filter-effects/parsing/filter-computed-expected.txt:

Source/WebCore:

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):

LayoutTests:

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:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestscss3filtersbackdropbackdropfilterpropertycomputedstyleexpectedtxt">trunk/LayoutTests/css3/filters/backdrop/backdropfilter-property-computed-style-expected.txt</a></li>
<li><a href="#trunkLayoutTestscss3filtersbackdropbackdropfilterpropertycomputedstylehtml">trunk/LayoutTests/css3/filters/backdrop/backdropfilter-property-computed-style.html</a></li>
<li><a href="#trunkLayoutTestscss3filtersfilterpropertycomputedstyleexpectedtxt">trunk/LayoutTests/css3/filters/filter-property-computed-style-expected.txt</a></li>
<li><a href="#trunkLayoutTestscss3filtersfilterpropertycomputedstylehtml">trunk/LayoutTests/css3/filters/filter-property-computed-style.html</a></li>
<li><a href="#trunkLayoutTestscss3filtersunprefixedexpectedtxt">trunk/LayoutTests/css3/filters/unprefixed-expected.txt</a></li>
<li><a href="#trunkLayoutTestscss3filtersunprefixedhtml">trunk/LayoutTests/css3/filters/unprefixed.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cChangeLog">trunk/LayoutTests/imported/w3c/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestscssfiltereffectsanimationfilterinterpolation004expectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/css/filter-effects/animation/filter-interpolation-004-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestscssfiltereffectsparsingfiltercomputedexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/css/filter-effects/parsing/filter-computed-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorestyleStyleBuilderStatecpp">trunk/Source/WebCore/style/StyleBuilderState.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestscss3filtersdropshadownocolorexpectedhtml">trunk/LayoutTests/css3/filters/drop-shadow-no-color-expected.html</a></li>
<li><a href="#trunkLayoutTestscss3filtersdropshadownocolorhtml">trunk/LayoutTests/css3/filters/drop-shadow-no-color.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (287816 => 287817)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog      2022-01-09 04:16:50 UTC (rev 287816)
+++ trunk/LayoutTests/ChangeLog 2022-01-09 07:43:09 UTC (rev 287817)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2022-01-08  Simon Fraser  <simon.fraser@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:
+
</ins><span class="cx"> 2022-01-08  Arcady Goldmints-Orlov  <agoldmints@igalia.com>
</span><span class="cx"> 
</span><span class="cx">         [GLIB] Update test expectations for known failures.
</span></span></pre></div>
<a id="trunkLayoutTestscss3filtersbackdropbackdropfilterpropertycomputedstyleexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/css3/filters/backdrop/backdropfilter-property-computed-style-expected.txt (287816 => 287817)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -266,11 +266,11 @@
</span><span class="cx"> 
</span><span class="cx"> Three values with zero length : drop-shadow(0 0 0)
</span><span class="cx"> PASS filterStyle.length is 1
</span><del>-PASS subRule.cssText is "drop-shadow(rgba(0, 0, 0, 0) 0px 0px 0px)"
</del><ins>+PASS subRule.cssText is "drop-shadow(rgb(0, 0, 0) 0px 0px 0px)"
</ins><span class="cx"> 
</span><span class="cx"> Two values no color : drop-shadow(1px 2px)
</span><span class="cx"> PASS filterStyle.length is 1
</span><del>-PASS subRule.cssText is "drop-shadow(rgba(0, 0, 0, 0) 1px 2px 0px)"
</del><ins>+PASS subRule.cssText is "drop-shadow(rgb(0, 0, 0) 1px 2px 0px)"
</ins><span class="cx"> 
</span><span class="cx"> Multiple operations : grayscale(0.5) sepia(0.25) saturate(0.75) hue-rotate(35deg) invert(0.2) opacity(0.9) blur(5px)
</span><span class="cx"> PASS filterStyle.length is 7
</span></span></pre></div>
<a id="trunkLayoutTestscss3filtersbackdropbackdropfilterpropertycomputedstylehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/css3/filters/backdrop/backdropfilter-property-computed-style.html (287816 => 287817)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -1,5 +1,4 @@
</span><del>-<!DOCTYPE>
-<html>
</del><ins>+<!DOCTYPE html>
</ins><span class="cx"> <head>
</span><span class="cx"> <script src="../../../resources/js-test-pre.js"></script>
</span><span class="cx"> </head>
</span><span class="lines">@@ -277,11 +276,11 @@
</span><span class="cx"> 
</span><span class="cx"> testComputedFilterRule("Three values with zero length",
</span><span class="cx">                        "drop-shadow(0 0 0)", 1,
</span><del>-                       ["drop-shadow(rgba(0, 0, 0, 0) 0px 0px 0px)"]);
</del><ins>+                       ["drop-shadow(rgb(0, 0, 0) 0px 0px 0px)"]);
</ins><span class="cx"> 
</span><span class="cx"> testComputedFilterRule("Two values no color",
</span><span class="cx">                        "drop-shadow(1px 2px)", 1,
</span><del>-                       ["drop-shadow(rgba(0, 0, 0, 0) 1px 2px 0px)"]);
</del><ins>+                       ["drop-shadow(rgb(0, 0, 0) 1px 2px 0px)"]);
</ins><span class="cx"> 
</span><span class="cx"> testComputedFilterRule("Multiple operations",
</span><span class="cx">                        "grayscale(0.5) sepia(0.25) saturate(0.75) hue-rotate(35deg) invert(0.2) opacity(0.9) blur(5px)", 7,
</span></span></pre></div>
<a id="trunkLayoutTestscss3filtersdropshadownocolorexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/filters/drop-shadow-no-color-expected.html (0 => 287817)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+<!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>
</ins></span></pre></div>
<a id="trunkLayoutTestscss3filtersdropshadownocolorhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/css3/filters/drop-shadow-no-color.html (0 => 287817)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -0,0 +1,20 @@
</span><ins>+<!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>
</ins></span></pre></div>
<a id="trunkLayoutTestscss3filtersfilterpropertycomputedstyleexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/css3/filters/filter-property-computed-style-expected.txt (287816 => 287817)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -266,11 +266,11 @@
</span><span class="cx"> 
</span><span class="cx"> Three values with zero length : drop-shadow(0 0 0)
</span><span class="cx"> PASS filterStyle.length is 1
</span><del>-PASS subRule.cssText is "drop-shadow(rgba(0, 0, 0, 0) 0px 0px 0px)"
</del><ins>+PASS subRule.cssText is "drop-shadow(rgb(0, 0, 0) 0px 0px 0px)"
</ins><span class="cx"> 
</span><span class="cx"> Two values no color : drop-shadow(1px 2px)
</span><span class="cx"> PASS filterStyle.length is 1
</span><del>-PASS subRule.cssText is "drop-shadow(rgba(0, 0, 0, 0) 1px 2px 0px)"
</del><ins>+PASS subRule.cssText is "drop-shadow(rgb(0, 0, 0) 1px 2px 0px)"
</ins><span class="cx"> 
</span><span class="cx"> Multiple operations : grayscale(0.5) sepia(0.25) saturate(0.75) hue-rotate(35deg) invert(0.2) opacity(0.9) blur(5px)
</span><span class="cx"> PASS filterStyle.length is 7
</span></span></pre></div>
<a id="trunkLayoutTestscss3filtersfilterpropertycomputedstylehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/css3/filters/filter-property-computed-style.html (287816 => 287817)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -277,11 +277,11 @@
</span><span class="cx"> 
</span><span class="cx"> testComputedFilterRule("Three values with zero length",
</span><span class="cx">                        "drop-shadow(0 0 0)", 1,
</span><del>-                       ["drop-shadow(rgba(0, 0, 0, 0) 0px 0px 0px)"]);
</del><ins>+                       ["drop-shadow(rgb(0, 0, 0) 0px 0px 0px)"]);
</ins><span class="cx"> 
</span><span class="cx"> testComputedFilterRule("Two values no color",
</span><span class="cx">                        "drop-shadow(1px 2px)", 1,
</span><del>-                       ["drop-shadow(rgba(0, 0, 0, 0) 1px 2px 0px)"]);
</del><ins>+                       ["drop-shadow(rgb(0, 0, 0) 1px 2px 0px)"]);
</ins><span class="cx"> 
</span><span class="cx"> testComputedFilterRule("Multiple operations",
</span><span class="cx">                        "grayscale(0.5) sepia(0.25) saturate(0.75) hue-rotate(35deg) invert(0.2) opacity(0.9) blur(5px)", 7,
</span></span></pre></div>
<a id="trunkLayoutTestscss3filtersunprefixedexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/css3/filters/unprefixed-expected.txt (287816 => 287817)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -266,11 +266,11 @@
</span><span class="cx"> 
</span><span class="cx"> Three values with zero length : drop-shadow(0 0 0)
</span><span class="cx"> PASS filterStyle.length is 1
</span><del>-PASS subRule.cssText is "drop-shadow(rgba(0, 0, 0, 0) 0px 0px 0px)"
</del><ins>+PASS subRule.cssText is "drop-shadow(rgb(0, 0, 0) 0px 0px 0px)"
</ins><span class="cx"> 
</span><span class="cx"> Two values no color : drop-shadow(1px 2px)
</span><span class="cx"> PASS filterStyle.length is 1
</span><del>-PASS subRule.cssText is "drop-shadow(rgba(0, 0, 0, 0) 1px 2px 0px)"
</del><ins>+PASS subRule.cssText is "drop-shadow(rgb(0, 0, 0) 1px 2px 0px)"
</ins><span class="cx"> 
</span><span class="cx"> Multiple operations : grayscale(0.5) sepia(0.25) saturate(0.75) hue-rotate(35deg) invert(0.2) opacity(0.9) blur(5px)
</span><span class="cx"> PASS filterStyle.length is 7
</span></span></pre></div>
<a id="trunkLayoutTestscss3filtersunprefixedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/css3/filters/unprefixed.html (287816 => 287817)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -277,11 +277,11 @@
</span><span class="cx"> 
</span><span class="cx"> testComputedFilterRule("Three values with zero length",
</span><span class="cx">                        "drop-shadow(0 0 0)", 1,
</span><del>-                       ["drop-shadow(rgba(0, 0, 0, 0) 0px 0px 0px)"]);
</del><ins>+                       ["drop-shadow(rgb(0, 0, 0) 0px 0px 0px)"]);
</ins><span class="cx"> 
</span><span class="cx"> testComputedFilterRule("Two values no color",
</span><span class="cx">                        "drop-shadow(1px 2px)", 1,
</span><del>-                       ["drop-shadow(rgba(0, 0, 0, 0) 1px 2px 0px)"]);
</del><ins>+                       ["drop-shadow(rgb(0, 0, 0) 1px 2px 0px)"]);
</ins><span class="cx"> 
</span><span class="cx"> testComputedFilterRule("Multiple operations",
</span><span class="cx">                        "grayscale(0.5) sepia(0.25) saturate(0.75) hue-rotate(35deg) invert(0.2) opacity(0.9) blur(5px)", 7,
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (287816 => 287817)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -1,5 +1,15 @@
</span><span class="cx"> 2022-01-08  Simon Fraser  <simon.fraser@apple.com>
</span><span class="cx"> 
</span><ins>+        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.fraser@apple.com>
+
</ins><span class="cx">         Fix some CSS filter interpolation issues
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=235007
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestscssfiltereffectsanimationfilterinterpolation004expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/filter-effects/animation/filter-interpolation-004-expected.txt (287816 => 287817)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -59,24 +59,24 @@
</span><span class="cx"> PASS Web Animations: property <filter> from [contrast(0)] to [contrast()] at (0.5) should be [contrast(0.5)]
</span><span class="cx"> PASS Web Animations: property <filter> from [contrast(0)] to [contrast()] at (1) should be [contrast()]
</span><span class="cx"> PASS Web Animations: property <filter> from [contrast(0)] to [contrast()] at (1.5) should be [contrast(1.5)]
</span><del>-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 ) "
</del><ins>+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))]
</ins><span class="cx"> 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)]
</span><span class="cx"> 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))]
</span><del>-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 ) "
</del><ins>+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))]
</ins><span class="cx"> 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)]
</span><span class="cx"> 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))]
</span><del>-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 ) "
</del><ins>+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))]
</ins><span class="cx"> 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)]
</span><span class="cx"> 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))]
</span><del>-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 ) "
</del><ins>+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))]
</ins><span class="cx"> 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)]
</span><span class="cx"> 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))]
</span><span class="cx"> PASS CSS Transitions: property <filter> from [grayscale(0)] to [grayscale()] at (-1) should be [grayscale(0)]
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestscssfiltereffectsparsingfiltercomputedexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/filter-effects/parsing/filter-computed-expected.txt (287816 => 287817)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -8,7 +8,7 @@
</span><span class="cx"> PASS Property filter value 'contrast(0)'
</span><span class="cx"> PASS Property filter value 'contrast(300%)'
</span><span class="cx"> PASS Property filter value 'contrast()'
</span><del>-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)"
</del><ins>+PASS Property filter value 'drop-shadow(1px 2px)'
</ins><span class="cx"> PASS Property filter value 'drop-shadow(rgb(4, 5, 6) 1px 2px 0px)'
</span><span class="cx"> PASS Property filter value 'grayscale(50%)'
</span><span class="cx"> PASS Property filter value 'grayscale(2)'
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (287816 => 287817)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -1,5 +1,20 @@
</span><span class="cx"> 2022-01-08  Simon Fraser  <simon.fraser@apple.com>
</span><span class="cx"> 
</span><ins>+        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.fraser@apple.com>
+
</ins><span class="cx">         Fix some CSS filter interpolation issues
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=235007
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorestyleStyleBuilderStatecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/style/StyleBuilderState.cpp (287816 => 287817)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -263,9 +263,7 @@
</span><span class="cx">             int y = item.y->computeLength<int>(cssToLengthConversionData());
</span><span class="cx">             IntPoint location(x, y);
</span><span class="cx">             int blur = item.blur ? item.blur->computeLength<int>(cssToLengthConversionData()) : 0;
</span><del>-            Color color;
-            if (item.color)
-                color = colorFromPrimitiveValueWithResolvedCurrentColor(*item.color);
</del><ins>+            auto color = item.color ? colorFromPrimitiveValueWithResolvedCurrentColor(*item.color) : m_style.color();
</ins><span class="cx"> 
</span><span class="cx">             operations.operations().append(DropShadowFilterOperation::create(location, blur, color.isValid() ? color : Color::transparentBlack));
</span><span class="cx">             break;
</span></span></pre>
</div>
</div>

</body>
</html>