diff options
Diffstat (limited to 'Source/WebCore/svg/SVGFEDiffuseLightingElement.cpp')
-rw-r--r-- | Source/WebCore/svg/SVGFEDiffuseLightingElement.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Source/WebCore/svg/SVGFEDiffuseLightingElement.cpp b/Source/WebCore/svg/SVGFEDiffuseLightingElement.cpp index a4c2a6b..f58be8f 100644 --- a/Source/WebCore/svg/SVGFEDiffuseLightingElement.cpp +++ b/Source/WebCore/svg/SVGFEDiffuseLightingElement.cpp @@ -87,14 +87,17 @@ void SVGFEDiffuseLightingElement::parseMappedAttribute(Attribute* attr) bool SVGFEDiffuseLightingElement::setFilterEffectAttribute(FilterEffect* effect, const QualifiedName& attrName) { FEDiffuseLighting* diffuseLighting = static_cast<FEDiffuseLighting*>(effect); + + if (attrName == SVGNames::lighting_colorAttr) { + RenderObject* renderer = this->renderer(); + ASSERT(renderer); + ASSERT(renderer->style()); + return diffuseLighting->setLightingColor(renderer->style()->svgStyle()->lightingColor()); + } if (attrName == SVGNames::surfaceScaleAttr) return diffuseLighting->setSurfaceScale(surfaceScale()); if (attrName == SVGNames::diffuseConstantAttr) return diffuseLighting->setDiffuseConstant(diffuseConstant()); - if (attrName == SVGNames::lighting_colorAttr) { - RefPtr<RenderStyle> filterStyle = styleForRenderer(); - return diffuseLighting->setLightingColor(filterStyle->svgStyle()->lightingColor()); - } LightSource* lightSource = const_cast<LightSource*>(diffuseLighting->lightSource()); const SVGFELightElement* lightElement = SVGFELightElement::findLightElement(this); |