Index: Source/core/svg/SVGCursorElement.cpp |
diff --git a/Source/core/svg/SVGCursorElement.cpp b/Source/core/svg/SVGCursorElement.cpp |
index 2111998d431e942c94d24bd1d3f63e888a6b40f6..c2290eb0e242e2ef4b7dd358f911f2cffd2f7700 100644 |
--- a/Source/core/svg/SVGCursorElement.cpp |
+++ b/Source/core/svg/SVGCursorElement.cpp |
@@ -49,18 +49,6 @@ SVGCursorElement::~SVGCursorElement() |
#endif |
} |
-bool SVGCursorElement::isSupportedAttribute(const QualifiedName& attrName) |
-{ |
- DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); |
- if (supportedAttributes.isEmpty()) { |
- SVGTests::addSupportedAttributes(supportedAttributes); |
- SVGURIReference::addSupportedAttributes(supportedAttributes); |
- supportedAttributes.add(SVGNames::xAttr); |
- supportedAttributes.add(SVGNames::yAttr); |
- } |
- return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); |
-} |
- |
void SVGCursorElement::addClient(SVGElement* element) |
{ |
m_clients.add(element); |
@@ -85,16 +73,19 @@ void SVGCursorElement::removeReferencedElement(SVGElement* element) |
void SVGCursorElement::svgAttributeChanged(const QualifiedName& attrName) |
{ |
- if (!isSupportedAttribute(attrName)) { |
- SVGElement::svgAttributeChanged(attrName); |
+ if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr |
+ || SVGTests::isKnownAttribute(attrName) |
+ || SVGURIReference::isKnownAttribute(attrName)) { |
+ SVGElement::InvalidationGuard invalidationGuard(this); |
+ |
+ // Any change of a cursor specific attribute triggers this recalc. |
+ for (const auto& client : m_clients) |
+ client->setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::SVGCursor)); |
+ |
return; |
} |
- SVGElement::InvalidationGuard invalidationGuard(this); |
- |
- // Any change of a cursor specific attribute triggers this recalc. |
- for (const auto& client : m_clients) |
- client->setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::SVGCursor)); |
+ SVGElement::svgAttributeChanged(attrName); |
} |
DEFINE_TRACE(SVGCursorElement) |