| 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 animation->attachCompositorTimeline(); | 75 animation->attachCompositorTimeline(); |
| 76 } | 76 } |
| 77 | 77 |
| 78 return animation; | 78 return animation; |
| 79 } | 79 } |
| 80 | 80 |
| 81 Animation::Animation(ExecutionContext* executionContext, | 81 Animation::Animation(ExecutionContext* executionContext, |
| 82 AnimationTimeline& timeline, | 82 AnimationTimeline& timeline, |
| 83 AnimationEffectReadOnly* content) | 83 AnimationEffectReadOnly* content) |
| 84 : ActiveScriptWrappable(this), | 84 : ActiveScriptWrappable(this), |
| 85 ActiveDOMObject(executionContext), | 85 SuspendableObject(executionContext), |
| 86 m_playState(Idle), | 86 m_playState(Idle), |
| 87 m_playbackRate(1), | 87 m_playbackRate(1), |
| 88 m_startTime(nullValue()), | 88 m_startTime(nullValue()), |
| 89 m_holdTime(0), | 89 m_holdTime(0), |
| 90 m_sequenceNumber(nextSequenceNumber()), | 90 m_sequenceNumber(nextSequenceNumber()), |
| 91 m_content(content), | 91 m_content(content), |
| 92 m_timeline(&timeline), | 92 m_timeline(&timeline), |
| 93 m_paused(false), | 93 m_paused(false), |
| 94 m_held(false), | 94 m_held(false), |
| 95 m_isPausedForTesting(false), | 95 m_isPausedForTesting(false), |
| (...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 640 m_readyPromise->resolve(this); | 640 m_readyPromise->resolve(this); |
| 641 } | 641 } |
| 642 return m_readyPromise->promise(scriptState->world()); | 642 return m_readyPromise->promise(scriptState->world()); |
| 643 } | 643 } |
| 644 | 644 |
| 645 const AtomicString& Animation::interfaceName() const { | 645 const AtomicString& Animation::interfaceName() const { |
| 646 return EventTargetNames::AnimationPlayer; | 646 return EventTargetNames::AnimationPlayer; |
| 647 } | 647 } |
| 648 | 648 |
| 649 ExecutionContext* Animation::getExecutionContext() const { | 649 ExecutionContext* Animation::getExecutionContext() const { |
| 650 return ActiveDOMObject::getExecutionContext(); | 650 return SuspendableObject::getExecutionContext(); |
| 651 } | 651 } |
| 652 | 652 |
| 653 bool Animation::hasPendingActivity() const { | 653 bool Animation::hasPendingActivity() const { |
| 654 bool hasPendingPromise = | 654 bool hasPendingPromise = |
| 655 !m_finished && m_finishedPromise && | 655 !m_finished && m_finishedPromise && |
| 656 m_finishedPromise->getState() == ScriptPromisePropertyBase::Pending; | 656 m_finishedPromise->getState() == ScriptPromisePropertyBase::Pending; |
| 657 | 657 |
| 658 return m_pendingFinishedEvent || hasPendingPromise || | 658 return m_pendingFinishedEvent || hasPendingPromise || |
| 659 (!m_finished && hasEventListeners(EventTypeNames::finish)); | 659 (!m_finished && hasEventListeners(EventTypeNames::finish)); |
| 660 } | 660 } |
| (...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1120 } | 1120 } |
| 1121 | 1121 |
| 1122 DEFINE_TRACE(Animation) { | 1122 DEFINE_TRACE(Animation) { |
| 1123 visitor->trace(m_content); | 1123 visitor->trace(m_content); |
| 1124 visitor->trace(m_timeline); | 1124 visitor->trace(m_timeline); |
| 1125 visitor->trace(m_pendingFinishedEvent); | 1125 visitor->trace(m_pendingFinishedEvent); |
| 1126 visitor->trace(m_pendingCancelledEvent); | 1126 visitor->trace(m_pendingCancelledEvent); |
| 1127 visitor->trace(m_finishedPromise); | 1127 visitor->trace(m_finishedPromise); |
| 1128 visitor->trace(m_readyPromise); | 1128 visitor->trace(m_readyPromise); |
| 1129 EventTargetWithInlineData::trace(visitor); | 1129 EventTargetWithInlineData::trace(visitor); |
| 1130 ActiveDOMObject::trace(visitor); | 1130 SuspendableObject::trace(visitor); |
| 1131 } | 1131 } |
| 1132 | 1132 |
| 1133 } // namespace blink | 1133 } // namespace blink |
| OLD | NEW |