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

Unified Diff: Source/core/svg/SVGFEDiffuseLightingElement.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/SVGFEDiffuseLightingElement.cpp
diff --git a/Source/core/svg/SVGFEDiffuseLightingElement.cpp b/Source/core/svg/SVGFEDiffuseLightingElement.cpp
index 3a5ed1f4a440d7236813d3bdcf1213d6baa5bc92..6117a9d83b8bba40b388a3fe2eec3b888c3d6751 100644
--- a/Source/core/svg/SVGFEDiffuseLightingElement.cpp
+++ b/Source/core/svg/SVGFEDiffuseLightingElement.cpp
@@ -53,19 +53,6 @@ DEFINE_TRACE(SVGFEDiffuseLightingElement)
DEFINE_NODE_FACTORY(SVGFEDiffuseLightingElement)
-bool SVGFEDiffuseLightingElement::isSupportedAttribute(const QualifiedName& attrName)
-{
- DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
- if (supportedAttributes.isEmpty()) {
- supportedAttributes.add(SVGNames::inAttr);
- supportedAttributes.add(SVGNames::diffuseConstantAttr);
- supportedAttributes.add(SVGNames::surfaceScaleAttr);
- supportedAttributes.add(SVGNames::kernelUnitLengthAttr);
- supportedAttributes.add(SVGNames::lighting_colorAttr); // Even though it's a SVG-CSS property, we override its handling here.
- }
- return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
-}
-
bool SVGFEDiffuseLightingElement::setFilterEffectAttribute(FilterEffect* effect, const QualifiedName& attrName)
{
FEDiffuseLighting* diffuseLighting = static_cast<FEDiffuseLighting*>(effect);
@@ -111,27 +98,22 @@ bool SVGFEDiffuseLightingElement::setFilterEffectAttribute(FilterEffect* effect,
void SVGFEDiffuseLightingElement::svgAttributeChanged(const QualifiedName& attrName)
{
- if (!isSupportedAttribute(attrName)) {
- SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(attrName);
- return;
- }
-
- SVGElement::InvalidationGuard invalidationGuard(this);
-
if (attrName == SVGNames::surfaceScaleAttr
|| attrName == SVGNames::diffuseConstantAttr
|| attrName == SVGNames::kernelUnitLengthAttr
|| attrName == SVGNames::lighting_colorAttr) {
+ SVGElement::InvalidationGuard invalidationGuard(this);
primitiveAttributeChanged(attrName);
return;
}
if (attrName == SVGNames::inAttr) {
+ SVGElement::InvalidationGuard invalidationGuard(this);
invalidate();
return;
}
- ASSERT_NOT_REACHED();
+ SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(attrName);
}
void SVGFEDiffuseLightingElement::lightElementAttributeChanged(const SVGFELightElement* lightElement, const QualifiedName& attrName)

Powered by Google App Engine
This is Rietveld 408576698