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

Unified Diff: Source/core/svg/SVGFESpecularLightingElement.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/SVGFESpecularLightingElement.cpp
diff --git a/Source/core/svg/SVGFESpecularLightingElement.cpp b/Source/core/svg/SVGFESpecularLightingElement.cpp
index 39aabb058f9f79c98f762c9854f036115a7feb2d..f4fbd7cb3b9bb01c0cb5354084b334556abf1058 100644
--- a/Source/core/svg/SVGFESpecularLightingElement.cpp
+++ b/Source/core/svg/SVGFESpecularLightingElement.cpp
@@ -57,19 +57,6 @@ DEFINE_TRACE(SVGFESpecularLightingElement)
DEFINE_NODE_FACTORY(SVGFESpecularLightingElement)
-bool SVGFESpecularLightingElement::isSupportedAttribute(const QualifiedName& attrName)
-{
- DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
- if (supportedAttributes.isEmpty()) {
- supportedAttributes.add(SVGNames::inAttr);
- supportedAttributes.add(SVGNames::specularConstantAttr);
- supportedAttributes.add(SVGNames::specularExponentAttr);
- supportedAttributes.add(SVGNames::surfaceScaleAttr);
- supportedAttributes.add(SVGNames::kernelUnitLengthAttr);
- }
- return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
-}
-
bool SVGFESpecularLightingElement::setFilterEffectAttribute(FilterEffect* effect, const QualifiedName& attrName)
{
FESpecularLighting* specularLighting = static_cast<FESpecularLighting*>(effect);
@@ -117,27 +104,22 @@ bool SVGFESpecularLightingElement::setFilterEffectAttribute(FilterEffect* effect
void SVGFESpecularLightingElement::svgAttributeChanged(const QualifiedName& attrName)
{
- if (!isSupportedAttribute(attrName)) {
- SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(attrName);
- return;
- }
-
- SVGElement::InvalidationGuard invalidationGuard(this);
-
if (attrName == SVGNames::surfaceScaleAttr
|| attrName == SVGNames::specularConstantAttr
|| attrName == SVGNames::specularExponentAttr
|| attrName == SVGNames::kernelUnitLengthAttr) {
+ SVGElement::InvalidationGuard invalidationGuard(this);
primitiveAttributeChanged(attrName);
return;
}
if (attrName == SVGNames::inAttr) {
+ SVGElement::InvalidationGuard invalidationGuard(this);
invalidate();
return;
}
- ASSERT_NOT_REACHED();
+ SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(attrName);
}
void SVGFESpecularLightingElement::lightElementAttributeChanged(const SVGFELightElement* lightElement, const QualifiedName& attrName)

Powered by Google App Engine
This is Rietveld 408576698