Commit 48327fc5 authored by Kevin Ellis's avatar Kevin Ellis Committed by Commit Bot

Revert "Fix Animation::playState"

This reverts commit 008d0a49.

Reason for revert: Decision on https://github.com/w3c/csswg-drafts/issues/5400

Original change's description:
> Fix Animation::playState
> 
> https://github.com/w3c/csswg-drafts/issues/5400
> 
> There is the issue that led to the spec change for play state:
> 
> https://github.com/w3c/csswg-drafts/issues/2066
> 
> The issue addresses undesirable toggling of the play state due to
> inactive timelines, but does not seem to adequately address having an
> unresolved (null) timeline.
> 
> 
> Bug: 1113382
> Change-Id: I33032ee1e9de10d3dce4958fce599bd98391328f
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2339676
> Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org>
> Commit-Queue: Kevin Ellis <kevers@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#796403}

TBR=kevers@chromium.org,andruud@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 1113382
Change-Id: I24aa0ef5c62f839573a70f063c1f25ce4281b2e5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2352513Reviewed-by: default avatarKevin Ellis <kevers@chromium.org>
Commit-Queue: Kevin Ellis <kevers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#797351}
parent 00b8c64b
...@@ -942,9 +942,7 @@ Animation::AnimationPlayState Animation::CalculateAnimationPlayState() const { ...@@ -942,9 +942,7 @@ Animation::AnimationPlayState Animation::CalculateAnimationPlayState() const {
// * animation does not have either a pending play task or a pending pause // * animation does not have either a pending play task or a pending pause
// task, // task,
// then idle. // then idle.
// https://github.com/w3c/csswg-drafts/issues/5400 if (!CurrentTimeInternal() && !start_time_ && !PendingInternal())
if (!CurrentTimeInternal() && (!start_time_ || !timeline_) &&
!PendingInternal())
return kIdle; return kIdle;
// 2. Either of the following conditions are true: // 2. Either of the following conditions are true:
......
...@@ -60,7 +60,7 @@ test(t => { ...@@ -60,7 +60,7 @@ test(t => {
new Animation(new KeyframeEffect(createDiv(t), null, 100 * MS_PER_SEC), new Animation(new KeyframeEffect(createDiv(t), null, 100 * MS_PER_SEC),
null); null);
animation.startTime = document.timeline.currentTime; animation.startTime = document.timeline.currentTime;
assert_equals(animation.playState, 'idle'); assert_equals(animation.playState, 'running');
animation.timeline = document.timeline; animation.timeline = document.timeline;
...@@ -73,7 +73,7 @@ test(t => { ...@@ -73,7 +73,7 @@ test(t => {
new Animation(new KeyframeEffect(createDiv(t), null, 100 * MS_PER_SEC), new Animation(new KeyframeEffect(createDiv(t), null, 100 * MS_PER_SEC),
null); null);
animation.startTime = document.timeline.currentTime - 200 * MS_PER_SEC; animation.startTime = document.timeline.currentTime - 200 * MS_PER_SEC;
assert_equals(animation.playState, 'idle'); assert_equals(animation.playState, 'running');
animation.timeline = document.timeline; animation.timeline = document.timeline;
......
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