OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 Apple 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 } | 220 } |
221 | 221 |
222 void SMILTimeContainer::resume() | 222 void SMILTimeContainer::resume() |
223 { | 223 { |
224 if (!handleAnimationPolicy(RestartOnceTimer)) | 224 if (!handleAnimationPolicy(RestartOnceTimer)) |
225 return; | 225 return; |
226 DCHECK(isPaused()); | 226 DCHECK(isPaused()); |
227 | 227 |
228 m_paused = false; | 228 m_paused = false; |
229 | 229 |
230 if (isStarted()) | 230 if (!isStarted()) |
231 synchronizeToDocumentTimeline(); | 231 return; |
232 | 232 |
| 233 synchronizeToDocumentTimeline(); |
233 scheduleWakeUp(0, SynchronizeAnimations); | 234 scheduleWakeUp(0, SynchronizeAnimations); |
234 } | 235 } |
235 | 236 |
236 void SMILTimeContainer::setElapsed(SMILTime time) | 237 void SMILTimeContainer::setElapsed(SMILTime time) |
237 { | 238 { |
238 m_presentationTime = time.value(); | 239 m_presentationTime = time.value(); |
239 | 240 |
240 // If the document hasn't finished loading, |m_presentationTime| will be | 241 // If the document hasn't finished loading, |m_presentationTime| will be |
241 // used as the start time to seek to once it's possible. | 242 // used as the start time to seek to once it's possible. |
242 if (!isStarted()) | 243 if (!isStarted()) |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
545 setElapsed(elapsed().value() + initialFrameDelay); | 546 setElapsed(elapsed().value() + initialFrameDelay); |
546 } | 547 } |
547 | 548 |
548 DEFINE_TRACE(SMILTimeContainer) | 549 DEFINE_TRACE(SMILTimeContainer) |
549 { | 550 { |
550 visitor->trace(m_scheduledAnimations); | 551 visitor->trace(m_scheduledAnimations); |
551 visitor->trace(m_ownerSVGElement); | 552 visitor->trace(m_ownerSVGElement); |
552 } | 553 } |
553 | 554 |
554 } // namespace blink | 555 } // namespace blink |
OLD | NEW |