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 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 setPlaybackRate(-m_playbackRate); | 382 setPlaybackRate(-m_playbackRate); |
383 unpauseInternal(); | 383 unpauseInternal(); |
384 } | 384 } |
385 | 385 |
386 void AnimationPlayer::finish(ExceptionState& exceptionState) | 386 void AnimationPlayer::finish(ExceptionState& exceptionState) |
387 { | 387 { |
388 if (!m_playbackRate) { | 388 if (!m_playbackRate) { |
389 return; | 389 return; |
390 } | 390 } |
391 if (m_playbackRate > 0 && sourceEnd() == std::numeric_limits<double>::infini
ty()) { | 391 if (m_playbackRate > 0 && sourceEnd() == std::numeric_limits<double>::infini
ty()) { |
392 exceptionState.throwDOMException(InvalidStateError, "AnimationPlayer has
source content whose end time is infinity."); | 392 exceptionState.ThrowDOMException(InvalidStateError, "AnimationPlayer has
source content whose end time is infinity."); |
393 return; | 393 return; |
394 } | 394 } |
395 if (playing()) { | 395 if (playing()) { |
396 setPending(); | 396 setPending(); |
397 } | 397 } |
398 if (m_playbackRate < 0) { | 398 if (m_playbackRate < 0) { |
399 setCurrentTimeInternal(0, TimingUpdateOnDemand); | 399 setCurrentTimeInternal(0, TimingUpdateOnDemand); |
400 } else { | 400 } else { |
401 setCurrentTimeInternal(sourceEnd(), TimingUpdateOnDemand); | 401 setCurrentTimeInternal(sourceEnd(), TimingUpdateOnDemand); |
402 } | 402 } |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 | 525 |
526 void AnimationPlayer::pauseForTesting(double pauseTime) | 526 void AnimationPlayer::pauseForTesting(double pauseTime) |
527 { | 527 { |
528 RELEASE_ASSERT(!paused()); | 528 RELEASE_ASSERT(!paused()); |
529 setCurrentTimeInternal(pauseTime, TimingUpdateOnDemand); | 529 setCurrentTimeInternal(pauseTime, TimingUpdateOnDemand); |
530 m_isPausedForTesting = true; | 530 m_isPausedForTesting = true; |
531 pause(); | 531 pause(); |
532 } | 532 } |
533 | 533 |
534 } // namespace | 534 } // namespace |
OLD | NEW |