Index: Source/core/svg/SVGFESpecularLightingElement.cpp |
diff --git a/Source/core/svg/SVGFESpecularLightingElement.cpp b/Source/core/svg/SVGFESpecularLightingElement.cpp |
index 422b6a4cb8ac3358d5ae2d39397eae45b3be57f5..2781bd5eadb9ed3106cbffee1ed62b66db40dc45 100644 |
--- a/Source/core/svg/SVGFESpecularLightingElement.cpp |
+++ b/Source/core/svg/SVGFESpecularLightingElement.cpp |
@@ -175,8 +175,8 @@ PassRefPtr<FilterEffect> SVGFESpecularLightingElement::build(SVGFilterBuilder* f |
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(); |
@@ -186,6 +186,7 @@ PassRefPtr<FilterEffect> SVGFESpecularLightingElement::build(SVGFilterBuilder* f |
ASSERT(renderer->style()); |
Color color = renderer->style()->svgStyle()->lightingColor(); |
+ RefPtr<LightSource> lightSource = lightNode->lightSource(filter); |
RefPtr<FilterEffect> effect = FESpecularLighting::create(filter, color, m_surfaceScale->currentValue()->value(), m_specularConstant->currentValue()->value(), |
m_specularExponent->currentValue()->value(), kernelUnitLengthX()->currentValue()->value(), kernelUnitLengthY()->currentValue()->value(), lightSource.release()); |
effect->inputEffects().append(input1); |