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

Unified Diff: Source/core/svg/SVGFEMorphologyElement.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/SVGFEMorphologyElement.cpp
diff --git a/Source/core/svg/SVGFEMorphologyElement.cpp b/Source/core/svg/SVGFEMorphologyElement.cpp
index faa526d21f71fdccbb70a67cad25e6181a5801b2..0a21244ac1d74b8ed180db59049bec05a3994fca 100644
--- a/Source/core/svg/SVGFEMorphologyElement.cpp
+++ b/Source/core/svg/SVGFEMorphologyElement.cpp
@@ -59,17 +59,6 @@ DEFINE_TRACE(SVGFEMorphologyElement)
DEFINE_NODE_FACTORY(SVGFEMorphologyElement)
-bool SVGFEMorphologyElement::isSupportedAttribute(const QualifiedName& attrName)
-{
- DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
- if (supportedAttributes.isEmpty()) {
- supportedAttributes.add(SVGNames::inAttr);
- supportedAttributes.add(SVGNames::operatorAttr);
- supportedAttributes.add(SVGNames::radiusAttr);
- }
- return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
-}
-
bool SVGFEMorphologyElement::setFilterEffectAttribute(FilterEffect* effect, const QualifiedName& attrName)
{
FEMorphology* morphology = static_cast<FEMorphology*>(effect);
@@ -88,24 +77,19 @@ bool SVGFEMorphologyElement::setFilterEffectAttribute(FilterEffect* effect, cons
void SVGFEMorphologyElement::svgAttributeChanged(const QualifiedName& attrName)
{
- if (!isSupportedAttribute(attrName)) {
- SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(attrName);
- return;
- }
-
- SVGElement::InvalidationGuard invalidationGuard(this);
-
if (attrName == SVGNames::operatorAttr || attrName == SVGNames::radiusAttr) {
+ SVGElement::InvalidationGuard invalidationGuard(this);
primitiveAttributeChanged(attrName);
return;
}
if (attrName == SVGNames::inAttr) {
+ SVGElement::InvalidationGuard invalidationGuard(this);
invalidate();
return;
}
- ASSERT_NOT_REACHED();
+ SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(attrName);
}
PassRefPtrWillBeRawPtr<FilterEffect> SVGFEMorphologyElement::build(SVGFilterBuilder* filterBuilder, Filter* filter)

Powered by Google App Engine
This is Rietveld 408576698