Index: Source/core/svg/SVGLinearGradientElement.cpp |
diff --git a/Source/core/svg/SVGLinearGradientElement.cpp b/Source/core/svg/SVGLinearGradientElement.cpp |
index ec7a890eef226f4b93f11e01ed7e8303236f8c75..abae7ef59348cd6696908f1a9aa9f25236519130 100644 |
--- a/Source/core/svg/SVGLinearGradientElement.cpp |
+++ b/Source/core/svg/SVGLinearGradientElement.cpp |
@@ -57,32 +57,22 @@ DEFINE_TRACE(SVGLinearGradientElement) |
DEFINE_NODE_FACTORY(SVGLinearGradientElement) |
-bool SVGLinearGradientElement::isSupportedAttribute(const QualifiedName& attrName) |
-{ |
- DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); |
- if (supportedAttributes.isEmpty()) { |
- supportedAttributes.add(SVGNames::x1Attr); |
- supportedAttributes.add(SVGNames::x2Attr); |
- supportedAttributes.add(SVGNames::y1Attr); |
- supportedAttributes.add(SVGNames::y2Attr); |
- } |
- return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); |
-} |
- |
void SVGLinearGradientElement::svgAttributeChanged(const QualifiedName& attrName) |
{ |
- if (!isSupportedAttribute(attrName)) { |
- SVGGradientElement::svgAttributeChanged(attrName); |
- return; |
- } |
+ if (attrName == SVGNames::x1Attr || attrName == SVGNames::x2Attr |
+ || attrName == SVGNames::y1Attr || attrName == SVGNames::y2Attr) { |
+ 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* SVGLinearGradientElement::createLayoutObject(const ComputedStyle&) |