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

Unified Diff: Source/core/svg/SVGFETurbulenceElement.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/SVGFETurbulenceElement.cpp
diff --git a/Source/core/svg/SVGFETurbulenceElement.cpp b/Source/core/svg/SVGFETurbulenceElement.cpp
index 8b9314e2ed42dff8aff7ed45b5ddb588666620f2..59d104ce06cea478562f27b97801d38e363dda93 100644
--- a/Source/core/svg/SVGFETurbulenceElement.cpp
+++ b/Source/core/svg/SVGFETurbulenceElement.cpp
@@ -74,19 +74,6 @@ DEFINE_TRACE(SVGFETurbulenceElement)
DEFINE_NODE_FACTORY(SVGFETurbulenceElement)
-bool SVGFETurbulenceElement::isSupportedAttribute(const QualifiedName& attrName)
-{
- DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
- if (supportedAttributes.isEmpty()) {
- supportedAttributes.add(SVGNames::baseFrequencyAttr);
- supportedAttributes.add(SVGNames::numOctavesAttr);
- supportedAttributes.add(SVGNames::seedAttr);
- supportedAttributes.add(SVGNames::stitchTilesAttr);
- supportedAttributes.add(SVGNames::typeAttr);
- }
- return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
-}
-
bool SVGFETurbulenceElement::setFilterEffectAttribute(FilterEffect* effect, const QualifiedName& attrName)
{
FETurbulence* turbulence = static_cast<FETurbulence*>(effect);
@@ -110,23 +97,17 @@ bool SVGFETurbulenceElement::setFilterEffectAttribute(FilterEffect* effect, cons
void SVGFETurbulenceElement::svgAttributeChanged(const QualifiedName& attrName)
{
- if (!isSupportedAttribute(attrName)) {
- SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(attrName);
- return;
- }
-
- SVGElement::InvalidationGuard invalidationGuard(this);
-
if (attrName == SVGNames::baseFrequencyAttr
|| attrName == SVGNames::numOctavesAttr
|| attrName == SVGNames::seedAttr
|| attrName == SVGNames::stitchTilesAttr
|| attrName == SVGNames::typeAttr) {
+ SVGElement::InvalidationGuard invalidationGuard(this);
primitiveAttributeChanged(attrName);
return;
}
- ASSERT_NOT_REACHED();
+ SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(attrName);
}
PassRefPtrWillBeRawPtr<FilterEffect> SVGFETurbulenceElement::build(SVGFilterBuilder*, Filter* filter)

Powered by Google App Engine
This is Rietveld 408576698