Index: Source/core/svg/SVGRectElement.cpp |
diff --git a/Source/core/svg/SVGRectElement.cpp b/Source/core/svg/SVGRectElement.cpp |
index f3ec3367d60823a475fc226bb6585c9f350a53fb..7492b05b7e41142ee21931fb03f8d88fb62fe066 100644 |
--- a/Source/core/svg/SVGRectElement.cpp |
+++ b/Source/core/svg/SVGRectElement.cpp |
@@ -56,20 +56,6 @@ DEFINE_TRACE(SVGRectElement) |
DEFINE_NODE_FACTORY(SVGRectElement) |
-bool SVGRectElement::isSupportedAttribute(const QualifiedName& attrName) |
-{ |
- DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); |
- if (supportedAttributes.isEmpty()) { |
- supportedAttributes.add(SVGNames::xAttr); |
- supportedAttributes.add(SVGNames::yAttr); |
- supportedAttributes.add(SVGNames::widthAttr); |
- supportedAttributes.add(SVGNames::heightAttr); |
- supportedAttributes.add(SVGNames::rxAttr); |
- supportedAttributes.add(SVGNames::ryAttr); |
- } |
- return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); |
-} |
- |
bool SVGRectElement::isPresentationAttribute(const QualifiedName& attrName) const |
{ |
if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr |
@@ -109,24 +95,27 @@ void SVGRectElement::collectStyleForPresentationAttribute(const QualifiedName& n |
void SVGRectElement::svgAttributeChanged(const QualifiedName& attrName) |
{ |
- if (!isSupportedAttribute(attrName)) { |
- SVGGeometryElement::svgAttributeChanged(attrName); |
- return; |
- } |
+ if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr |
+ || attrName == SVGNames::widthAttr || attrName == SVGNames::heightAttr |
+ || attrName == SVGNames::rxAttr || attrName == SVGNames::ryAttr) { |
+ SVGElement::InvalidationGuard invalidationGuard(this); |
- SVGElement::InvalidationGuard invalidationGuard(this); |
+ invalidateSVGPresentationAttributeStyle(); |
+ setNeedsStyleRecalc(LocalStyleChange, |
+ StyleChangeReasonForTracing::fromAttribute(attrName)); |
+ updateRelativeLengthsInformation(); |
- invalidateSVGPresentationAttributeStyle(); |
- setNeedsStyleRecalc(LocalStyleChange, |
- StyleChangeReasonForTracing::fromAttribute(attrName)); |
- updateRelativeLengthsInformation(); |
+ LayoutSVGShape* renderer = toLayoutSVGShape(this->layoutObject()); |
+ if (!renderer) |
+ return; |
+ |
+ renderer->setNeedsShapeUpdate(); |
+ markForLayoutAndParentResourceInvalidation(renderer); |
- LayoutSVGShape* renderer = toLayoutSVGShape(this->layoutObject()); |
- if (!renderer) |
return; |
+ } |
- renderer->setNeedsShapeUpdate(); |
- markForLayoutAndParentResourceInvalidation(renderer); |
+ SVGGeometryElement::svgAttributeChanged(attrName); |
} |
bool SVGRectElement::selfHasRelativeLengths() const |