| Index: Source/core/svg/SVGFilterElement.cpp
|
| diff --git a/Source/core/svg/SVGFilterElement.cpp b/Source/core/svg/SVGFilterElement.cpp
|
| index 1e14544ae9e2cf7b5f9962e12992f94ad68a92a5..2ae0f07bcd7ea1a079e819915e6dd9c29192597c 100644
|
| --- a/Source/core/svg/SVGFilterElement.cpp
|
| +++ b/Source/core/svg/SVGFilterElement.cpp
|
| @@ -86,31 +86,8 @@ void SVGFilterElement::setFilterRes(unsigned x, unsigned y)
|
| svgAttributeChanged(SVGNames::filterResAttr);
|
| }
|
|
|
| -bool SVGFilterElement::isSupportedAttribute(const QualifiedName& attrName)
|
| -{
|
| - DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
|
| - if (supportedAttributes.isEmpty()) {
|
| - SVGURIReference::addSupportedAttributes(supportedAttributes);
|
| - supportedAttributes.add(SVGNames::filterUnitsAttr);
|
| - supportedAttributes.add(SVGNames::primitiveUnitsAttr);
|
| - supportedAttributes.add(SVGNames::xAttr);
|
| - supportedAttributes.add(SVGNames::yAttr);
|
| - supportedAttributes.add(SVGNames::widthAttr);
|
| - supportedAttributes.add(SVGNames::heightAttr);
|
| - supportedAttributes.add(SVGNames::filterResAttr);
|
| - }
|
| - return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
|
| -}
|
| -
|
| void SVGFilterElement::svgAttributeChanged(const QualifiedName& attrName)
|
| {
|
| - if (!isSupportedAttribute(attrName)) {
|
| - SVGElement::svgAttributeChanged(attrName);
|
| - return;
|
| - }
|
| -
|
| - SVGElement::InvalidationGuard invalidationGuard(this);
|
| -
|
| bool isXYWH = attrName == SVGNames::xAttr
|
| || attrName == SVGNames::yAttr
|
| || attrName == SVGNames::widthAttr
|
| @@ -120,9 +97,19 @@ void SVGFilterElement::svgAttributeChanged(const QualifiedName& attrName)
|
| else if (attrName == SVGNames::filterResAttr)
|
| UseCounter::count(document(), UseCounter::SVGFilterRes);
|
|
|
| - LayoutSVGResourceContainer* renderer = toLayoutSVGResourceContainer(this->layoutObject());
|
| - if (renderer)
|
| - renderer->invalidateCacheAndMarkForLayout();
|
| + if (isXYWH
|
| + || attrName == SVGNames::filterResAttr
|
| + || attrName == SVGNames::filterUnitsAttr
|
| + || attrName == SVGNames::primitiveUnitsAttr) {
|
| + SVGElement::InvalidationGuard invalidationGuard(this);
|
| + LayoutSVGResourceContainer* renderer = toLayoutSVGResourceContainer(this->layoutObject());
|
| + if (renderer)
|
| + renderer->invalidateCacheAndMarkForLayout();
|
| +
|
| + return;
|
| + }
|
| +
|
| + SVGElement::svgAttributeChanged(attrName);
|
| }
|
|
|
| void SVGFilterElement::childrenChanged(const ChildrenChange& change)
|
|
|