WebKit Bugzilla
Attachment 339756 Details for
Bug 185343
: CSS filters which reference SVG filters fail to respect the "color-interpolation-filters" of the filter
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185343-20180507145719.patch (text/plain), 7.59 KB, created by
Simon Fraser (smfr)
on 2018-05-07 14:57:20 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Simon Fraser (smfr)
Created:
2018-05-07 14:57:20 PDT
Size:
7.59 KB
patch
obsolete
>Subversion Revision: 231455 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index fd142b5eb23aa67dab46fe5a586368ba2f066edb..3febb719b2abb6a61cd41f933cd1eac9988bcdf3 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,18 @@ >+2018-05-07 Simon Fraser <simon.fraser@apple.com> >+ >+ 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 NOBODY (OOPS!). >+ >+ 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 Chris Dumez <cdumez@apple.com> > > ASSERT(!childItemWithTarget(child->target())) is hit in HistoryItem::addChildItem() >diff --git a/Source/WebCore/rendering/FilterEffectRenderer.cpp b/Source/WebCore/rendering/FilterEffectRenderer.cpp >index 48dde9c80e2910c5335ffca08d503adabadfd601..a5d51ea51923fd3493870869add7fc32f0f0b1ad 100644 >--- a/Source/WebCore/rendering/FilterEffectRenderer.cpp >+++ b/Source/WebCore/rendering/FilterEffectRenderer.cpp >@@ -117,6 +117,9 @@ RefPtr<FilterEffect> FilterEffectRenderer::buildReferenceFilter(RenderElement& r > 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); > } >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index befec420c99d99732262b09e37c8380be181ca12..854b02d3b444d0b0f8e1ca3ff0a27cf6a851dcdd 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,13 @@ >+2018-05-07 Simon Fraser <simon.fraser@apple.com> >+ >+ 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 NOBODY (OOPS!). >+ >+ * css3/filters/color-interpolation-filters-expected.html: Added. >+ * css3/filters/color-interpolation-filters.html: Added. >+ > 2018-05-07 Youenn Fablet <youenn@apple.com> > > Layout Test webrtc/addICECandidate-closed.html is a flaky failure >diff --git a/LayoutTests/css3/filters/color-interpolation-filters-expected.html b/LayoutTests/css3/filters/color-interpolation-filters-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..824522e9b83369fcfa22bd492bbd132945c9521d >--- /dev/null >+++ b/LayoutTests/css3/filters/color-interpolation-filters-expected.html >@@ -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> >diff --git a/LayoutTests/css3/filters/color-interpolation-filters.html b/LayoutTests/css3/filters/color-interpolation-filters.html >new file mode 100644 >index 0000000000000000000000000000000000000000..98ef93db8065ec8cb5fbd9d24db6734a0d7f3023 >--- /dev/null >+++ b/LayoutTests/css3/filters/color-interpolation-filters.html >@@ -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>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
dino
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185343
:
339633
| 339756