Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1976)

Unified Diff: Source/core/svg/SVGFilterPrimitiveStandardAttributes.cpp

Issue 1074813002: Remove isSupportedAttribute in svg (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: invalidation guard tweaks Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/svg/SVGFilterPrimitiveStandardAttributes.cpp
diff --git a/Source/core/svg/SVGFilterPrimitiveStandardAttributes.cpp b/Source/core/svg/SVGFilterPrimitiveStandardAttributes.cpp
index 7293ecf43a4e75c609691378cc65587319e167aa..3f9836f0290f24381f10bfb73420e5d69aa53686 100644
--- a/Source/core/svg/SVGFilterPrimitiveStandardAttributes.cpp
+++ b/Source/core/svg/SVGFilterPrimitiveStandardAttributes.cpp
@@ -63,19 +63,6 @@ DEFINE_TRACE(SVGFilterPrimitiveStandardAttributes)
SVGElement::trace(visitor);
}
-bool SVGFilterPrimitiveStandardAttributes::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::resultAttr);
- }
- return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
-}
-
bool SVGFilterPrimitiveStandardAttributes::setFilterEffectAttribute(FilterEffect*, const QualifiedName&)
{
// When all filters support this method, it will be changed to a pure virtual method.
@@ -85,13 +72,15 @@ bool SVGFilterPrimitiveStandardAttributes::setFilterEffectAttribute(FilterEffect
void SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(const QualifiedName& attrName)
{
- if (!isSupportedAttribute(attrName)) {
- SVGElement::svgAttributeChanged(attrName);
+ if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr
+ || attrName == SVGNames::widthAttr || attrName == SVGNames::heightAttr
+ || attrName == SVGNames::resultAttr) {
+ SVGElement::InvalidationGuard invalidationGuard(this);
+ invalidate();
return;
}
- SVGElement::InvalidationGuard invalidationGuard(this);
- invalidate();
+ SVGElement::svgAttributeChanged(attrName);
}
void SVGFilterPrimitiveStandardAttributes::childrenChanged(const ChildrenChange& change)

Powered by Google App Engine
This is Rietveld 408576698