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

Unified Diff: Source/core/page/animation/AnimationController.cpp

Issue 14556022: Simplify animation testing API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 7 years, 7 months 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
Index: Source/core/page/animation/AnimationController.cpp
diff --git a/Source/core/page/animation/AnimationController.cpp b/Source/core/page/animation/AnimationController.cpp
index afbb40bc1087dd0246be9e7ce06be4630d935b1f..c5c3d425c762b63e390df01a4f4b3f35150a4cc9 100644
--- a/Source/core/page/animation/AnimationController.cpp
+++ b/Source/core/page/animation/AnimationController.cpp
@@ -304,40 +304,13 @@ void AnimationControllerPrivate::resumeAnimationsForDocument(Document* document)
updateAnimationTimer();
}
-bool AnimationControllerPrivate::pauseAnimationAtTime(RenderObject* renderer, const AtomicString& name, double t)
+void AnimationControllerPrivate::pauseAnimationsForTesting(double t)
{
- if (!renderer)
- return false;
-
- RefPtr<CompositeAnimation> compAnim = accessCompositeAnimation(renderer);
- if (!compAnim)
- return false;
-
- if (compAnim->pauseAnimationAtTime(name, t)) {
- renderer->node()->setNeedsStyleRecalc(SyntheticStyleChange);
- startUpdateStyleIfNeededDispatcher();
- return true;
- }
-
- return false;
-}
-
-bool AnimationControllerPrivate::pauseTransitionAtTime(RenderObject* renderer, const String& property, double t)
-{
- if (!renderer)
- return false;
-
- RefPtr<CompositeAnimation> compAnim = accessCompositeAnimation(renderer);
- if (!compAnim)
- return false;
-
- if (compAnim->pauseTransitionAtTime(cssPropertyID(property), t)) {
- renderer->node()->setNeedsStyleRecalc(SyntheticStyleChange);
- startUpdateStyleIfNeededDispatcher();
- return true;
+ RenderObjectAnimationMap::const_iterator animationsEnd = m_compositeAnimations.end();
+ for (RenderObjectAnimationMap::const_iterator it = m_compositeAnimations.begin(); it != animationsEnd; ++it) {
+ it->value->pauseAnimationsForTesting(t);
+ it->key->node()->setNeedsStyleRecalc(SyntheticStyleChange);
}
-
- return false;
}
double AnimationControllerPrivate::beginAnimationUpdateTime()
@@ -540,9 +513,9 @@ void AnimationController::notifyAnimationStarted(RenderObject*, double startTime
m_data->receivedStartTimeResponse(startTime);
}
-bool AnimationController::pauseAnimationAtTime(RenderObject* renderer, const AtomicString& name, double t)
+void AnimationController::pauseAnimationsForTesting(double t)
{
- return m_data->pauseAnimationAtTime(renderer, name, t);
+ m_data->pauseAnimationsForTesting(t);
}
unsigned AnimationController::numberOfActiveAnimations(Document* document) const
@@ -550,11 +523,6 @@ unsigned AnimationController::numberOfActiveAnimations(Document* document) const
return m_data->numberOfActiveAnimations(document);
}
-bool AnimationController::pauseTransitionAtTime(RenderObject* renderer, const String& property, double t)
-{
- return m_data->pauseTransitionAtTime(renderer, property, t);
-}
-
bool AnimationController::isRunningAnimationOnRenderer(RenderObject* renderer, CSSPropertyID property, bool isRunningNow) const
{
return m_data->isRunningAnimationOnRenderer(renderer, property, isRunningNow);
« no previous file with comments | « Source/core/page/animation/AnimationController.h ('k') | Source/core/page/animation/AnimationControllerPrivate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698