void SVGLinearGradientElement::parseMappedAttribute(MappedAttribute* attr) { if (attr->name() == SVGNames::x1Attr) setX1BaseValue(SVGLength(LengthModeWidth, attr->value())); else if (attr->name() == SVGNames::y1Attr) setY1BaseValue(SVGLength(LengthModeHeight, attr->value())); else if (attr->name() == SVGNames::x2Attr) setX2BaseValue(SVGLength(LengthModeWidth, attr->value())); else if (attr->name() == SVGNames::y2Attr) setY2BaseValue(SVGLength(LengthModeHeight, attr->value())); else SVGGradientElement::parseMappedAttribute(attr); }
void SVGLinearGradientElement::parseAttribute(const QualifiedName& name, const AtomicString& value) { SVGParsingError parseError = NoError; if (name == SVGNames::x1Attr) setX1BaseValue(SVGLengthValue::construct(LengthModeWidth, value, parseError)); else if (name == SVGNames::y1Attr) setY1BaseValue(SVGLengthValue::construct(LengthModeHeight, value, parseError)); else if (name == SVGNames::x2Attr) setX2BaseValue(SVGLengthValue::construct(LengthModeWidth, value, parseError)); else if (name == SVGNames::y2Attr) setY2BaseValue(SVGLengthValue::construct(LengthModeHeight, value, parseError)); reportAttributeParsingError(parseError, name, value); SVGGradientElement::parseAttribute(name, value); }
void SVGLineElement::parseMappedAttribute(Attribute* attr) { if (attr->name() == SVGNames::x1Attr) setX1BaseValue(SVGLength(LengthModeWidth, attr->value())); else if (attr->name() == SVGNames::y1Attr) setY1BaseValue(SVGLength(LengthModeHeight, attr->value())); else if (attr->name() == SVGNames::x2Attr) setX2BaseValue(SVGLength(LengthModeWidth, attr->value())); else if (attr->name() == SVGNames::y2Attr) setY2BaseValue(SVGLength(LengthModeHeight, attr->value())); else { if (SVGTests::parseMappedAttribute(attr)) return; if (SVGLangSpace::parseMappedAttribute(attr)) return; if (SVGExternalResourcesRequired::parseMappedAttribute(attr)) return; SVGStyledTransformableElement::parseMappedAttribute(attr); } }
void SVGLineElement::parseAttribute(const QualifiedName& name, const AtomicString& value) { SVGParsingError parseError = NoError; if (!isSupportedAttribute(name)) SVGGraphicsElement::parseAttribute(name, value); else if (name == SVGNames::x1Attr) setX1BaseValue(SVGLength::construct(LengthModeWidth, value, parseError)); else if (name == SVGNames::y1Attr) setY1BaseValue(SVGLength::construct(LengthModeHeight, value, parseError)); else if (name == SVGNames::x2Attr) setX2BaseValue(SVGLength::construct(LengthModeWidth, value, parseError)); else if (name == SVGNames::y2Attr) setY2BaseValue(SVGLength::construct(LengthModeHeight, value, parseError)); else if (SVGLangSpace::parseAttribute(name, value) || SVGExternalResourcesRequired::parseAttribute(name, value)) { } else ASSERT_NOT_REACHED(); reportAttributeParsingError(parseError, name, value); }