REGRESSION (r225122): fePointLights don't work
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 1 Jan 2018 20:32:33 +0000 (20:32 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 1 Jan 2018 20:32:33 +0000 (20:32 +0000)
commit43f4327c0778268bfcb4c1533126537f5f1315e8
treeda1ea748a35f9da621b0d7164af0b47208d77831
parent18624a342d0bb7f7cd81d282b52d24635d91072a
REGRESSION (r225122): fePointLights don't work
https://bugs.webkit.org/show_bug.cgi?id=181142

Reviewed by Dan Bates.

Source/WebCore:

r225122 refactored the initialLightingData code, but failed to set the lighting
color in the return value of PointLightSource::computePixelLightingData, so fePointLights
always used black.

Also fix a spelling error in initialLightingData.

Tests: svg/filters/fePointLight-color.svg

* platform/graphics/filters/DistantLightSource.cpp:
(WebCore::DistantLightSource::initPaintingData):
(WebCore::DistantLightSource::computePixelLightingData const):
* platform/graphics/filters/FELighting.cpp:
(WebCore::FELighting::drawLighting):
* platform/graphics/filters/LightSource.h:
* platform/graphics/filters/PointLightSource.cpp:
(WebCore::PointLightSource::computePixelLightingData const):
* platform/graphics/filters/SpotLightSource.cpp:
(WebCore::SpotLightSource::computePixelLightingData const):

LayoutTests:

Ref test that compares a point light with a flood color.

* svg/filters/fePointLight-color-expected.svg: Added.
* svg/filters/fePointLight-color.svg: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@226317 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/svg/filters/fePointLight-color-expected.svg [new file with mode: 0644]
LayoutTests/svg/filters/fePointLight-color.svg [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/filters/DistantLightSource.cpp
Source/WebCore/platform/graphics/filters/FELighting.cpp
Source/WebCore/platform/graphics/filters/LightSource.h
Source/WebCore/platform/graphics/filters/PointLightSource.cpp
Source/WebCore/platform/graphics/filters/SpotLightSource.cpp