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

Unified Diff: Source/core/svg/SVGComponentTransferFunctionElement.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/SVGComponentTransferFunctionElement.cpp
diff --git a/Source/core/svg/SVGComponentTransferFunctionElement.cpp b/Source/core/svg/SVGComponentTransferFunctionElement.cpp
index 12df80176a413ab406f460501edf684fd553c140..1e5a2f62fa2097ca02a4d64b241c451be3a90cb3 100644
--- a/Source/core/svg/SVGComponentTransferFunctionElement.cpp
+++ b/Source/core/svg/SVGComponentTransferFunctionElement.cpp
@@ -73,31 +73,19 @@ DEFINE_TRACE(SVGComponentTransferFunctionElement)
SVGElement::trace(visitor);
}
-bool SVGComponentTransferFunctionElement::isSupportedAttribute(const QualifiedName& attrName)
-{
- DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
- if (supportedAttributes.isEmpty()) {
- supportedAttributes.add(SVGNames::typeAttr);
- supportedAttributes.add(SVGNames::tableValuesAttr);
- supportedAttributes.add(SVGNames::slopeAttr);
- supportedAttributes.add(SVGNames::interceptAttr);
- supportedAttributes.add(SVGNames::amplitudeAttr);
- supportedAttributes.add(SVGNames::exponentAttr);
- supportedAttributes.add(SVGNames::offsetAttr);
- }
- return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
-}
-
void SVGComponentTransferFunctionElement::svgAttributeChanged(const QualifiedName& attrName)
{
- if (!isSupportedAttribute(attrName)) {
- SVGElement::svgAttributeChanged(attrName);
+ if (attrName == SVGNames::typeAttr || attrName == SVGNames::tableValuesAttr
+ || attrName == SVGNames::slopeAttr || attrName == SVGNames::interceptAttr
+ || attrName == SVGNames::amplitudeAttr || attrName == SVGNames::exponentAttr
+ || attrName == SVGNames::offsetAttr) {
+ SVGElement::InvalidationGuard invalidationGuard(this);
+
+ invalidateFilterPrimitiveParent(this);
return;
}
- SVGElement::InvalidationGuard invalidationGuard(this);
-
- invalidateFilterPrimitiveParent(this);
+ SVGElement::svgAttributeChanged(attrName);
}
ComponentTransferFunction SVGComponentTransferFunctionElement::transferFunction() const

Powered by Google App Engine
This is Rietveld 408576698