Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Side by Side Diff: third_party/WebKit/Source/core/animation/Animation.cpp

Issue 2366253002: Remove ActiveDOMObject::stop() (Closed)
Patch Set: temp Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 646
647 ExecutionContext* Animation::getExecutionContext() const { 647 ExecutionContext* Animation::getExecutionContext() const {
648 return ActiveDOMObject::getExecutionContext(); 648 return ActiveDOMObject::getExecutionContext();
649 } 649 }
650 650
651 bool Animation::hasPendingActivity() const { 651 bool Animation::hasPendingActivity() const {
652 return m_pendingFinishedEvent || 652 return m_pendingFinishedEvent ||
653 (!m_finished && hasEventListeners(EventTypeNames::finish)); 653 (!m_finished && hasEventListeners(EventTypeNames::finish));
654 } 654 }
655 655
656 void Animation::stop() { 656 void Animation::contextDestroyed() {
657 PlayStateUpdateScope updateScope(*this, TimingUpdateOnDemand); 657 PlayStateUpdateScope updateScope(*this, TimingUpdateOnDemand);
658 658
659 m_finished = true; 659 m_finished = true;
660 m_pendingFinishedEvent = nullptr; 660 m_pendingFinishedEvent = nullptr;
661 } 661 }
662 662
663 DispatchEventResult Animation::dispatchEventInternal(Event* event) { 663 DispatchEventResult Animation::dispatchEventInternal(Event* event) {
664 if (m_pendingFinishedEvent == event) 664 if (m_pendingFinishedEvent == event)
665 m_pendingFinishedEvent = nullptr; 665 m_pendingFinishedEvent = nullptr;
666 return EventTargetWithInlineData::dispatchEventInternal(event); 666 return EventTargetWithInlineData::dispatchEventInternal(event);
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
1111 visitor->trace(m_timeline); 1111 visitor->trace(m_timeline);
1112 visitor->trace(m_pendingFinishedEvent); 1112 visitor->trace(m_pendingFinishedEvent);
1113 visitor->trace(m_pendingCancelledEvent); 1113 visitor->trace(m_pendingCancelledEvent);
1114 visitor->trace(m_finishedPromise); 1114 visitor->trace(m_finishedPromise);
1115 visitor->trace(m_readyPromise); 1115 visitor->trace(m_readyPromise);
1116 EventTargetWithInlineData::trace(visitor); 1116 EventTargetWithInlineData::trace(visitor);
1117 ActiveDOMObject::trace(visitor); 1117 ActiveDOMObject::trace(visitor);
1118 } 1118 }
1119 1119
1120 } // namespace blink 1120 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698