summaryrefslogtreecommitdiff
path: root/Source/WebCore/svg/SVGPatternElement.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-11-22 09:09:45 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2012-11-22 09:10:13 +0100
commit470286ecfe79d59df14944e5b5d34630fc739391 (patch)
tree43983212872e06cebefd2ae474418fa2908ca54c /Source/WebCore/svg/SVGPatternElement.cpp
parent23037105e948c2065da5a937d3a2396b0ff45c1e (diff)
downloadqtwebkit-470286ecfe79d59df14944e5b5d34630fc739391.tar.gz
Imported WebKit commit e89504fa9195b2063b2530961d4b73dd08de3242 (http://svn.webkit.org/repository/webkit/trunk@135485)
Change-Id: I03774e5ac79721c13ffa30d152537a74d0b12e66 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'Source/WebCore/svg/SVGPatternElement.cpp')
-rw-r--r--Source/WebCore/svg/SVGPatternElement.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/Source/WebCore/svg/SVGPatternElement.cpp b/Source/WebCore/svg/SVGPatternElement.cpp
index c69ecd45a..2d9e4f135 100644
--- a/Source/WebCore/svg/SVGPatternElement.cpp
+++ b/Source/WebCore/svg/SVGPatternElement.cpp
@@ -110,45 +110,45 @@ bool SVGPatternElement::isSupportedAttribute(const QualifiedName& attrName)
return supportedAttributes.contains<QualifiedName, SVGAttributeHashTranslator>(attrName);
}
-void SVGPatternElement::parseAttribute(const Attribute& attribute)
+void SVGPatternElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
SVGParsingError parseError = NoError;
- if (!isSupportedAttribute(attribute.name()))
- SVGStyledElement::parseAttribute(attribute);
- else if (attribute.name() == SVGNames::patternUnitsAttr) {
- SVGUnitTypes::SVGUnitType propertyValue = SVGPropertyTraits<SVGUnitTypes::SVGUnitType>::fromString(attribute.value());
+ if (!isSupportedAttribute(name))
+ SVGStyledElement::parseAttribute(name, value);
+ else if (name == SVGNames::patternUnitsAttr) {
+ SVGUnitTypes::SVGUnitType propertyValue = SVGPropertyTraits<SVGUnitTypes::SVGUnitType>::fromString(value);
if (propertyValue > 0)
setPatternUnitsBaseValue(propertyValue);
return;
- } else if (attribute.name() == SVGNames::patternContentUnitsAttr) {
- SVGUnitTypes::SVGUnitType propertyValue = SVGPropertyTraits<SVGUnitTypes::SVGUnitType>::fromString(attribute.value());
+ } else if (name == SVGNames::patternContentUnitsAttr) {
+ SVGUnitTypes::SVGUnitType propertyValue = SVGPropertyTraits<SVGUnitTypes::SVGUnitType>::fromString(value);
if (propertyValue > 0)
setPatternContentUnitsBaseValue(propertyValue);
return;
- } else if (attribute.name() == SVGNames::patternTransformAttr) {
+ } else if (name == SVGNames::patternTransformAttr) {
SVGTransformList newList;
- newList.parse(attribute.value());
+ newList.parse(value);
detachAnimatedPatternTransformListWrappers(newList.size());
setPatternTransformBaseValue(newList);
return;
- } else if (attribute.name() == SVGNames::xAttr)
- setXBaseValue(SVGLength::construct(LengthModeWidth, attribute.value(), parseError));
- else if (attribute.name() == SVGNames::yAttr)
- setYBaseValue(SVGLength::construct(LengthModeHeight, attribute.value(), parseError));
- else if (attribute.name() == SVGNames::widthAttr)
- setWidthBaseValue(SVGLength::construct(LengthModeWidth, attribute.value(), parseError, ForbidNegativeLengths));
- else if (attribute.name() == SVGNames::heightAttr)
- setHeightBaseValue(SVGLength::construct(LengthModeHeight, attribute.value(), parseError, ForbidNegativeLengths));
- else if (SVGURIReference::parseAttribute(attribute)
- || SVGTests::parseAttribute(attribute)
- || SVGLangSpace::parseAttribute(attribute)
- || SVGExternalResourcesRequired::parseAttribute(attribute)
- || SVGFitToViewBox::parseAttribute(this, attribute)) {
+ } else if (name == SVGNames::xAttr)
+ setXBaseValue(SVGLength::construct(LengthModeWidth, value, parseError));
+ else if (name == SVGNames::yAttr)
+ setYBaseValue(SVGLength::construct(LengthModeHeight, value, parseError));
+ else if (name == SVGNames::widthAttr)
+ setWidthBaseValue(SVGLength::construct(LengthModeWidth, value, parseError, ForbidNegativeLengths));
+ else if (name == SVGNames::heightAttr)
+ setHeightBaseValue(SVGLength::construct(LengthModeHeight, value, parseError, ForbidNegativeLengths));
+ else if (SVGURIReference::parseAttribute(name, value)
+ || SVGTests::parseAttribute(name, value)
+ || SVGLangSpace::parseAttribute(name, value)
+ || SVGExternalResourcesRequired::parseAttribute(name, value)
+ || SVGFitToViewBox::parseAttribute(this, name, value)) {
} else
ASSERT_NOT_REACHED();
- reportAttributeParsingError(parseError, attribute);
+ reportAttributeParsingError(parseError, name, value);
}
void SVGPatternElement::svgAttributeChanged(const QualifiedName& attrName)