| 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 if (m_held) { | 140 if (m_held) { |
| 141 setCurrentTimeInternal(m_holdTime, reason); | 141 setCurrentTimeInternal(m_holdTime, reason); |
| 142 return; | 142 return; |
| 143 } | 143 } |
| 144 if (!limited(calculateCurrentTime())) | 144 if (!limited(calculateCurrentTime())) |
| 145 return; | 145 return; |
| 146 m_held = true; | 146 m_held = true; |
| 147 m_holdTime = m_playbackRate < 0 ? 0 : sourceEnd(); | 147 m_holdTime = m_playbackRate < 0 ? 0 : sourceEnd(); |
| 148 } | 148 } |
| 149 | 149 |
| 150 double AnimationPlayer::startTime(bool& isNull) const |
| 151 { |
| 152 double result = startTime(); |
| 153 isNull = std::isnan(result); |
| 154 return result; |
| 155 } |
| 156 |
| 150 double AnimationPlayer::startTime() const | 157 double AnimationPlayer::startTime() const |
| 151 { | 158 { |
| 152 return m_startTime * 1000; | 159 return m_startTime * 1000; |
| 153 } | 160 } |
| 154 | 161 |
| 162 double AnimationPlayer::currentTime(bool& isNull) |
| 163 { |
| 164 double result = currentTime(); |
| 165 isNull = std::isnan(result); |
| 166 return result; |
| 167 } |
| 168 |
| 155 double AnimationPlayer::currentTime() | 169 double AnimationPlayer::currentTime() |
| 156 { | 170 { |
| 157 if (m_currentTimePending || m_idle) | 171 if (m_currentTimePending || m_idle) |
| 158 return std::numeric_limits<double>::quiet_NaN(); | 172 return std::numeric_limits<double>::quiet_NaN(); |
| 159 return currentTimeInternal() * 1000; | 173 return currentTimeInternal() * 1000; |
| 160 } | 174 } |
| 161 | 175 |
| 162 double AnimationPlayer::currentTimeInternal() | 176 double AnimationPlayer::currentTimeInternal() |
| 163 { | 177 { |
| 164 updateCurrentTimingState(TimingUpdateOnDemand); | 178 updateCurrentTimingState(TimingUpdateOnDemand); |
| (...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 679 | 693 |
| 680 void AnimationPlayer::trace(Visitor* visitor) | 694 void AnimationPlayer::trace(Visitor* visitor) |
| 681 { | 695 { |
| 682 visitor->trace(m_content); | 696 visitor->trace(m_content); |
| 683 visitor->trace(m_timeline); | 697 visitor->trace(m_timeline); |
| 684 visitor->trace(m_pendingFinishedEvent); | 698 visitor->trace(m_pendingFinishedEvent); |
| 685 EventTargetWithInlineData::trace(visitor); | 699 EventTargetWithInlineData::trace(visitor); |
| 686 } | 700 } |
| 687 | 701 |
| 688 } // namespace | 702 } // namespace |
| OLD | NEW |