CSS reference filter that references a tiled feTurbulence is blank
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Sep 2018 22:51:47 +0000 (22:51 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Sep 2018 22:51:47 +0000 (22:51 +0000)
commit3b8f91e6cd629525edf26ea3b0da16ae59fc41cd
tree42db956543c2762add30e793591c7af612a9a7d2
parenta3ab95340e7d9e25c1d287898b395497069c9f5f
CSS reference filter that references a tiled feTurbulence is blank
https://bugs.webkit.org/show_bug.cgi?id=188950

Reviewed by Dean Jackson.
Source/WebCore:

We need to run the code that was in RenderSVGResourceFilterPrimitive::determineFilterPrimitiveSubregion()
for CSS reference filters, to set up the various rects in the filter effects.

Do this by moving the code to FilterEffect::determineFilterPrimitiveSubregion(), which makes sense
because it recurses on the FilterEffect input chain. To make it CSS/SVGFilter agnostic, we move filterRegionInUserSpace()
to the Filter base class (for CSSFilter, it just returns m_filterRegion).

Test: css3/filters/reference-filter-set-filter-regions.html

* platform/graphics/filters/Filter.h:
* platform/graphics/filters/FilterEffect.cpp:
(WebCore::FilterEffect::determineFilterPrimitiveSubregion):
* platform/graphics/filters/FilterEffect.h:
* rendering/CSSFilter.cpp:
(WebCore::CSSFilter::determineFilterPrimitiveSubregion):
* rendering/CSSFilter.h:
* rendering/RenderLayerFilters.cpp:
(WebCore::RenderLayerFilters::beginFilterEffect):
* rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::applyResource):
* rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
(WebCore::RenderSVGResourceFilterPrimitive::determineFilterPrimitiveSubregion): Deleted.
* rendering/svg/RenderSVGResourceFilterPrimitive.h:
* svg/graphics/filters/SVGFilter.h:

LayoutTests:

* css3/filters/reference-filter-set-filter-regions-expected.html: Added.
* css3/filters/reference-filter-set-filter-regions.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235644 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
LayoutTests/ChangeLog
LayoutTests/css3/filters/reference-filter-set-filter-regions-expected.html [new file with mode: 0644]
LayoutTests/css3/filters/reference-filter-set-filter-regions.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/filters/Filter.h
Source/WebCore/platform/graphics/filters/FilterEffect.cpp
Source/WebCore/platform/graphics/filters/FilterEffect.h
Source/WebCore/rendering/CSSFilter.cpp
Source/WebCore/rendering/CSSFilter.h
Source/WebCore/rendering/RenderLayerFilters.cpp
Source/WebCore/rendering/svg/RenderSVGResourceFilter.cpp
Source/WebCore/rendering/svg/RenderSVGResourceFilterPrimitive.cpp
Source/WebCore/rendering/svg/RenderSVGResourceFilterPrimitive.h
Source/WebCore/svg/graphics/filters/SVGFilter.h