| Index: third_party/WebKit/Source/core/svg/SVGElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/svg/SVGElement.cpp b/third_party/WebKit/Source/core/svg/SVGElement.cpp
|
| index 064c28daa9c79506d8e9949b4059f934c2194f3f..283f3a12db89ad40c9c4735fc5c31295adcf34d0 100644
|
| --- a/third_party/WebKit/Source/core/svg/SVGElement.cpp
|
| +++ b/third_party/WebKit/Source/core/svg/SVGElement.cpp
|
| @@ -247,6 +247,12 @@ static void updateInstancesAnimatedAttributeNoInvalidate(SVGElement* element, co
|
| }
|
| }
|
|
|
| +static inline void notifyAnimValChanged(SVGElement* targetElement, const QualifiedName& attributeName)
|
| +{
|
| + targetElement->invalidateSVGAttributes();
|
| + targetElement->svgAttributeChanged(attributeName);
|
| +}
|
| +
|
| template<typename T>
|
| static void updateInstancesAnimatedAttribute(SVGElement* element, const QualifiedName& attribute, T callback)
|
| {
|
| @@ -254,8 +260,7 @@ static void updateInstancesAnimatedAttribute(SVGElement* element, const Qualifie
|
| for (SVGElement* instance : SVGAnimateElement::findElementInstances(element)) {
|
| if (SVGAnimatedPropertyBase* animatedProperty = instance->propertyFromAttribute(attribute)) {
|
| callback(*animatedProperty);
|
| - instance->invalidateSVGAttributes();
|
| - instance->svgAttributeChanged(attribute);
|
| + notifyAnimValChanged(instance, attribute);
|
| }
|
| }
|
| }
|
| @@ -287,6 +292,15 @@ void SVGElement::setAnimatedAttribute(const QualifiedName& attribute, SVGPropert
|
| });
|
| }
|
|
|
| +void SVGElement::invalidateAnimatedAttribute(const QualifiedName& attribute)
|
| +{
|
| + InstanceUpdateBlocker blocker(this);
|
| + notifyAnimValChanged(this, attribute);
|
| +
|
| + for (SVGElement* element : instancesForElement())
|
| + notifyAnimValChanged(element, attribute);
|
| +}
|
| +
|
| void SVGElement::clearAnimatedAttribute(const QualifiedName& attribute)
|
| {
|
| updateInstancesAnimatedAttributeNoInvalidate(this, attribute, [](SVGAnimatedPropertyBase& animatedProperty) {
|
|
|