| Index: third_party/WebKit/Source/core/svg/SVGAnimateMotionElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/svg/SVGAnimateMotionElement.cpp b/third_party/WebKit/Source/core/svg/SVGAnimateMotionElement.cpp
|
| index b605ff60cec34e53cd03a5cf8e28f130a6f7bbd9..54bf66d0c4cbcf6bffb4fd6d81ce5f41d97f4910 100644
|
| --- a/third_party/WebKit/Source/core/svg/SVGAnimateMotionElement.cpp
|
| +++ b/third_party/WebKit/Source/core/svg/SVGAnimateMotionElement.cpp
|
| @@ -164,10 +164,8 @@ void SVGAnimateMotionElement::clearAnimatedType() {
|
|
|
| transform->makeIdentity();
|
|
|
| - if (LayoutObject* targetLayoutObject = targetElement->layoutObject()) {
|
| - targetLayoutObject->setNeedsTransformUpdate();
|
| - markForLayoutAndParentResourceInvalidation(targetLayoutObject);
|
| - }
|
| + if (LayoutObject* targetLayoutObject = targetElement->layoutObject())
|
| + invalidateForAnimateMotionTransformChange(*targetLayoutObject);
|
| }
|
|
|
| bool SVGAnimateMotionElement::calculateToAtEndOfDurationValue(
|
| @@ -208,7 +206,7 @@ void SVGAnimateMotionElement::calculateAnimatedValue(float percentage,
|
| return;
|
|
|
| if (LayoutObject* targetLayoutObject = targetElement->layoutObject())
|
| - targetLayoutObject->setNeedsTransformUpdate();
|
| + invalidateForAnimateMotionTransformChange(*targetLayoutObject);
|
|
|
| if (!isAdditive())
|
| transform->makeIdentity();
|
| @@ -261,9 +259,6 @@ void SVGAnimateMotionElement::applyResultsToTarget() {
|
| if (!targetElement)
|
| return;
|
|
|
| - if (LayoutObject* layoutObject = targetElement->layoutObject())
|
| - markForLayoutAndParentResourceInvalidation(layoutObject);
|
| -
|
| AffineTransform* t = targetElement->animateMotionTransform();
|
| if (!t)
|
| return;
|
| @@ -277,10 +272,8 @@ void SVGAnimateMotionElement::applyResultsToTarget() {
|
| if (!transform)
|
| continue;
|
| transform->setMatrix(t->a(), t->b(), t->c(), t->d(), t->e(), t->f());
|
| - if (LayoutObject* layoutObject = shadowTreeElement->layoutObject()) {
|
| - layoutObject->setNeedsTransformUpdate();
|
| - markForLayoutAndParentResourceInvalidation(layoutObject);
|
| - }
|
| + if (LayoutObject* layoutObject = shadowTreeElement->layoutObject())
|
| + invalidateForAnimateMotionTransformChange(*layoutObject);
|
| }
|
| }
|
|
|
| @@ -303,4 +296,10 @@ void SVGAnimateMotionElement::updateAnimationMode() {
|
| SVGAnimationElement::updateAnimationMode();
|
| }
|
|
|
| +void SVGAnimateMotionElement::invalidateForAnimateMotionTransformChange(
|
| + LayoutObject& object) {
|
| + object.setNeedsTransformUpdate();
|
| + markForLayoutAndParentResourceInvalidation(&object);
|
| +}
|
| +
|
| } // namespace blink
|
|
|