| 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 973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 984 Animation::PlayStateUpdateScope::~PlayStateUpdateScope() | 984 Animation::PlayStateUpdateScope::~PlayStateUpdateScope() |
| 985 { | 985 { |
| 986 AnimationPlayState oldPlayState = m_initialPlayState; | 986 AnimationPlayState oldPlayState = m_initialPlayState; |
| 987 AnimationPlayState newPlayState = m_animation->calculatePlayState(); | 987 AnimationPlayState newPlayState = m_animation->calculatePlayState(); |
| 988 | 988 |
| 989 m_animation->m_playState = newPlayState; | 989 m_animation->m_playState = newPlayState; |
| 990 if (oldPlayState != newPlayState) { | 990 if (oldPlayState != newPlayState) { |
| 991 bool wasActive = oldPlayState == Pending || oldPlayState == Running; | 991 bool wasActive = oldPlayState == Pending || oldPlayState == Running; |
| 992 bool isActive = newPlayState == Pending || newPlayState == Running; | 992 bool isActive = newPlayState == Pending || newPlayState == Running; |
| 993 if (!wasActive && isActive) | 993 if (!wasActive && isActive) |
| 994 TRACE_EVENT_NESTABLE_ASYNC_BEGIN1("blink.animations,devtools.timelin
e,benchmark", "Animation", m_animation, "data", InspectorAnimationEvent::data(*m
_animation)); | 994 TRACE_EVENT_NESTABLE_ASYNC_BEGIN1("blink.animations,devtools.timelin
e,benchmark,rail", "Animation", m_animation, "data", InspectorAnimationEvent::da
ta(*m_animation)); |
| 995 else if (wasActive && !isActive) | 995 else if (wasActive && !isActive) |
| 996 TRACE_EVENT_NESTABLE_ASYNC_END1("blink.animations,devtools.timeline,
benchmark", "Animation", m_animation, "endData", InspectorAnimationStateEvent::d
ata(*m_animation)); | 996 TRACE_EVENT_NESTABLE_ASYNC_END1("blink.animations,devtools.timeline,
benchmark,rail", "Animation", m_animation, "endData", InspectorAnimationStateEve
nt::data(*m_animation)); |
| 997 else | 997 else |
| 998 TRACE_EVENT_NESTABLE_ASYNC_INSTANT1("blink.animations,devtools.timel
ine,benchmark", "Animation", m_animation, "data", InspectorAnimationStateEvent::
data(*m_animation)); | 998 TRACE_EVENT_NESTABLE_ASYNC_INSTANT1("blink.animations,devtools.timel
ine,benchmark,rail", "Animation", m_animation, "data", InspectorAnimationStateEv
ent::data(*m_animation)); |
| 999 } | 999 } |
| 1000 | 1000 |
| 1001 // Ordering is important, the ready promise should resolve/reject before | 1001 // Ordering is important, the ready promise should resolve/reject before |
| 1002 // the finished promise. | 1002 // the finished promise. |
| 1003 if (m_animation->m_readyPromise && newPlayState != oldPlayState) { | 1003 if (m_animation->m_readyPromise && newPlayState != oldPlayState) { |
| 1004 if (newPlayState == Idle) { | 1004 if (newPlayState == Idle) { |
| 1005 if (m_animation->m_readyPromise->getState() == AnimationPromise::Pen
ding) { | 1005 if (m_animation->m_readyPromise->getState() == AnimationPromise::Pen
ding) { |
| 1006 m_animation->m_readyPromise->reject(DOMException::create(AbortEr
ror)); | 1006 m_animation->m_readyPromise->reject(DOMException::create(AbortEr
ror)); |
| 1007 } | 1007 } |
| 1008 m_animation->m_readyPromise->reset(); | 1008 m_animation->m_readyPromise->reset(); |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1100 visitor->trace(m_timeline); | 1100 visitor->trace(m_timeline); |
| 1101 visitor->trace(m_pendingFinishedEvent); | 1101 visitor->trace(m_pendingFinishedEvent); |
| 1102 visitor->trace(m_pendingCancelledEvent); | 1102 visitor->trace(m_pendingCancelledEvent); |
| 1103 visitor->trace(m_finishedPromise); | 1103 visitor->trace(m_finishedPromise); |
| 1104 visitor->trace(m_readyPromise); | 1104 visitor->trace(m_readyPromise); |
| 1105 EventTargetWithInlineData::trace(visitor); | 1105 EventTargetWithInlineData::trace(visitor); |
| 1106 ActiveDOMObject::trace(visitor); | 1106 ActiveDOMObject::trace(visitor); |
| 1107 } | 1107 } |
| 1108 | 1108 |
| 1109 } // namespace blink | 1109 } // namespace blink |
| OLD | NEW |