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

Unified Diff: Source/core/svg/SVGFEOffsetElement.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/SVGFEOffsetElement.cpp
diff --git a/Source/core/svg/SVGFEOffsetElement.cpp b/Source/core/svg/SVGFEOffsetElement.cpp
index 599f0951a469e278a211c8fb62b6b9047ce6bc5d..b0ac8fb1a41d0a371d065a3b39b3babe59642f56 100644
--- a/Source/core/svg/SVGFEOffsetElement.cpp
+++ b/Source/core/svg/SVGFEOffsetElement.cpp
@@ -49,26 +49,16 @@ DEFINE_TRACE(SVGFEOffsetElement)
DEFINE_NODE_FACTORY(SVGFEOffsetElement)
-bool SVGFEOffsetElement::isSupportedAttribute(const QualifiedName& attrName)
-{
- DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
- if (supportedAttributes.isEmpty()) {
- supportedAttributes.add(SVGNames::inAttr);
- supportedAttributes.add(SVGNames::dxAttr);
- supportedAttributes.add(SVGNames::dyAttr);
- }
- return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
-}
-
void SVGFEOffsetElement::svgAttributeChanged(const QualifiedName& attrName)
{
- if (!isSupportedAttribute(attrName)) {
- SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(attrName);
+ if (attrName == SVGNames::inAttr || attrName == SVGNames::dxAttr
+ || attrName == SVGNames::dyAttr) {
+ SVGElement::InvalidationGuard invalidationGuard(this);
+ invalidate();
return;
}
- SVGElement::InvalidationGuard invalidationGuard(this);
- invalidate();
+ SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(attrName);
}
PassRefPtrWillBeRawPtr<FilterEffect> SVGFEOffsetElement::build(SVGFilterBuilder* filterBuilder, Filter* filter)

Powered by Google App Engine
This is Rietveld 408576698