feMorphology filter in CSS doesn't update when element moves
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 24 Sep 2018 18:20:46 +0000 (18:20 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 24 Sep 2018 18:20:46 +0000 (18:20 +0000)
commit815b6f101768c05ed3b4ea48e01e06f29358df8c
treec91355934d5d161665cc92218f275cebd3cc1580
parent106c2c8d1095a82d66c96722b0b713ee4bc3d688
feMorphology filter in CSS doesn't update when element moves
https://bugs.webkit.org/show_bug.cgi?id=189895

Reviewed by Dean Jackson.

Source/WebCore:

SourceAlpha needs to be invalidated from clearIntermediateResults(),
so get it from the SVGFilterBuilder (which always creates one) and store in
a member variable.

Test: css3/filters/invalidate-sourceAlpha.html

* rendering/CSSFilter.cpp:
(WebCore::CSSFilter::buildReferenceFilter):
(WebCore::CSSFilter::clearIntermediateResults):
* rendering/CSSFilter.h:
* svg/graphics/filters/SVGFilterBuilder.h:

LayoutTests:

Test that moves a box inside a filtered div. Masking is necessary to work
around bugs in feMorphology invalidation (webkit.org/b/189896).

* css3/filters/invalidate-sourceAlpha-expected.html: Added.
* css3/filters/invalidate-sourceAlpha.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236416 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/css3/filters/invalidate-sourceAlpha-expected.html [new file with mode: 0644]
LayoutTests/css3/filters/invalidate-sourceAlpha.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/CSSFilter.cpp
Source/WebCore/rendering/CSSFilter.h
Source/WebCore/svg/graphics/filters/SVGFilterBuilder.h