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

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

Issue 365163004: Web Animations: Remove timeLag from Player API and model (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase. Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « LayoutTests/web-animations-api/timed-item.html ('k') | Source/core/animation/AnimationPlayer.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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 151
152 m_calculated.phase = currentPhase; 152 m_calculated.phase = currentPhase;
153 m_calculated.isInEffect = !isNull(activeTime); 153 m_calculated.isInEffect = !isNull(activeTime);
154 m_calculated.isInPlay = phase() == PhaseActive && (!m_parent || m_parent ->isInPlay()); 154 m_calculated.isInPlay = phase() == PhaseActive && (!m_parent || m_parent ->isInPlay());
155 m_calculated.isCurrent = phase() == PhaseBefore || isInPlay() || (m_pare nt && m_parent->isCurrent()); 155 m_calculated.isCurrent = phase() == PhaseBefore || isInPlay() || (m_pare nt && m_parent->isCurrent());
156 m_calculated.localTime = m_lastUpdateTime - m_startTime; 156 m_calculated.localTime = m_lastUpdateTime - m_startTime;
157 } 157 }
158 158
159 // Test for events even if timing didn't need an update as the player may ha ve gained a start time. 159 // Test for events even if timing didn't need an update as the player may ha ve gained a start time.
160 // FIXME: Refactor so that we can ASSERT(m_player) here, this is currently r equired to be nullable for testing. 160 // FIXME: Refactor so that we can ASSERT(m_player) here, this is currently r equired to be nullable for testing.
161 if (reason == TimingUpdateForAnimationFrame && (!m_player || m_player->hasSt artTime())) { 161 if (reason == TimingUpdateForAnimationFrame && (!m_player || m_player->hasSt artTime() || m_player->paused())) {
162 if (m_eventDelegate) 162 if (m_eventDelegate)
163 m_eventDelegate->onEventCondition(this); 163 m_eventDelegate->onEventCondition(this);
164 } 164 }
165 165
166 if (needsUpdate) { 166 if (needsUpdate) {
167 // FIXME: This probably shouldn't be recursive. 167 // FIXME: This probably shouldn't be recursive.
168 updateChildrenAndEffects(); 168 updateChildrenAndEffects();
169 m_calculated.timeToForwardsEffectChange = calculateTimeToEffectChange(tr ue, localTime, timeToNextIteration); 169 m_calculated.timeToForwardsEffectChange = calculateTimeToEffectChange(tr ue, localTime, timeToNextIteration);
170 m_calculated.timeToReverseEffectChange = calculateTimeToEffectChange(fal se, localTime, timeToNextIteration); 170 m_calculated.timeToReverseEffectChange = calculateTimeToEffectChange(fal se, localTime, timeToNextIteration);
171 } 171 }
(...skipping 14 matching lines...) Expand all
186 return AnimationNodeTiming::create(this); 186 return AnimationNodeTiming::create(this);
187 } 187 }
188 188
189 void AnimationNode::trace(Visitor* visitor) 189 void AnimationNode::trace(Visitor* visitor)
190 { 190 {
191 visitor->trace(m_parent); 191 visitor->trace(m_parent);
192 visitor->trace(m_player); 192 visitor->trace(m_player);
193 } 193 }
194 194
195 } // namespace blink 195 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/web-animations-api/timed-item.html ('k') | Source/core/animation/AnimationPlayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698