summaryrefslogtreecommitdiff
path: root/Source/WebCore/svg/SVGUseElement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/svg/SVGUseElement.cpp')
-rw-r--r--Source/WebCore/svg/SVGUseElement.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/Source/WebCore/svg/SVGUseElement.cpp b/Source/WebCore/svg/SVGUseElement.cpp
index 272e01d38..fd7f2d217 100644
--- a/Source/WebCore/svg/SVGUseElement.cpp
+++ b/Source/WebCore/svg/SVGUseElement.cpp
@@ -130,12 +130,12 @@ bool SVGUseElement::isSupportedAttribute(const QualifiedName& attrName)
return supportedAttributes.contains<QualifiedName, SVGAttributeHashTranslator>(attrName);
}
-void SVGUseElement::parseMappedAttribute(Attribute* attr)
+void SVGUseElement::parseAttribute(Attribute* attr)
{
SVGParsingError parseError = NoError;
if (!isSupportedAttribute(attr->name()))
- SVGStyledTransformableElement::parseMappedAttribute(attr);
+ SVGStyledTransformableElement::parseAttribute(attr);
else if (attr->name() == SVGNames::xAttr)
setXBaseValue(SVGLength::construct(LengthModeWidth, attr->value(), parseError));
else if (attr->name() == SVGNames::yAttr)
@@ -144,10 +144,10 @@ void SVGUseElement::parseMappedAttribute(Attribute* attr)
setWidthBaseValue(SVGLength::construct(LengthModeWidth, attr->value(), parseError, ForbidNegativeLengths));
else if (attr->name() == SVGNames::heightAttr)
setHeightBaseValue(SVGLength::construct(LengthModeHeight, attr->value(), parseError, ForbidNegativeLengths));
- else if (SVGTests::parseMappedAttribute(attr)
- || SVGLangSpace::parseMappedAttribute(attr)
- || SVGExternalResourcesRequired::parseMappedAttribute(attr)
- || SVGURIReference::parseMappedAttribute(attr)) {
+ else if (SVGTests::parseAttribute(attr)
+ || SVGLangSpace::parseAttribute(attr)
+ || SVGExternalResourcesRequired::parseAttribute(attr)
+ || SVGURIReference::parseAttribute(attr)) {
} else
ASSERT_NOT_REACHED();
@@ -358,17 +358,12 @@ void SVGUseElement::didRecalcStyle(StyleChange change)
if (!shadowRoot)
return;
- bool needsStyleUpdate = !m_needsShadowTreeRecreation;
if (m_needsShadowTreeRecreation) {
shadowRoot->markShadowTreeForRecreation();
m_needsShadowTreeRecreation = false;
}
shadowRoot->updateFromElement();
-
- if (!needsStyleUpdate)
- return;
-
shadowRoot->updateStyle(change);
}