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

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

Issue 1422713012: Devtools Animations: Listen to all animation play state changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 876 matching lines...) Expand 10 before | Expand all | Expand 10 after
887 887
888 if (playStateInternal() == Idle) 888 if (playStateInternal() == Idle)
889 return; 889 return;
890 890
891 m_holdTime = currentTimeInternal(); 891 m_holdTime = currentTimeInternal();
892 m_held = true; 892 m_held = true;
893 // TODO 893 // TODO
894 m_playState = Idle; 894 m_playState = Idle;
895 m_startTime = nullValue(); 895 m_startTime = nullValue();
896 m_currentTimePending = false; 896 m_currentTimePending = false;
897
898 InspectorInstrumentation::didCancelAnimation(m_timeline->document(), m_seque nceNumber);
899 } 897 }
900 898
901 void Animation::beginUpdatingState() 899 void Animation::beginUpdatingState()
902 { 900 {
903 // Nested calls are not allowed! 901 // Nested calls are not allowed!
904 ASSERT(!m_stateIsBeingUpdated); 902 ASSERT(!m_stateIsBeingUpdated);
905 m_stateIsBeingUpdated = true; 903 m_stateIsBeingUpdated = true;
906 } 904 }
907 905
908 void Animation::endUpdatingState() 906 void Animation::endUpdatingState()
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
1050 m_animation->setCompositorPending(true); 1048 m_animation->setCompositorPending(true);
1051 break; 1049 break;
1052 case DoNotSetCompositorPending: 1050 case DoNotSetCompositorPending:
1053 break; 1051 break;
1054 default: 1052 default:
1055 ASSERT_NOT_REACHED(); 1053 ASSERT_NOT_REACHED();
1056 break; 1054 break;
1057 } 1055 }
1058 m_animation->endUpdatingState(); 1056 m_animation->endUpdatingState();
1059 1057
1060 if (oldPlayState != newPlayState && newPlayState == Running) 1058 if (oldPlayState != newPlayState)
1061 InspectorInstrumentation::didStartAnimation(m_animation->timeline()->doc ument(), m_animation); 1059 InspectorInstrumentation::animationPlayStateChanged(m_animation->timelin e()->document(), m_animation, oldPlayState, newPlayState);
1062 } 1060 }
1063 1061
1064 bool Animation::addEventListenerInternal(const AtomicString& eventType, PassRefP trWillBeRawPtr<EventListener> listener, const EventListenerOptions& options) 1062 bool Animation::addEventListenerInternal(const AtomicString& eventType, PassRefP trWillBeRawPtr<EventListener> listener, const EventListenerOptions& options)
1065 { 1063 {
1066 if (eventType == EventTypeNames::finish) 1064 if (eventType == EventTypeNames::finish)
1067 UseCounter::count(executionContext(), UseCounter::AnimationFinishEvent); 1065 UseCounter::count(executionContext(), UseCounter::AnimationFinishEvent);
1068 return EventTargetWithInlineData::addEventListenerInternal(eventType, listen er, options); 1066 return EventTargetWithInlineData::addEventListenerInternal(eventType, listen er, options);
1069 } 1067 }
1070 1068
1071 void Animation::pauseForTesting(double pauseTime) 1069 void Animation::pauseForTesting(double pauseTime)
(...skipping 17 matching lines...) Expand all
1089 visitor->trace(m_content); 1087 visitor->trace(m_content);
1090 visitor->trace(m_timeline); 1088 visitor->trace(m_timeline);
1091 visitor->trace(m_pendingFinishedEvent); 1089 visitor->trace(m_pendingFinishedEvent);
1092 visitor->trace(m_finishedPromise); 1090 visitor->trace(m_finishedPromise);
1093 visitor->trace(m_readyPromise); 1091 visitor->trace(m_readyPromise);
1094 RefCountedGarbageCollectedEventTargetWithInlineData<Animation>::trace(visito r); 1092 RefCountedGarbageCollectedEventTargetWithInlineData<Animation>::trace(visito r);
1095 ActiveDOMObject::trace(visitor); 1093 ActiveDOMObject::trace(visitor);
1096 } 1094 }
1097 1095
1098 } // namespace 1096 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698