| 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 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 653 | 653 |
| 654 bool Animation::hasPendingActivity() const { | 654 bool Animation::hasPendingActivity() const { |
| 655 bool hasPendingPromise = | 655 bool hasPendingPromise = |
| 656 m_finishedPromise && | 656 m_finishedPromise && |
| 657 m_finishedPromise->getState() == ScriptPromisePropertyBase::Pending; | 657 m_finishedPromise->getState() == ScriptPromisePropertyBase::Pending; |
| 658 | 658 |
| 659 return m_pendingFinishedEvent || hasPendingPromise || | 659 return m_pendingFinishedEvent || hasPendingPromise || |
| 660 (!m_finished && hasEventListeners(EventTypeNames::finish)); | 660 (!m_finished && hasEventListeners(EventTypeNames::finish)); |
| 661 } | 661 } |
| 662 | 662 |
| 663 void Animation::contextDestroyed() { | 663 void Animation::contextDestroyed(ExecutionContext*) { |
| 664 PlayStateUpdateScope updateScope(*this, TimingUpdateOnDemand); | 664 PlayStateUpdateScope updateScope(*this, TimingUpdateOnDemand); |
| 665 | 665 |
| 666 m_finished = true; | 666 m_finished = true; |
| 667 m_pendingFinishedEvent = nullptr; | 667 m_pendingFinishedEvent = nullptr; |
| 668 } | 668 } |
| 669 | 669 |
| 670 DispatchEventResult Animation::dispatchEventInternal(Event* event) { | 670 DispatchEventResult Animation::dispatchEventInternal(Event* event) { |
| 671 if (m_pendingFinishedEvent == event) | 671 if (m_pendingFinishedEvent == event) |
| 672 m_pendingFinishedEvent = nullptr; | 672 m_pendingFinishedEvent = nullptr; |
| 673 return EventTargetWithInlineData::dispatchEventInternal(event); | 673 return EventTargetWithInlineData::dispatchEventInternal(event); |
| (...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1151 DCHECK(!m_compositorPlayer); | 1151 DCHECK(!m_compositorPlayer); |
| 1152 } | 1152 } |
| 1153 | 1153 |
| 1154 void Animation::CompositorAnimationPlayerHolder::detach() { | 1154 void Animation::CompositorAnimationPlayerHolder::detach() { |
| 1155 DCHECK(m_compositorPlayer); | 1155 DCHECK(m_compositorPlayer); |
| 1156 m_compositorPlayer->setAnimationDelegate(nullptr); | 1156 m_compositorPlayer->setAnimationDelegate(nullptr); |
| 1157 m_animation = nullptr; | 1157 m_animation = nullptr; |
| 1158 m_compositorPlayer.reset(); | 1158 m_compositorPlayer.reset(); |
| 1159 } | 1159 } |
| 1160 } // namespace blink | 1160 } // namespace blink |
| OLD | NEW |