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

Unified Diff: Source/core/svg/SVGFELightElement.cpp

Issue 1074813002: Remove isSupportedAttribute in svg (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fixups 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..c112b9a1536eafb249d4c75dbdd8a204a4c0d4b9 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
@@ -122,6 +97,7 @@ void SVGFELightElement::svgAttributeChanged(const QualifiedName& attrName)
|| attrName == SVGNames::pointsAtZAttr
|| attrName == SVGNames::specularExponentAttr
|| attrName == SVGNames::limitingConeAngleAttr) {
+ SVGElement::InvalidationGuard invalidationGuard(this);
fs 2015/04/10 14:25:24 Move this down to just before isSVGFEDiffuseLighti
Erik Dahlström (inactive) 2015/04/10 15:33:44 Done.
ContainerNode* parent = parentNode();
if (!parent)
return;
@@ -140,7 +116,7 @@ void SVGFELightElement::svgAttributeChanged(const QualifiedName& attrName)
}
}
fs 2015/04/10 14:25:24 Should probably move the ASSERT_NOT_REACHED() here
Erik Dahlström (inactive) 2015/04/10 15:33:44 Done.
- ASSERT_NOT_REACHED();
+ SVGElement::svgAttributeChanged(attrName);
}
void SVGFELightElement::childrenChanged(const ChildrenChange& change)

Powered by Google App Engine
This is Rietveld 408576698