bool SVGFESpecularLightingElement::setFilterEffectAttribute(FilterEffect* effect, const QualifiedName& attrName) { FESpecularLighting* specularLighting = static_cast<FESpecularLighting*>(effect); if (attrName == SVGNames::lighting_colorAttr) { RenderObject* renderer = this->renderer(); ASSERT(renderer); ASSERT(renderer->style()); return specularLighting->setLightingColor(renderer->style()->svgStyle()->lightingColor()); } if (attrName == SVGNames::surfaceScaleAttr) return specularLighting->setSurfaceScale(m_surfaceScale->currentValue()->value()); if (attrName == SVGNames::specularConstantAttr) return specularLighting->setSpecularConstant(m_specularConstant->currentValue()->value()); if (attrName == SVGNames::specularExponentAttr) return specularLighting->setSpecularExponent(m_specularExponent->currentValue()->value()); LightSource* lightSource = const_cast<LightSource*>(specularLighting->lightSource()); SVGFELightElement* lightElement = SVGFELightElement::findLightElement(*this); ASSERT(lightSource); ASSERT(lightElement); if (attrName == SVGNames::azimuthAttr) return lightSource->setAzimuth(lightElement->azimuth()->currentValue()->value()); if (attrName == SVGNames::elevationAttr) return lightSource->setElevation(lightElement->elevation()->currentValue()->value()); if (attrName == SVGNames::xAttr) return lightSource->setX(lightElement->x()->currentValue()->value()); if (attrName == SVGNames::yAttr) return lightSource->setY(lightElement->y()->currentValue()->value()); if (attrName == SVGNames::zAttr) return lightSource->setZ(lightElement->z()->currentValue()->value()); if (attrName == SVGNames::pointsAtXAttr) return lightSource->setPointsAtX(lightElement->pointsAtX()->currentValue()->value()); if (attrName == SVGNames::pointsAtYAttr) return lightSource->setPointsAtY(lightElement->pointsAtY()->currentValue()->value()); if (attrName == SVGNames::pointsAtZAttr) return lightSource->setPointsAtZ(lightElement->pointsAtZ()->currentValue()->value()); if (attrName == SVGNames::specularExponentAttr) return lightSource->setSpecularExponent(lightElement->specularExponent()->currentValue()->value()); if (attrName == SVGNames::limitingConeAngleAttr) return lightSource->setLimitingConeAngle(lightElement->limitingConeAngle()->currentValue()->value()); ASSERT_NOT_REACHED(); return false; }