Title: [231473] trunk
- Revision
- 231473
- Author
- [email protected]
- Date
- 2018-05-07 18:34:34 -0700 (Mon, 07 May 2018)
Log Message
CSS filters which reference SVG filters fail to respect the "color-interpolation-filters" of the filter
https://bugs.webkit.org/show_bug.cgi?id=185343
Reviewed by Dean Jackson.
Source/WebCore:
Test: css3/filters/color-interpolation-filters.html
When applying CSS reference filters, apply the value of "color-interpolation-filters" for the
referenced filter effect element, just as we do for SVG filters.
* rendering/FilterEffectRenderer.cpp:
(WebCore::FilterEffectRenderer::buildReferenceFilter):
LayoutTests:
* css3/filters/color-interpolation-filters-expected.html: Added.
* css3/filters/color-interpolation-filters.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (231472 => 231473)
--- trunk/LayoutTests/ChangeLog 2018-05-08 01:13:03 UTC (rev 231472)
+++ trunk/LayoutTests/ChangeLog 2018-05-08 01:34:34 UTC (rev 231473)
@@ -1,3 +1,13 @@
+2018-05-07 Simon Fraser <[email protected]>
+
+ CSS filters which reference SVG filters fail to respect the "color-interpolation-filters" of the filter
+ https://bugs.webkit.org/show_bug.cgi?id=185343
+
+ Reviewed by Dean Jackson.
+
+ * css3/filters/color-interpolation-filters-expected.html: Added.
+ * css3/filters/color-interpolation-filters.html: Added.
+
2018-05-07 Ryan Haddad <[email protected]>
Update TestExpectations for imported/w3c/web-platform-tests/html/dom/interfaces.worker.html.
Added: trunk/LayoutTests/css3/filters/color-interpolation-filters-expected.html (0 => 231473)
--- trunk/LayoutTests/css3/filters/color-interpolation-filters-expected.html (rev 0)
+++ trunk/LayoutTests/css3/filters/color-interpolation-filters-expected.html 2018-05-08 01:34:34 UTC (rev 231473)
@@ -0,0 +1,52 @@
+<head>
+ <style>
+ body {
+ margin: 0;
+ }
+ .box {
+ width: 200px;
+ height: 200px;
+ background-color: white;
+ display: inline-block;
+ }
+ </style>
+</head>
+<body>
+ <svg width="800" height="480">
+ <defs>
+ <filter id="test-linear" color-interpolation-filters="linearRGB">
+ <feComponentTransfer>
+ <feFuncR type="table" tableValues="0.8 0.2"/>
+ <feFuncG type="table" tableValues="0.8 0.2"/>
+ <feFuncB type="table" tableValues="0.8 0.2"/>
+ </feComponentTransfer>
+ <feColorMatrix type="hueRotate" values="180"/>
+ </filter>
+
+ <filter id="test-srgb" color-interpolation-filters="sRGB">
+ <feComponentTransfer>
+ <feFuncR type="table" tableValues="0.8 0.2"/>
+ <feFuncG type="table" tableValues="0.8 0.2"/>
+ <feFuncB type="table" tableValues="0.8 0.2"/>
+ </feComponentTransfer>
+ <feColorMatrix type="hueRotate" values="180"/>
+ </filter>
+
+ <filter id="test-default">
+ <feComponentTransfer>
+ <feFuncR type="table" tableValues="0.8 0.2"/>
+ <feFuncG type="table" tableValues="0.8 0.2"/>
+ <feFuncB type="table" tableValues="0.8 0.2"/>
+ </feComponentTransfer>
+ <feColorMatrix type="hueRotate" values="180"/>
+ </filter>
+ </defs>
+ <rect filter="url(#test-linear)" x="10" y="10" width="200" height="200" fill="white"/>
+ <rect filter="url(#test-srgb)" x="230" y="10" width="200" height="200" fill="white"/>
+ <rect filter="url(#test-default)" x="450" y="10" width="200" height="200" fill="white"/>
+
+ <rect filter="url(#test-linear)" x="10" y="250" width="200" height="200" fill="white"/>
+ <rect filter="url(#test-srgb)" x="230" y="250" width="200" height="200" fill="white"/>
+ <rect filter="url(#test-default)" x="450" y="250" width="200" height="200" fill="white"/>
+ </svg>
+</body>
Added: trunk/LayoutTests/css3/filters/color-interpolation-filters.html (0 => 231473)
--- trunk/LayoutTests/css3/filters/color-interpolation-filters.html (rev 0)
+++ trunk/LayoutTests/css3/filters/color-interpolation-filters.html 2018-05-08 01:34:34 UTC (rev 231473)
@@ -0,0 +1,56 @@
+<head>
+ <style>
+ body {
+ margin: 0;
+ }
+ .box {
+ width: 200px;
+ height: 200px;
+ background-color: white;
+ float: left;
+ }
+ .container > div {
+ margin: 10px;
+ }
+ </style>
+</head>
+<body>
+ <svg width="800" height="240">
+ <defs>
+ <filter id="test-linear" color-interpolation-filters="linearRGB">
+ <feComponentTransfer>
+ <feFuncR type="table" tableValues="0.8 0.2"/>
+ <feFuncG type="table" tableValues="0.8 0.2"/>
+ <feFuncB type="table" tableValues="0.8 0.2"/>
+ </feComponentTransfer>
+ <feColorMatrix type="hueRotate" values="180"/>
+ </filter>
+
+ <filter id="test-srgb" color-interpolation-filters="sRGB">
+ <feComponentTransfer>
+ <feFuncR type="table" tableValues="0.8 0.2"/>
+ <feFuncG type="table" tableValues="0.8 0.2"/>
+ <feFuncB type="table" tableValues="0.8 0.2"/>
+ </feComponentTransfer>
+ <feColorMatrix type="hueRotate" values="180"/>
+ </filter>
+
+ <filter id="test-default">
+ <feComponentTransfer>
+ <feFuncR type="table" tableValues="0.8 0.2"/>
+ <feFuncG type="table" tableValues="0.8 0.2"/>
+ <feFuncB type="table" tableValues="0.8 0.2"/>
+ </feComponentTransfer>
+ <feColorMatrix type="hueRotate" values="180"/>
+ </filter>
+ </defs>
+ <rect filter="url(#test-linear)" x="10" y="10" width="200" height="200" fill="white"/>
+ <rect filter="url(#test-srgb)" x="230" y="10" width="200" height="200" fill="white"/>
+ <rect filter="url(#test-default)" x="450" y="10" width="200" height="200" fill="white"/>
+ </svg>
+ <div class="container">
+ <div class="box" style="filter: url(#test-linear)"></div>
+ <div class="box" style="filter: url(#test-srgb)"></div>
+ <div class="box" style="filter: url(#test-default)"></div>
+ </div>
+</body>
Modified: trunk/Source/WebCore/ChangeLog (231472 => 231473)
--- trunk/Source/WebCore/ChangeLog 2018-05-08 01:13:03 UTC (rev 231472)
+++ trunk/Source/WebCore/ChangeLog 2018-05-08 01:34:34 UTC (rev 231473)
@@ -1,3 +1,18 @@
+2018-05-07 Simon Fraser <[email protected]>
+
+ CSS filters which reference SVG filters fail to respect the "color-interpolation-filters" of the filter
+ https://bugs.webkit.org/show_bug.cgi?id=185343
+
+ Reviewed by Dean Jackson.
+
+ Test: css3/filters/color-interpolation-filters.html
+
+ When applying CSS reference filters, apply the value of "color-interpolation-filters" for the
+ referenced filter effect element, just as we do for SVG filters.
+
+ * rendering/FilterEffectRenderer.cpp:
+ (WebCore::FilterEffectRenderer::buildReferenceFilter):
+
2018-05-07 Daniel Bates <[email protected]>
CSP status-code incorrect for document blocked due to violation of its frame-ancestors directive
Modified: trunk/Source/WebCore/rendering/FilterEffectRenderer.cpp (231472 => 231473)
--- trunk/Source/WebCore/rendering/FilterEffectRenderer.cpp 2018-05-08 01:13:03 UTC (rev 231472)
+++ trunk/Source/WebCore/rendering/FilterEffectRenderer.cpp 2018-05-08 01:34:34 UTC (rev 231473)
@@ -117,6 +117,9 @@
continue;
effectElement.setStandardAttributes(effect.get());
+ if (effectElement.renderer())
+ effect->setOperatingColorSpace(effectElement.renderer()->style().svgStyle().colorInterpolationFilters() == CI_LINEARRGB ? ColorSpaceLinearRGB : ColorSpaceSRGB);
+
builder->add(effectElement.result(), effect);
m_effects.append(*effect);
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes