Index: Source/core/svg/SVGRadialGradientElement.cpp |
diff --git a/Source/core/svg/SVGRadialGradientElement.cpp b/Source/core/svg/SVGRadialGradientElement.cpp |
index 32481b134d2e866bf7dac188511ade04cd31e3b3..fb617b6f406217656c1af6fc7b81cbd78462c3ba 100644 |
--- a/Source/core/svg/SVGRadialGradientElement.cpp |
+++ b/Source/core/svg/SVGRadialGradientElement.cpp |
@@ -67,34 +67,23 @@ DEFINE_TRACE(SVGRadialGradientElement) |
DEFINE_NODE_FACTORY(SVGRadialGradientElement) |
-bool SVGRadialGradientElement::isSupportedAttribute(const QualifiedName& attrName) |
-{ |
- DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); |
- if (supportedAttributes.isEmpty()) { |
- supportedAttributes.add(SVGNames::cxAttr); |
- supportedAttributes.add(SVGNames::cyAttr); |
- supportedAttributes.add(SVGNames::fxAttr); |
- supportedAttributes.add(SVGNames::fyAttr); |
- supportedAttributes.add(SVGNames::rAttr); |
- supportedAttributes.add(SVGNames::frAttr); |
- } |
- return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); |
-} |
- |
void SVGRadialGradientElement::svgAttributeChanged(const QualifiedName& attrName) |
{ |
- if (!isSupportedAttribute(attrName)) { |
- SVGGradientElement::svgAttributeChanged(attrName); |
- return; |
- } |
+ if (attrName == SVGNames::cxAttr || attrName == SVGNames::cyAttr |
+ || attrName == SVGNames::fxAttr || attrName == SVGNames::fyAttr |
+ || attrName == SVGNames::rAttr || attrName == SVGNames::frAttr) { |
+ SVGElement::InvalidationGuard invalidationGuard(this); |
+ |
+ updateRelativeLengthsInformation(); |
- SVGElement::InvalidationGuard invalidationGuard(this); |
+ LayoutSVGResourceContainer* renderer = toLayoutSVGResourceContainer(this->layoutObject()); |
+ if (renderer) |
+ renderer->invalidateCacheAndMarkForLayout(); |
- updateRelativeLengthsInformation(); |
+ return; |
+ } |
- LayoutSVGResourceContainer* renderer = toLayoutSVGResourceContainer(this->layoutObject()); |
- if (renderer) |
- renderer->invalidateCacheAndMarkForLayout(); |
+ SVGGradientElement::svgAttributeChanged(attrName); |
} |
LayoutObject* SVGRadialGradientElement::createLayoutObject(const ComputedStyle&) |