W3C home > Mailing lists > Public > public-css-archive@w3.org > June 2021

[csswg-drafts] [web-animations-2] Setting the timeline to null during play vs. play-pending (#6412)

From: andruud via GitHub <sysbot+gh@w3.org>
Date: Tue, 29 Jun 2021 08:32:31 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-932366008-1624955549-sysbot+gh@w3.org>
andruud has just created a new issue for https://github.com/w3c/csswg-drafts:

== [web-animations-2] Setting the timeline to null during play vs. play-pending ==
The algorithm for [setting the timeline of an animation](https://drafts.csswg.org/web-animations-2/#setting-the-timeline) confuses me. When setting the timeline from DocumentTimeline to null, we get different results if we have a pending play task, vs. if we're actually playing. My (potentially inaccurate) iterpretation is this:

- If we set the timeline to null during pending play, we get a resolved hold time (and hence current time) stuck at zero.
- If we set the timeline to null during actual play, we get some resolved start time and an unresolved hold time, hence per [current time of an animation](https://drafts.csswg.org/web-animations-1/#the-current-time-of-an-animation) we get an unresolved current time, since we have no timeline.

1. Isn't it weird that we get a resolved current time with a null timeline? (Pending-play case).

2. What is supposed to happen for CSS animations?

```
@keyframes anim {
  from { width: 100px; }
  to { width: 200px; }
}

#div {
  width: 0px;
  animation: anim 1e10s linear;
}

// Initially document.timeline.
getComputedStyle(div).width; // 100px;
div.style.animationTimeline = 'none';
getComputedStyle(div).width; // ???
```

The result can not depend on pending-play status.

cc @kevers-google 

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6412 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 29 June 2021 08:32:33 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:36 UTC