| 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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 } | 320 } |
| 321 break; | 321 break; |
| 322 case Pause: | 322 case Pause: |
| 323 case PauseThenStart: | 323 case PauseThenStart: |
| 324 ASSERT(std::isnan(m_startTime)); | 324 ASSERT(std::isnan(m_startTime)); |
| 325 m_compositorState->pendingAction = None; | 325 m_compositorState->pendingAction = None; |
| 326 setCurrentTimeInternal((timelineTime - m_compositorState->startTime) * m
_playbackRate, TimingUpdateForAnimationFrame); | 326 setCurrentTimeInternal((timelineTime - m_compositorState->startTime) * m
_playbackRate, TimingUpdateForAnimationFrame); |
| 327 m_currentTimePending = false; | 327 m_currentTimePending = false; |
| 328 break; | 328 break; |
| 329 default: | 329 default: |
| 330 ASSERT_NOT_REACHED(); | 330 NOTREACHED(); |
| 331 } | 331 } |
| 332 } | 332 } |
| 333 | 333 |
| 334 void Animation::notifyCompositorStartTime(double timelineTime) | 334 void Animation::notifyCompositorStartTime(double timelineTime) |
| 335 { | 335 { |
| 336 PlayStateUpdateScope updateScope(*this, TimingUpdateOnDemand, DoNotSetCompos
itorPending); | 336 PlayStateUpdateScope updateScope(*this, TimingUpdateOnDemand, DoNotSetCompos
itorPending); |
| 337 | 337 |
| 338 if (m_compositorState) { | 338 if (m_compositorState) { |
| 339 ASSERT(m_compositorState->pendingAction == Start); | 339 ASSERT(m_compositorState->pendingAction == Start); |
| 340 ASSERT(std::isnan(m_compositorState->startTime)); | 340 ASSERT(std::isnan(m_compositorState->startTime)); |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 477 return "idle"; | 477 return "idle"; |
| 478 case Pending: | 478 case Pending: |
| 479 return "pending"; | 479 return "pending"; |
| 480 case Running: | 480 case Running: |
| 481 return "running"; | 481 return "running"; |
| 482 case Paused: | 482 case Paused: |
| 483 return "paused"; | 483 return "paused"; |
| 484 case Finished: | 484 case Finished: |
| 485 return "finished"; | 485 return "finished"; |
| 486 default: | 486 default: |
| 487 ASSERT_NOT_REACHED(); | 487 NOTREACHED(); |
| 488 return ""; | 488 return ""; |
| 489 } | 489 } |
| 490 } | 490 } |
| 491 | 491 |
| 492 Animation::AnimationPlayState Animation::playStateInternal() const | 492 Animation::AnimationPlayState Animation::playStateInternal() const |
| 493 { | 493 { |
| 494 ASSERT(m_playState != Unset); | 494 ASSERT(m_playState != Unset); |
| 495 return m_playState; | 495 return m_playState; |
| 496 } | 496 } |
| 497 | 497 |
| (...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1032 switch (m_compositorPendingChange) { | 1032 switch (m_compositorPendingChange) { |
| 1033 case SetCompositorPending: | 1033 case SetCompositorPending: |
| 1034 m_animation->setCompositorPending(); | 1034 m_animation->setCompositorPending(); |
| 1035 break; | 1035 break; |
| 1036 case SetCompositorPendingWithEffectChanged: | 1036 case SetCompositorPendingWithEffectChanged: |
| 1037 m_animation->setCompositorPending(true); | 1037 m_animation->setCompositorPending(true); |
| 1038 break; | 1038 break; |
| 1039 case DoNotSetCompositorPending: | 1039 case DoNotSetCompositorPending: |
| 1040 break; | 1040 break; |
| 1041 default: | 1041 default: |
| 1042 ASSERT_NOT_REACHED(); | 1042 NOTREACHED(); |
| 1043 break; | 1043 break; |
| 1044 } | 1044 } |
| 1045 m_animation->endUpdatingState(); | 1045 m_animation->endUpdatingState(); |
| 1046 | 1046 |
| 1047 if (oldPlayState != newPlayState) | 1047 if (oldPlayState != newPlayState) |
| 1048 InspectorInstrumentation::animationPlayStateChanged(m_animation->timelin
e()->document(), m_animation, oldPlayState, newPlayState); | 1048 InspectorInstrumentation::animationPlayStateChanged(m_animation->timelin
e()->document(), m_animation, oldPlayState, newPlayState); |
| 1049 } | 1049 } |
| 1050 | 1050 |
| 1051 void Animation::addedEventListener(const AtomicString& eventType, RegisteredEven
tListener& registeredListener) | 1051 void Animation::addedEventListener(const AtomicString& eventType, RegisteredEven
tListener& registeredListener) |
| 1052 { | 1052 { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1084 visitor->trace(m_timeline); | 1084 visitor->trace(m_timeline); |
| 1085 visitor->trace(m_pendingFinishedEvent); | 1085 visitor->trace(m_pendingFinishedEvent); |
| 1086 visitor->trace(m_pendingCancelledEvent); | 1086 visitor->trace(m_pendingCancelledEvent); |
| 1087 visitor->trace(m_finishedPromise); | 1087 visitor->trace(m_finishedPromise); |
| 1088 visitor->trace(m_readyPromise); | 1088 visitor->trace(m_readyPromise); |
| 1089 EventTargetWithInlineData::trace(visitor); | 1089 EventTargetWithInlineData::trace(visitor); |
| 1090 ActiveDOMObject::trace(visitor); | 1090 ActiveDOMObject::trace(visitor); |
| 1091 } | 1091 } |
| 1092 | 1092 |
| 1093 } // namespace blink | 1093 } // namespace blink |
| OLD | NEW |