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

Unified Diff: Source/core/svg/SVGFELightElement.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/SVGFELightElement.cpp
diff --git a/Source/core/svg/SVGFELightElement.cpp b/Source/core/svg/SVGFELightElement.cpp
index eea5a77ccfdc6ac05802465eb726725c0a28f6a3..5db190509818579dfd0d945dfc1bfb8de379e042 100644
--- a/Source/core/svg/SVGFELightElement.cpp
+++ b/Source/core/svg/SVGFELightElement.cpp
@@ -85,33 +85,8 @@ FloatPoint3D SVGFELightElement::pointsAt() const
return FloatPoint3D(pointsAtX()->currentValue()->value(), pointsAtY()->currentValue()->value(), pointsAtZ()->currentValue()->value());
}
-bool SVGFELightElement::isSupportedAttribute(const QualifiedName& attrName)
-{
- DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
- if (supportedAttributes.isEmpty()) {
- supportedAttributes.add(SVGNames::azimuthAttr);
- supportedAttributes.add(SVGNames::elevationAttr);
- supportedAttributes.add(SVGNames::xAttr);
- supportedAttributes.add(SVGNames::yAttr);
- supportedAttributes.add(SVGNames::zAttr);
- supportedAttributes.add(SVGNames::pointsAtXAttr);
- supportedAttributes.add(SVGNames::pointsAtYAttr);
- supportedAttributes.add(SVGNames::pointsAtZAttr);
- supportedAttributes.add(SVGNames::specularExponentAttr);
- supportedAttributes.add(SVGNames::limitingConeAngleAttr);
- }
- return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
-}
-
void SVGFELightElement::svgAttributeChanged(const QualifiedName& attrName)
{
- if (!isSupportedAttribute(attrName)) {
- SVGElement::svgAttributeChanged(attrName);
- return;
- }
-
- SVGElement::InvalidationGuard invalidationGuard(this);
-
if (attrName == SVGNames::azimuthAttr
|| attrName == SVGNames::elevationAttr
|| attrName == SVGNames::xAttr
@@ -130,6 +105,7 @@ void SVGFELightElement::svgAttributeChanged(const QualifiedName& attrName)
if (!renderer || !renderer->isSVGResourceFilterPrimitive())
return;
+ SVGElement::InvalidationGuard invalidationGuard(this);
if (isSVGFEDiffuseLightingElement(*parent)) {
toSVGFEDiffuseLightingElement(*parent).lightElementAttributeChanged(this, attrName);
return;
@@ -138,9 +114,11 @@ void SVGFELightElement::svgAttributeChanged(const QualifiedName& attrName)
toSVGFESpecularLightingElement(*parent).lightElementAttributeChanged(this, attrName);
return;
}
+
+ ASSERT_NOT_REACHED();
}
- ASSERT_NOT_REACHED();
+ SVGElement::svgAttributeChanged(attrName);
}
void SVGFELightElement::childrenChanged(const ChildrenChange& change)

Powered by Google App Engine
This is Rietveld 408576698