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

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

Issue 2638593003: Allow pausing paused animations for testing (Closed)
Patch Set: Remove check Created 3 years, 11 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
« no previous file with comments | « third_party/WebKit/LayoutTests/animations/pause-paused-animation-for-testing.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after
1073 1073
1074 void Animation::addedEventListener( 1074 void Animation::addedEventListener(
1075 const AtomicString& eventType, 1075 const AtomicString& eventType,
1076 RegisteredEventListener& registeredListener) { 1076 RegisteredEventListener& registeredListener) {
1077 EventTargetWithInlineData::addedEventListener(eventType, registeredListener); 1077 EventTargetWithInlineData::addedEventListener(eventType, registeredListener);
1078 if (eventType == EventTypeNames::finish) 1078 if (eventType == EventTypeNames::finish)
1079 UseCounter::count(getExecutionContext(), UseCounter::AnimationFinishEvent); 1079 UseCounter::count(getExecutionContext(), UseCounter::AnimationFinishEvent);
1080 } 1080 }
1081 1081
1082 void Animation::pauseForTesting(double pauseTime) { 1082 void Animation::pauseForTesting(double pauseTime) {
1083 RELEASE_ASSERT(!paused());
1084 setCurrentTimeInternal(pauseTime, TimingUpdateOnDemand); 1083 setCurrentTimeInternal(pauseTime, TimingUpdateOnDemand);
1085 if (hasActiveAnimationsOnCompositor()) 1084 if (hasActiveAnimationsOnCompositor())
1086 toKeyframeEffectReadOnly(m_content.get()) 1085 toKeyframeEffectReadOnly(m_content.get())
1087 ->pauseAnimationForTestingOnCompositor(currentTimeInternal()); 1086 ->pauseAnimationForTestingOnCompositor(currentTimeInternal());
1088 m_isPausedForTesting = true; 1087 m_isPausedForTesting = true;
1089 pause(); 1088 pause();
1090 } 1089 }
1091 1090
1092 void Animation::setEffectSuppressed(bool suppressed) { 1091 void Animation::setEffectSuppressed(bool suppressed) {
1093 m_effectSuppressed = suppressed; 1092 m_effectSuppressed = suppressed;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
1151 DCHECK(!m_compositorPlayer); 1150 DCHECK(!m_compositorPlayer);
1152 } 1151 }
1153 1152
1154 void Animation::CompositorAnimationPlayerHolder::detach() { 1153 void Animation::CompositorAnimationPlayerHolder::detach() {
1155 DCHECK(m_compositorPlayer); 1154 DCHECK(m_compositorPlayer);
1156 m_compositorPlayer->setAnimationDelegate(nullptr); 1155 m_compositorPlayer->setAnimationDelegate(nullptr);
1157 m_animation = nullptr; 1156 m_animation = nullptr;
1158 m_compositorPlayer.reset(); 1157 m_compositorPlayer.reset();
1159 } 1158 }
1160 } // namespace blink 1159 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/animations/pause-paused-animation-for-testing.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698