Index: Source/core/animation/DocumentAnimations.cpp |
diff --git a/Source/core/animation/DocumentAnimations.cpp b/Source/core/animation/DocumentAnimations.cpp |
index 8bf72d2b7c61304bc17f3c35d19386e9fbcda9c5..38f402f53afe0db49b02285079bb330ff568ec62 100644 |
--- a/Source/core/animation/DocumentAnimations.cpp |
+++ b/Source/core/animation/DocumentAnimations.cpp |
@@ -50,8 +50,6 @@ void updateAnimationTiming(Document& document) |
{ |
document.timeline()->serviceAnimations(); |
document.transitionTimeline()->serviceAnimations(); |
- if (!document.childNeedsStyleRecalc()) |
- document.animationClock().unfreeze(); |
} |
void dispatchAnimationEvents(Document& document) |
@@ -68,8 +66,10 @@ void dispatchAnimationEventsAsync(Document& document) |
} // namespace |
-void DocumentAnimations::serviceOnAnimationFrame(Document& document, double monotonicAnimationStartTime) |
+void DocumentAnimations::serviceOnFrameStart(Document& document, double monotonicAnimationStartTime) |
{ |
+ // FIXME: This seems fragile. Do we need a separate frame lifecycle? |
+ ASSERT(document.lifecycle().state() == DocumentLifecycle::StyleClean || document.lifecycle().state() == DocumentLifecycle::StyleRecalcPending || document.lifecycle().state() == DocumentLifecycle::LayoutClean || document.lifecycle().state() == DocumentLifecycle::CompositingClean); |
abarth-chromium
2014/02/20 17:52:00
What are you trying to assert here? As written, t
dstockwell
2014/02/20 18:22:01
I was looking at what we know about the beginning
|
document.animationClock().updateTime(monotonicAnimationStartTime); |
updateAnimationTiming(document); |
dispatchAnimationEvents(document); |
@@ -90,8 +90,9 @@ void DocumentAnimations::serviceBeforeGetComputedStyle(Node& node, CSSPropertyID |
} |
} |
-void DocumentAnimations::serviceAfterStyleRecalc(Document& document) |
+void DocumentAnimations::serviceOnFrameEnd(Document& document) |
{ |
+ ASSERT(document.lifecycle().state() == DocumentLifecycle::CompositingClean); |
if (document.cssPendingAnimations().startPendingAnimations() && document.view()) |
document.view()->scheduleAnimation(); |