| Index: Source/core/animation/DocumentAnimations.cpp
|
| diff --git a/Source/core/animation/DocumentAnimations.cpp b/Source/core/animation/DocumentAnimations.cpp
|
| index d37480414da2d0dbe1375c7db94c60db3cb1e56c..89b30e2c29c9c123cc949f80d2cc1f82049e6abd 100644
|
| --- a/Source/core/animation/DocumentAnimations.cpp
|
| +++ b/Source/core/animation/DocumentAnimations.cpp
|
| @@ -50,32 +50,29 @@ void updateAnimationTiming(Document& document)
|
| {
|
| document.timeline()->serviceAnimations();
|
| document.transitionTimeline()->serviceAnimations();
|
| - if (!document.childNeedsStyleRecalc())
|
| - document.animationClock().unfreeze();
|
| }
|
|
|
| -void dispatchAnimationEvents(Document& document)
|
| +} // namespace
|
| +
|
| +void DocumentAnimations::dispatchAnimationEvents(Document& document)
|
| {
|
| document.timeline()->dispatchEvents();
|
| document.transitionTimeline()->dispatchEvents();
|
| }
|
|
|
| -void dispatchAnimationEventsAsync(Document& document)
|
| +void DocumentAnimations::dispatchAnimationEventsAsync(Document& document)
|
| {
|
| document.timeline()->dispatchEventsAsync();
|
| document.transitionTimeline()->dispatchEventsAsync();
|
| }
|
|
|
| -} // namespace
|
| -
|
| -void DocumentAnimations::serviceOnAnimationFrame(Document& document, double monotonicAnimationStartTime)
|
| +void DocumentAnimations::updateAnimationTimingForAnimationFrame(Document& document, double monotonicAnimationStartTime)
|
| {
|
| document.animationClock().updateTime(monotonicAnimationStartTime);
|
| updateAnimationTiming(document);
|
| - dispatchAnimationEvents(document);
|
| }
|
|
|
| -void DocumentAnimations::serviceBeforeGetComputedStyle(Node& node, CSSPropertyID property)
|
| +void DocumentAnimations::updateAnimationTimingForGetComputedStyle(Node& node, CSSPropertyID property)
|
| {
|
| if (!node.isElementNode())
|
| return;
|
| @@ -90,13 +87,15 @@ void DocumentAnimations::serviceBeforeGetComputedStyle(Node& node, CSSPropertyID
|
| }
|
| }
|
|
|
| -void DocumentAnimations::serviceAfterStyleRecalc(Document& document)
|
| +void DocumentAnimations::startPendingAnimations(Document& document)
|
| {
|
| - if (document.cssPendingAnimations().startPendingAnimations() && document.view())
|
| + ASSERT(document.lifecycle().state() == DocumentLifecycle::CompositingClean);
|
| + if (document.cssPendingAnimations().startPendingAnimations()) {
|
| + ASSERT(document.view());
|
| document.view()->scheduleAnimation();
|
| + }
|
|
|
| document.animationClock().unfreeze();
|
| - dispatchAnimationEventsAsync(document);
|
| }
|
|
|
| } // namespace WebCore
|
|
|