summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/svg/SVGElement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/svg/SVGElement.cpp')
-rw-r--r--Source/WebCore/svg/SVGElement.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/Source/WebCore/svg/SVGElement.cpp b/Source/WebCore/svg/SVGElement.cpp
index c9efae8..99134b2 100644
--- a/Source/WebCore/svg/SVGElement.cpp
+++ b/Source/WebCore/svg/SVGElement.cpp
@@ -256,6 +256,25 @@ void SVGElement::parseMappedAttribute(Attribute* attr)
StyledElement::parseMappedAttribute(attr);
}
+AttributeToPropertyTypeMap& SVGElement::attributeToPropertyTypeMap()
+{
+ DEFINE_STATIC_LOCAL(AttributeToPropertyTypeMap, s_attributeToPropertyTypeMap, ());
+ return s_attributeToPropertyTypeMap;
+}
+
+AnimatedAttributeType SVGElement::animatedPropertyTypeForAttribute(const QualifiedName& attrName)
+{
+ AttributeToPropertyTypeMap& animatedAttributeMap = attributeToPropertyTypeMap();
+ if (animatedAttributeMap.isEmpty())
+ fillAttributeToPropertyTypeMap();
+ if (animatedAttributeMap.contains(attrName))
+ return animatedAttributeMap.get(attrName);
+ if (isStyled())
+ return static_cast<SVGStyledElement*>(this)->animatedPropertyTypeForCSSProperty(attrName);
+
+ return AnimatedUnknown;
+}
+
bool SVGElement::haveLoadedRequiredResources()
{
Node* child = firstChild();