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

Unified Diff: Source/core/svg/SVGFEConvolveMatrixElement.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/SVGFEConvolveMatrixElement.cpp
diff --git a/Source/core/svg/SVGFEConvolveMatrixElement.cpp b/Source/core/svg/SVGFEConvolveMatrixElement.cpp
index 062304815bc54d8b25bc26cfe225d30c8c6111d9..5d02515031c587e0ae236a4d85816e18c7846496 100644
--- a/Source/core/svg/SVGFEConvolveMatrixElement.cpp
+++ b/Source/core/svg/SVGFEConvolveMatrixElement.cpp
@@ -113,24 +113,6 @@ DEFINE_TRACE(SVGFEConvolveMatrixElement)
DEFINE_NODE_FACTORY(SVGFEConvolveMatrixElement)
-bool SVGFEConvolveMatrixElement::isSupportedAttribute(const QualifiedName& attrName)
-{
- DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
- if (supportedAttributes.isEmpty()) {
- supportedAttributes.add(SVGNames::inAttr);
- supportedAttributes.add(SVGNames::orderAttr);
- supportedAttributes.add(SVGNames::kernelMatrixAttr);
- supportedAttributes.add(SVGNames::edgeModeAttr);
- supportedAttributes.add(SVGNames::divisorAttr);
- supportedAttributes.add(SVGNames::biasAttr);
- supportedAttributes.add(SVGNames::targetXAttr);
- supportedAttributes.add(SVGNames::targetYAttr);
- supportedAttributes.add(SVGNames::kernelUnitLengthAttr);
- supportedAttributes.add(SVGNames::preserveAlphaAttr);
- }
- return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
-}
-
bool SVGFEConvolveMatrixElement::setFilterEffectAttribute(FilterEffect* effect, const QualifiedName& attrName)
{
FEConvolveMatrix* convolveMatrix = static_cast<FEConvolveMatrix*>(effect);
@@ -155,13 +137,6 @@ bool SVGFEConvolveMatrixElement::setFilterEffectAttribute(FilterEffect* effect,
void SVGFEConvolveMatrixElement::svgAttributeChanged(const QualifiedName& attrName)
{
- if (!isSupportedAttribute(attrName)) {
- SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(attrName);
- return;
- }
-
- SVGElement::InvalidationGuard invalidationGuard(this);
-
if (attrName == SVGNames::edgeModeAttr
|| attrName == SVGNames::divisorAttr
|| attrName == SVGNames::biasAttr
@@ -169,6 +144,7 @@ void SVGFEConvolveMatrixElement::svgAttributeChanged(const QualifiedName& attrNa
|| attrName == SVGNames::targetYAttr
|| attrName == SVGNames::kernelUnitLengthAttr
|| attrName == SVGNames::preserveAlphaAttr) {
+ SVGElement::InvalidationGuard invalidationGuard(this);
primitiveAttributeChanged(attrName);
return;
}
@@ -176,11 +152,12 @@ void SVGFEConvolveMatrixElement::svgAttributeChanged(const QualifiedName& attrNa
if (attrName == SVGNames::inAttr
|| attrName == SVGNames::orderAttr
|| attrName == SVGNames::kernelMatrixAttr) {
+ SVGElement::InvalidationGuard invalidationGuard(this);
invalidate();
return;
}
- ASSERT_NOT_REACHED();
+ SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(attrName);
}
PassRefPtrWillBeRawPtr<FilterEffect> SVGFEConvolveMatrixElement::build(SVGFilterBuilder* filterBuilder, Filter* filter)

Powered by Google App Engine
This is Rietveld 408576698