| 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 30 matching lines...) Expand all Loading... |
| 41 static const double initialFrameDelay = 0.025; | 41 static const double initialFrameDelay = 0.025; |
| 42 static const double animationPolicyOnceDuration = 3.000; | 42 static const double animationPolicyOnceDuration = 3.000; |
| 43 | 43 |
| 44 SMILTimeContainer::SMILTimeContainer(SVGSVGElement& owner) | 44 SMILTimeContainer::SMILTimeContainer(SVGSVGElement& owner) |
| 45 : m_presentationTime(0), | 45 : m_presentationTime(0), |
| 46 m_referenceTime(0), | 46 m_referenceTime(0), |
| 47 m_frameSchedulingState(Idle), | 47 m_frameSchedulingState(Idle), |
| 48 m_started(false), | 48 m_started(false), |
| 49 m_paused(false), | 49 m_paused(false), |
| 50 m_documentOrderIndexesDirty(false), | 50 m_documentOrderIndexesDirty(false), |
| 51 m_wakeupTimer(this, &SMILTimeContainer::wakeupTimerFired), | 51 m_wakeupTimer( |
| 52 m_animationPolicyOnceTimer(this, | 52 TaskRunnerHelper::get(TaskType::UnspecedTimer, &owner.document()), |
| 53 &SMILTimeContainer::animationPolicyTimerFired), | 53 this, |
| 54 m_ownerSVGElement(&owner) | 54 &SMILTimeContainer::wakeupTimerFired), |
| 55 { | 55 m_animationPolicyOnceTimer( |
| 56 } | 56 TaskRunnerHelper::get(TaskType::UnspecedTimer, &owner.document()), |
| 57 this, |
| 58 &SMILTimeContainer::animationPolicyTimerFired), |
| 59 m_ownerSVGElement(&owner) {} |
| 57 | 60 |
| 58 SMILTimeContainer::~SMILTimeContainer() { | 61 SMILTimeContainer::~SMILTimeContainer() { |
| 59 cancelAnimationFrame(); | 62 cancelAnimationFrame(); |
| 60 cancelAnimationPolicyTimer(); | 63 cancelAnimationPolicyTimer(); |
| 61 ASSERT(!m_wakeupTimer.isActive()); | 64 ASSERT(!m_wakeupTimer.isActive()); |
| 62 #if DCHECK_IS_ON() | 65 #if DCHECK_IS_ON() |
| 63 ASSERT(!m_preventScheduledAnimationsChanges); | 66 ASSERT(!m_preventScheduledAnimationsChanges); |
| 64 #endif | 67 #endif |
| 65 } | 68 } |
| 66 | 69 |
| (...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 void SMILTimeContainer::advanceFrameForTesting() { | 529 void SMILTimeContainer::advanceFrameForTesting() { |
| 527 setElapsed(elapsed() + initialFrameDelay); | 530 setElapsed(elapsed() + initialFrameDelay); |
| 528 } | 531 } |
| 529 | 532 |
| 530 DEFINE_TRACE(SMILTimeContainer) { | 533 DEFINE_TRACE(SMILTimeContainer) { |
| 531 visitor->trace(m_scheduledAnimations); | 534 visitor->trace(m_scheduledAnimations); |
| 532 visitor->trace(m_ownerSVGElement); | 535 visitor->trace(m_ownerSVGElement); |
| 533 } | 536 } |
| 534 | 537 |
| 535 } // namespace blink | 538 } // namespace blink |
| OLD | NEW |