diff options
Diffstat (limited to 'WebCore/svg/SVGFESpecularLightingElement.cpp')
-rw-r--r-- | WebCore/svg/SVGFESpecularLightingElement.cpp | 37 |
1 files changed, 31 insertions, 6 deletions
diff --git a/WebCore/svg/SVGFESpecularLightingElement.cpp b/WebCore/svg/SVGFESpecularLightingElement.cpp index 90e9cb3..0602103 100644 --- a/WebCore/svg/SVGFESpecularLightingElement.cpp +++ b/WebCore/svg/SVGFESpecularLightingElement.cpp @@ -36,12 +36,9 @@ namespace WebCore { SVGFESpecularLightingElement::SVGFESpecularLightingElement(const QualifiedName& tagName, Document* doc) : SVGFilterPrimitiveStandardAttributes(tagName, doc) - , m_in1(this, SVGNames::inAttr) - , m_specularConstant(this, SVGNames::specularConstantAttr, 1.0f) - , m_specularExponent(this, SVGNames::specularExponentAttr, 1.0f) - , m_surfaceScale(this, SVGNames::surfaceScaleAttr, 1.0f) - , m_kernelUnitLengthX(this, SVGNames::kernelUnitLengthAttr) - , m_kernelUnitLengthY(this, SVGNames::kernelUnitLengthAttr) + , m_specularConstant(1.0f) + , m_specularExponent(1.0f) + , m_surfaceScale(1.0f) { } @@ -70,6 +67,34 @@ void SVGFESpecularLightingElement::parseMappedAttribute(MappedAttribute* attr) SVGFilterPrimitiveStandardAttributes::parseMappedAttribute(attr); } +void SVGFESpecularLightingElement::synchronizeProperty(const QualifiedName& attrName) +{ + SVGFilterPrimitiveStandardAttributes::synchronizeProperty(attrName); + + if (attrName == anyQName()) { + synchronizeIn1(); + synchronizeSurfaceScale(); + synchronizeSpecularConstant(); + synchronizeSpecularExponent(); + synchronizeKernelUnitLengthX(); + synchronizeKernelUnitLengthY(); + return; + } + + if (attrName == SVGNames::inAttr) + synchronizeIn1(); + else if (attrName == SVGNames::surfaceScaleAttr) + synchronizeSurfaceScale(); + else if (attrName == SVGNames::specularConstantAttr) + synchronizeSpecularConstant(); + else if (attrName == SVGNames::specularExponentAttr) + synchronizeSpecularExponent(); + else if (attrName == SVGNames::kernelUnitLengthAttr) { + synchronizeKernelUnitLengthX(); + synchronizeKernelUnitLengthY(); + } +} + PassRefPtr<LightSource> SVGFESpecularLightingElement::findLights() const { for (Node* n = firstChild(); n; n = n->nextSibling()) { |