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

Unified Diff: Source/core/svg/SVGGraphicsElement.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/SVGGraphicsElement.cpp
diff --git a/Source/core/svg/SVGGraphicsElement.cpp b/Source/core/svg/SVGGraphicsElement.cpp
index 96fd6f5d37e85eb481dcac1f63c416d8181b4314..685aa3e24945d2ce166ee9b06917696723cf9d1f 100644
--- a/Source/core/svg/SVGGraphicsElement.cpp
+++ b/Source/core/svg/SVGGraphicsElement.cpp
@@ -187,42 +187,27 @@ AffineTransform* SVGGraphicsElement::animateMotionTransform()
return ensureSVGRareData()->animateMotionTransform();
}
-bool SVGGraphicsElement::isSupportedAttribute(const QualifiedName& attrName)
-{
- DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
- if (supportedAttributes.isEmpty()) {
- SVGTests::addSupportedAttributes(supportedAttributes);
- supportedAttributes.add(SVGNames::transformAttr);
- }
- return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName);
-}
-
void SVGGraphicsElement::svgAttributeChanged(const QualifiedName& attrName)
{
- if (!isSupportedAttribute(attrName)) {
- SVGElement::svgAttributeChanged(attrName);
- return;
- }
-
- SVGElement::InvalidationGuard invalidationGuard(this);
-
// Reattach so the isValid() check will be run again during renderer creation.
if (SVGTests::isKnownAttribute(attrName)) {
+ SVGElement::InvalidationGuard invalidationGuard(this);
lazyReattachIfAttached();
return;
}
- LayoutObject* object = layoutObject();
- if (!object)
- return;
-
if (attrName == SVGNames::transformAttr) {
+ LayoutObject* object = layoutObject();
+ if (!object)
+ return;
+
+ SVGElement::InvalidationGuard invalidationGuard(this);
object->setNeedsTransformUpdate();
markForLayoutAndParentResourceInvalidation(object);
return;
}
- ASSERT_NOT_REACHED();
+ SVGElement::svgAttributeChanged(attrName);
}
SVGElement* SVGGraphicsElement::nearestViewportElement() const

Powered by Google App Engine
This is Rietveld 408576698