void SVGFEDiffuseLightingElement::parseAttribute(const QualifiedName& name, const AtomicString& value) { if (name == SVGNames::inAttr) { setIn1BaseValue(value); return; } if (name == SVGNames::surfaceScaleAttr) { setSurfaceScaleBaseValue(value.toFloat()); return; } if (name == SVGNames::diffuseConstantAttr) { setDiffuseConstantBaseValue(value.toFloat()); return; } if (name == SVGNames::kernelUnitLengthAttr) { float x, y; if (parseNumberOptionalNumber(value, x, y)) { setKernelUnitLengthXBaseValue(x); setKernelUnitLengthYBaseValue(y); } return; } SVGFilterPrimitiveStandardAttributes::parseAttribute(name, value); }
void SVGFEDiffuseLightingElement::parseMappedAttribute(MappedAttribute *attr) { const String& value = attr->value(); if (attr->name() == SVGNames::inAttr) setIn1BaseValue(value); else if (attr->name() == SVGNames::surfaceScaleAttr) setSurfaceScaleBaseValue(value.toFloat()); else if (attr->name() == SVGNames::diffuseConstantAttr) setDiffuseConstantBaseValue(value.toInt()); else if (attr->name() == SVGNames::kernelUnitLengthAttr) { float x, y; if (parseNumberOptionalNumber(value, x, y)) { setKernelUnitLengthXBaseValue(x); setKernelUnitLengthYBaseValue(y); } } else SVGFilterPrimitiveStandardAttributes::parseMappedAttribute(attr); }