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

Unified Diff: Source/core/svg/SVGFECompositeElement.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/SVGFECompositeElement.cpp
diff --git a/Source/core/svg/SVGFECompositeElement.cpp b/Source/core/svg/SVGFECompositeElement.cpp
index d69e17d67092154499f850a9b766bdb21417f381..07e9e1fc27b553d87effd51d73fee1c331606f5d 100644
--- a/Source/core/svg/SVGFECompositeElement.cpp
+++ b/Source/core/svg/SVGFECompositeElement.cpp
@@ -81,21 +81,6 @@ DEFINE_TRACE(SVGFECompositeElement)
DEFINE_NODE_FACTORY(SVGFECompositeElement)
-bool SVGFECompositeElement::isSupportedAttribute(const QualifiedName& attrName)
-{
- DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
- if (supportedAttributes.isEmpty()) {
- supportedAttributes.add(SVGNames::inAttr);
- supportedAttributes.add(SVGNames::in2Attr);
- supportedAttributes.add(SVGNames::operatorAttr);
- supportedAttributes.add(SVGNames::k1Attr);
- supportedAttributes.add(SVGNames::k2Attr);
- supportedAttributes.add(SVGNames::k3Attr);
- supportedAttributes.add(SVGNames::k4Attr);
- }
- return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
-}
-
bool SVGFECompositeElement::setFilterEffectAttribute(FilterEffect* effect, const QualifiedName& attrName)
{
FEComposite* composite = static_cast<FEComposite*>(effect);
@@ -117,28 +102,23 @@ bool SVGFECompositeElement::setFilterEffectAttribute(FilterEffect* effect, const
void SVGFECompositeElement::svgAttributeChanged(const QualifiedName& attrName)
{
- if (!isSupportedAttribute(attrName)) {
- SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(attrName);
- return;
- }
-
- SVGElement::InvalidationGuard invalidationGuard(this);
-
if (attrName == SVGNames::operatorAttr
|| attrName == SVGNames::k1Attr
|| attrName == SVGNames::k2Attr
|| attrName == SVGNames::k3Attr
|| attrName == SVGNames::k4Attr) {
+ SVGElement::InvalidationGuard invalidationGuard(this);
primitiveAttributeChanged(attrName);
return;
}
if (attrName == SVGNames::inAttr || attrName == SVGNames::in2Attr) {
+ SVGElement::InvalidationGuard invalidationGuard(this);
invalidate();
return;
}
- ASSERT_NOT_REACHED();
+ SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(attrName);
}
PassRefPtrWillBeRawPtr<FilterEffect> SVGFECompositeElement::build(SVGFilterBuilder* filterBuilder, Filter* filter)

Powered by Google App Engine
This is Rietveld 408576698