Chromium Code Reviews| 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 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 606 return ActiveDOMObject::executionContext(); | 606 return ActiveDOMObject::executionContext(); |
| 607 } | 607 } |
| 608 | 608 |
| 609 bool AnimationPlayer::hasPendingActivity() const | 609 bool AnimationPlayer::hasPendingActivity() const |
| 610 { | 610 { |
| 611 return m_pendingFinishedEvent || (!m_finished && hasEventListeners(EventType Names::finish)); | 611 return m_pendingFinishedEvent || (!m_finished && hasEventListeners(EventType Names::finish)); |
| 612 } | 612 } |
| 613 | 613 |
| 614 void AnimationPlayer::stop() | 614 void AnimationPlayer::stop() |
| 615 { | 615 { |
| 616 PlayStateUpdateScope updateScope(*this, TimingUpdateOnDemand); | 616 PlayStateUpdateScope updateScope(*this, TimingUpdateOnDemand); |
|
loyso (OOO)
2015/04/02 02:52:07
This implicitly sets CompositorPendingChange = Set
| |
| 617 | 617 |
| 618 m_finished = true; | 618 m_finished = true; |
| 619 m_pendingFinishedEvent = nullptr; | 619 m_pendingFinishedEvent = nullptr; |
| 620 } | 620 } |
| 621 | 621 |
| 622 bool AnimationPlayer::dispatchEvent(PassRefPtrWillBeRawPtr<Event> event) | 622 bool AnimationPlayer::dispatchEvent(PassRefPtrWillBeRawPtr<Event> event) |
| 623 { | 623 { |
| 624 if (m_pendingFinishedEvent == event) | 624 if (m_pendingFinishedEvent == event) |
| 625 m_pendingFinishedEvent = nullptr; | 625 m_pendingFinishedEvent = nullptr; |
| 626 return EventTargetWithInlineData::dispatchEvent(event); | 626 return EventTargetWithInlineData::dispatchEvent(event); |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 705 m_compositorState->sourceChanged = true; | 705 m_compositorState->sourceChanged = true; |
| 706 } | 706 } |
| 707 if (m_compositorPending || m_isPausedForTesting) { | 707 if (m_compositorPending || m_isPausedForTesting) { |
| 708 return; | 708 return; |
| 709 } | 709 } |
| 710 | 710 |
| 711 if (sourceChanged || !m_compositorState | 711 if (sourceChanged || !m_compositorState |
| 712 || !playing() || m_compositorState->playbackRate != m_playbackRate | 712 || !playing() || m_compositorState->playbackRate != m_playbackRate |
| 713 || m_compositorState->startTime != m_startTime) { | 713 || m_compositorState->startTime != m_startTime) { |
| 714 m_compositorPending = true; | 714 m_compositorPending = true; |
| 715 ASSERT(timeline()); | |
| 716 ASSERT(timeline()->document()); | |
| 715 timeline()->document()->compositorPendingAnimations().add(this); | 717 timeline()->document()->compositorPendingAnimations().add(this); |
| 716 } | 718 } |
| 717 } | 719 } |
| 718 | 720 |
| 719 void AnimationPlayer::cancelAnimationOnCompositor() | 721 void AnimationPlayer::cancelAnimationOnCompositor() |
| 720 { | 722 { |
| 721 if (hasActiveAnimationsOnCompositor()) | 723 if (hasActiveAnimationsOnCompositor()) |
| 722 toAnimation(m_content.get())->cancelAnimationOnCompositor(); | 724 toAnimation(m_content.get())->cancelAnimationOnCompositor(); |
| 723 } | 725 } |
| 724 | 726 |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 928 visitor->trace(m_content); | 930 visitor->trace(m_content); |
| 929 visitor->trace(m_timeline); | 931 visitor->trace(m_timeline); |
| 930 visitor->trace(m_pendingFinishedEvent); | 932 visitor->trace(m_pendingFinishedEvent); |
| 931 visitor->trace(m_finishedPromise); | 933 visitor->trace(m_finishedPromise); |
| 932 visitor->trace(m_readyPromise); | 934 visitor->trace(m_readyPromise); |
| 933 EventTargetWithInlineData::trace(visitor); | 935 EventTargetWithInlineData::trace(visitor); |
| 934 ActiveDOMObject::trace(visitor); | 936 ActiveDOMObject::trace(visitor); |
| 935 } | 937 } |
| 936 | 938 |
| 937 } // namespace | 939 } // namespace |
| OLD | NEW |