OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |