Created attachment 460186 [details]
fePointLight test case
Open the attached test cases.
Expected: A green circle and green ellipse should be drawn.
The problem is PointLightSource and SpotLightSource are created with points in user space coordinates. See SVGFEPointLightElement::lightSource() and SVGFESpotLightElement::lightSource(). But this requires knowing the filter targetBoundingBox and the primitiveUnits.
When dynamically updating these points through SVGFEDiffuseLightingElement::setFilterEffectAttribute() or SVGFESpecularLightingElement::setFilterEffectAttribute() the filter is not available and these points are set in logical coordinates. This means these points will have values between -1 and 1 in user space coordinates. This is why the green circle and ellipse are not shown in the test cases.
The fix is to make LightSource store their points in logical coordinates and to resolve them to user space coordinates in initPaintingData().
Created attachment 460187 [details]
feSpotLight test case
Pull request: https://github.com/WebKit/WebKit/pull/1462
See https://drafts.csswg.org/css-values-4/#typedef-length-percentage for the definition of <length-percentage>.
Committed r295481 (251486@main): <https://commits.webkit.org/251486@main>
Reviewed commits have been landed. Closing PR #1462 and removing active labels.