| 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 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |