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 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1059 default: | 1059 default: |
1060 ASSERT_NOT_REACHED(); | 1060 ASSERT_NOT_REACHED(); |
1061 break; | 1061 break; |
1062 } | 1062 } |
1063 m_animation->endUpdatingState(); | 1063 m_animation->endUpdatingState(); |
1064 | 1064 |
1065 if (oldPlayState != newPlayState && newPlayState == Running) | 1065 if (oldPlayState != newPlayState && newPlayState == Running) |
1066 InspectorInstrumentation::didCreateAnimation(m_animation->timeline()->do
cument(), m_animation); | 1066 InspectorInstrumentation::didCreateAnimation(m_animation->timeline()->do
cument(), m_animation); |
1067 } | 1067 } |
1068 | 1068 |
1069 bool Animation::addEventListener(const AtomicString& eventType, PassRefPtr<Event
Listener> listener, bool useCapture) | 1069 bool Animation::addEventListener(const AtomicString& eventType, PassRefPtrWillBe
RawPtr<EventListener> listener, bool useCapture) |
1070 { | 1070 { |
1071 if (eventType == EventTypeNames::finish) | 1071 if (eventType == EventTypeNames::finish) |
1072 UseCounter::count(executionContext(), UseCounter::AnimationFinishEvent); | 1072 UseCounter::count(executionContext(), UseCounter::AnimationFinishEvent); |
1073 return EventTargetWithInlineData::addEventListener(eventType, listener, useC
apture); | 1073 return EventTargetWithInlineData::addEventListener(eventType, listener, useC
apture); |
1074 } | 1074 } |
1075 | 1075 |
1076 void Animation::pauseForTesting(double pauseTime) | 1076 void Animation::pauseForTesting(double pauseTime) |
1077 { | 1077 { |
1078 RELEASE_ASSERT(!paused()); | 1078 RELEASE_ASSERT(!paused()); |
1079 setCurrentTimeInternal(pauseTime, TimingUpdateOnDemand); | 1079 setCurrentTimeInternal(pauseTime, TimingUpdateOnDemand); |
1080 if (hasActiveAnimationsOnCompositor()) | 1080 if (hasActiveAnimationsOnCompositor()) |
1081 toKeyframeEffect(m_content.get())->pauseAnimationForTestingOnCompositor(
currentTimeInternal()); | 1081 toKeyframeEffect(m_content.get())->pauseAnimationForTestingOnCompositor(
currentTimeInternal()); |
1082 m_isPausedForTesting = true; | 1082 m_isPausedForTesting = true; |
1083 pause(); | 1083 pause(); |
1084 } | 1084 } |
1085 | 1085 |
1086 DEFINE_TRACE(Animation) | 1086 DEFINE_TRACE(Animation) |
1087 { | 1087 { |
1088 visitor->trace(m_content); | 1088 visitor->trace(m_content); |
1089 visitor->trace(m_timeline); | 1089 visitor->trace(m_timeline); |
1090 visitor->trace(m_pendingFinishedEvent); | 1090 visitor->trace(m_pendingFinishedEvent); |
1091 visitor->trace(m_finishedPromise); | 1091 visitor->trace(m_finishedPromise); |
1092 visitor->trace(m_readyPromise); | 1092 visitor->trace(m_readyPromise); |
1093 EventTargetWithInlineData::trace(visitor); | 1093 EventTargetWithInlineData::trace(visitor); |
1094 ActiveDOMObject::trace(visitor); | 1094 ActiveDOMObject::trace(visitor); |
1095 } | 1095 } |
1096 | 1096 |
1097 } // namespace | 1097 } // namespace |
OLD | NEW |