Commit 73c5df92 authored by Kevin Ellis's avatar Kevin Ellis Committed by Commit Bot

Remove dead code from blink animation.cc.

This patch is part of a series to clean up the implementation of
web-animation to align with the specification.

Bug: 960944
Change-Id: Ie8c97d61ee371c22454ceb52c9441161199775d6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1726349
Commit-Queue: Kevin Ellis <kevers@chromium.org>
Reviewed-by: default avatarStephen McGruer <smcgruer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#682716}
parent a111441e
......@@ -464,25 +464,10 @@ void Animation::PostCommit(double timeline_time) {
if (!compositor_state_ || compositor_state_->pending_action == kNone)
return;
switch (compositor_state_->pending_action) {
case kStart:
if (compositor_state_->start_time) {
DCHECK_EQ(start_time_.value(), compositor_state_->start_time.value());
compositor_state_->pending_action = kNone;
}
break;
case kPause:
case kPauseThenStart:
DCHECK(!start_time_);
compositor_state_->pending_action = kNone;
SetCurrentTimeInternal(
(timeline_time - compositor_state_->start_time.value()) *
playback_rate_,
kTimingUpdateForAnimationFrame);
current_time_pending_ = false;
break;
default:
NOTREACHED();
DCHECK_EQ(kStart, compositor_state_->pending_action);
if (compositor_state_->start_time) {
DCHECK_EQ(start_time_.value(), compositor_state_->start_time.value());
compositor_state_->pending_action = kNone;
}
}
......
......@@ -76,7 +76,7 @@ class CORE_EXPORT Animation : public EventTargetWithInlineData,
enum AnimationPlayState {
kUnset,
kIdle,
kPending,
kPending, // TODO(crbug.com/958433) remove non-spec compliant state.
kRunning,
kPaused,
kFinished
......@@ -245,7 +245,7 @@ class CORE_EXPORT Animation : public EventTargetWithInlineData,
RegisteredEventListener&) override;
private:
// TODO(crbug/960944): Deprecate. This version of the play state is not to
// TODO(crbug.com/960944): Deprecate. This version of the play state is not to
// spec due to the inclusion of a 'pending' state. Whether or not an animation
// is pending is separate from the actual play state.
AnimationPlayState PlayStateInternal() const;
......@@ -369,7 +369,9 @@ class CORE_EXPORT Animation : public EventTargetWithInlineData,
Member<Event> pending_cancelled_event_;
enum CompositorAction { kNone, kPause, kStart, kPauseThenStart };
// TODO(crbug.com/960944): Consider reintroducing kPause and cleanup use of
// mutually exclusive pending_play_ and pending_pause_ flags.
enum CompositorAction { kNone, kStart };
class CompositorState {
USING_FAST_MALLOC(CompositorState);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment