Index: Source/core/svg/SVGFEDiffuseLightingElement.cpp |
diff --git a/Source/core/svg/SVGFEDiffuseLightingElement.cpp b/Source/core/svg/SVGFEDiffuseLightingElement.cpp |
index 7b63d95540172295a102b6c86fd3aa235c0b6093..d2aa04c3e5211d994375eefe5e65749d767d9b5d 100644 |
--- a/Source/core/svg/SVGFEDiffuseLightingElement.cpp |
+++ b/Source/core/svg/SVGFEDiffuseLightingElement.cpp |
@@ -168,8 +168,8 @@ PassRefPtr<FilterEffect> SVGFEDiffuseLightingElement::build(SVGFilterBuilder* fi |
if (!input1) |
return nullptr; |
- RefPtr<LightSource> lightSource = SVGFELightElement::findLightSource(*this); |
- if (!lightSource) |
+ SVGFELightElement* lightNode = SVGFELightElement::findLightElement(*this); |
+ if (!lightNode) |
return nullptr; |
RenderObject* renderer = this->renderer(); |
@@ -179,6 +179,7 @@ PassRefPtr<FilterEffect> SVGFEDiffuseLightingElement::build(SVGFilterBuilder* fi |
ASSERT(renderer->style()); |
Color color = renderer->style()->svgStyle()->lightingColor(); |
+ RefPtr<LightSource> lightSource = lightNode->lightSource(filter); |
RefPtr<FilterEffect> effect = FEDiffuseLighting::create(filter, color, m_surfaceScale->currentValue()->value(), m_diffuseConstant->currentValue()->value(), |
kernelUnitLengthX()->currentValue()->value(), kernelUnitLengthY()->currentValue()->value(), lightSource.release()); |
effect->inputEffects().append(input1); |