| Index: third_party/WebKit/Source/core/animation/Animation.cpp
|
| diff --git a/third_party/WebKit/Source/core/animation/Animation.cpp b/third_party/WebKit/Source/core/animation/Animation.cpp
|
| index b34fac998d20df5135d6d6c6536ca9d01492b56b..09f13bd82878f48a5305c30e6a873b7a525a7600 100644
|
| --- a/third_party/WebKit/Source/core/animation/Animation.cpp
|
| +++ b/third_party/WebKit/Source/core/animation/Animation.cpp
|
| @@ -33,6 +33,7 @@
|
| #include "core/animation/AnimationTimeline.h"
|
| #include "core/animation/CompositorPendingAnimations.h"
|
| #include "core/animation/KeyframeEffect.h"
|
| +#include "core/animation/css/CSSAnimations.h"
|
| #include "core/dom/Document.h"
|
| #include "core/dom/ExceptionCode.h"
|
| #include "core/dom/StyleChangeReason.h"
|
| @@ -1086,12 +1087,15 @@ void Animation::disableCompositedAnimationForTesting()
|
| cancelAnimationOnCompositor();
|
| }
|
|
|
| -void Animation::invalidateKeyframeEffect()
|
| +void Animation::invalidateKeyframeEffect(const TreeScope& treeScope)
|
| {
|
| if (!m_content || !m_content->isKeyframeEffect())
|
| return;
|
|
|
| - toKeyframeEffect(m_content.get())->target()->setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::StyleSheetChange));
|
| + Element& target = *toKeyframeEffect(m_content.get())->target();
|
| +
|
| + if (CSSAnimations::isAffectedByKeyframesFromScope(target, treeScope))
|
| + target.setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::StyleSheetChange));
|
| }
|
|
|
| DEFINE_TRACE(Animation)
|
|
|