Index: Source/core/svg/SVGMaskElement.cpp |
diff --git a/Source/core/svg/SVGMaskElement.cpp b/Source/core/svg/SVGMaskElement.cpp |
index f634cfa5638983e7a666363eaec19262c55d7b6f..a20dc924f3209cb1344b995ac0ba6bab8d32dca2 100644 |
--- a/Source/core/svg/SVGMaskElement.cpp |
+++ b/Source/core/svg/SVGMaskElement.cpp |
@@ -69,21 +69,6 @@ DEFINE_TRACE(SVGMaskElement) |
DEFINE_NODE_FACTORY(SVGMaskElement) |
-bool SVGMaskElement::isSupportedAttribute(const QualifiedName& attrName) |
-{ |
- DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); |
- if (supportedAttributes.isEmpty()) { |
- SVGTests::addSupportedAttributes(supportedAttributes); |
- supportedAttributes.add(SVGNames::maskUnitsAttr); |
- supportedAttributes.add(SVGNames::maskContentUnitsAttr); |
- supportedAttributes.add(SVGNames::xAttr); |
- supportedAttributes.add(SVGNames::yAttr); |
- supportedAttributes.add(SVGNames::widthAttr); |
- supportedAttributes.add(SVGNames::heightAttr); |
- } |
- return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); |
-} |
- |
bool SVGMaskElement::isPresentationAttribute(const QualifiedName& attrName) const |
{ |
if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr |
@@ -117,26 +102,31 @@ void SVGMaskElement::collectStyleForPresentationAttribute(const QualifiedName& n |
void SVGMaskElement::svgAttributeChanged(const QualifiedName& attrName) |
{ |
- if (!isSupportedAttribute(attrName)) { |
- SVGElement::svgAttributeChanged(attrName); |
- return; |
- } |
- |
- SVGElement::InvalidationGuard invalidationGuard(this); |
- |
- if (attrName == SVGNames::xAttr |
+ bool isLengthAttr = attrName == SVGNames::xAttr |
|| attrName == SVGNames::yAttr |
|| attrName == SVGNames::widthAttr |
- || attrName == SVGNames::heightAttr) { |
+ || attrName == SVGNames::heightAttr; |
+ |
+ if (isLengthAttr) { |
invalidateSVGPresentationAttributeStyle(); |
setNeedsStyleRecalc(LocalStyleChange, |
StyleChangeReasonForTracing::fromAttribute(attrName)); |
updateRelativeLengthsInformation(); |
} |
- LayoutSVGResourceContainer* renderer = toLayoutSVGResourceContainer(this->layoutObject()); |
- if (renderer) |
- renderer->invalidateCacheAndMarkForLayout(); |
+ if (isLengthAttr |
+ || attrName == SVGNames::maskUnitsAttr |
+ || attrName == SVGNames::maskContentUnitsAttr |
+ || SVGTests::isKnownAttribute(attrName)) { |
+ SVGElement::InvalidationGuard invalidationGuard(this); |
+ LayoutSVGResourceContainer* renderer = toLayoutSVGResourceContainer(this->layoutObject()); |
+ if (renderer) |
+ renderer->invalidateCacheAndMarkForLayout(); |
+ |
+ return; |
+ } |
+ |
+ SVGElement::svgAttributeChanged(attrName); |
} |
void SVGMaskElement::childrenChanged(const ChildrenChange& change) |