feMorphology stops applying if either x or y radius is 0 but should not.
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Jan 2018 21:39:12 +0000 (21:39 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Jan 2018 21:39:12 +0000 (21:39 +0000)
commit53e32cee01596b592a6e583edf53124fd8235425
treea4020935f994ff183c418d001611deac2822997d
parent71d1b75840162a8b07af254f945515c895520919
feMorphology stops applying if either x or y radius is 0 but should not.
https://bugs.webkit.org/show_bug.cgi?id=181903

Reviewed by Dean Jackson.
Source/WebCore:

feMorphology should allow the radius on one axis to be zero but still apply the effect
(it's akin to a blur on just one axis). Also, any negative radius, or zero on both axes
should act like a pass-through, rather than outputting transparent blank (this is a spec
change from SVG 1.1 to SVG 2).

Tests: svg/filters/feMorphology-zero-radius-one-axis-expected.svg
       svg/filters/feMorphology-zero-radius-one-axis.svg

* platform/graphics/filters/FEMorphology.cpp:
(WebCore::FEMorphology::platformApplyDegenerate):
* platform/graphics/filters/FilterEffect.cpp:
(WebCore::FilterEffect::createImageBufferResult):

LayoutTests:

* svg/filters/feMorphology-zero-radius-one-axis-expected.svg: Added.
* svg/filters/feMorphology-zero-radius-one-axis.svg: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227440 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/svg/filters/feMorphology-zero-radius-one-axis-expected.svg [new file with mode: 0644]
LayoutTests/svg/filters/feMorphology-zero-radius-one-axis.svg [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/filters/FEMorphology.cpp
Source/WebCore/platform/graphics/filters/FilterEffect.cpp