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

Side by Side Diff: Source/core/animation/Animation.cpp

Issue 196413030: Web animations: Supply CSS transition easing (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | Source/core/animation/AnimationEffect.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 return; 120 return;
121 121
122 if (player() && !previouslyInEffect) { 122 if (player() && !previouslyInEffect) {
123 ensureAnimationStack(m_target.get()).add(this); 123 ensureAnimationStack(m_target.get()).add(this);
124 m_activeInAnimationStack = true; 124 m_activeInAnimationStack = true;
125 } 125 }
126 126
127 double iteration = currentIteration(); 127 double iteration = currentIteration();
128 ASSERT(iteration >= 0); 128 ASSERT(iteration >= 0);
129 // FIXME: Handle iteration values which overflow int. 129 // FIXME: Handle iteration values which overflow int.
130 m_activeInterpolations = m_effect->sample(static_cast<int>(iteration), timeF raction()); 130 m_activeInterpolations = m_effect->sample(static_cast<int>(iteration), timeF raction(), duration());
131 if (player()) 131 if (player())
132 m_target->setNeedsAnimationStyleRecalc(); 132 m_target->setNeedsAnimationStyleRecalc();
133 } 133 }
134 134
135 void Animation::clearEffects() 135 void Animation::clearEffects()
136 { 136 {
137 ASSERT(player()); 137 ASSERT(player());
138 ASSERT(m_activeInAnimationStack); 138 ASSERT(m_activeInAnimationStack);
139 ensureAnimationStack(m_target.get()).remove(this); 139 ensureAnimationStack(m_target.get()).remove(this);
140 140
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 void Animation::pauseAnimationForTestingOnCompositor(double pauseTime) 246 void Animation::pauseAnimationForTestingOnCompositor(double pauseTime)
247 { 247 {
248 ASSERT(hasActiveAnimationsOnCompositor()); 248 ASSERT(hasActiveAnimationsOnCompositor());
249 if (!m_target || !m_target->renderer()) 249 if (!m_target || !m_target->renderer())
250 return; 250 return;
251 for (size_t i = 0; i < m_compositorAnimationIds.size(); ++i) 251 for (size_t i = 0; i < m_compositorAnimationIds.size(); ++i)
252 CompositorAnimations::instance()->pauseAnimationForTestingOnCompositor(* m_target.get(), m_compositorAnimationIds[i], pauseTime); 252 CompositorAnimations::instance()->pauseAnimationForTestingOnCompositor(* m_target.get(), m_compositorAnimationIds[i], pauseTime);
253 } 253 }
254 254
255 } // namespace WebCore 255 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | Source/core/animation/AnimationEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698