Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(881)

Unified Diff: Source/core/frame/FrameView.cpp

Issue 46043014: Web Animations CSS: Unfreeze AnimationClock if sampling timelines does not trigger style recalc (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Reinstate assert Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/animation/TimedItemTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/FrameView.cpp
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
index 6616db7c3cd36690d4cb0f9e6a76580469031ad9..6b2557a41832e1f877a4a0e9719247854652ff0d 100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -30,6 +30,7 @@
#include "HTMLNames.h"
#include "RuntimeEnabledFeatures.h"
#include "core/accessibility/AXObjectCache.h"
+#include "core/animation/AnimationClock.h"
#include "core/animation/DocumentTimeline.h"
#include "core/css/FontFaceSet.h"
#include "core/css/resolver/StyleResolver.h"
@@ -2025,8 +2026,11 @@ void FrameView::serviceScriptedAnimations(double monotonicAnimationStartTime)
if (!RuntimeEnabledFeatures::webAnimationsCSSEnabled())
frame->animation().serviceAnimations();
if (RuntimeEnabledFeatures::webAnimationsEnabled()) {
- frame->document()->timeline()->serviceAnimations(monotonicAnimationStartTime);
- frame->document()->transitionTimeline()->serviceAnimations(monotonicAnimationStartTime);
+ frame->document()->animationClock().updateTime(monotonicAnimationStartTime);
+ bool didTriggerStyleRecalc = frame->document()->timeline()->serviceAnimations();
dstockwell 2013/11/05 05:05:44 It's unfortunate that we have to thread this all t
+ didTriggerStyleRecalc |= frame->document()->transitionTimeline()->serviceAnimations();
+ if (!didTriggerStyleRecalc)
+ frame->document()->animationClock().unfreeze();
frame->document()->timeline()->dispatchEvents();
frame->document()->transitionTimeline()->dispatchEvents();
}
« no previous file with comments | « Source/core/animation/TimedItemTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698