-
Notifications
You must be signed in to change notification settings - Fork 715
[web-animations-1] Make animations become idle when they have an inactive timeline #2066
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
To explain some of the background to how this currently works (for my own notes as much as anything), animations have two values: start time and current time which are tied together as follows:
In general, the start time and current time are tied together by the timeline time. When we're paused, we have a current time but no start time. Setting the start time, sends you to either the idle state (if you have no active timeline) or the pending/running state. If we have no active timeline, we have an invariant that you can only set either the current time (hold time) or start time but not both. If we allowed you to set both, then when you later have an active timeline we'd have to choose which one to use. So, while you have an inactive timeline, setting one will clear the other. In fact, it's generally true to say that you can only ever set one--the other one will be cleared (and then calculated immediately, or when we go to play the animation). |
One thought is to have scroll-timelines report negative infinity and positive infinity when outside their range. Then fill modes on animations would work as expected. We'd still need to make the model work correctly with infinite timeline time values (which may be non-trivial) but it would obviate the need for passing further state from timeline to animation to effect (and the extra IDL members to represent it and potential bugs when you failed to check those extra IDL members). |
Chatting with @theres-waldo one possibility for preserving the current time when hot-swapping timelines (that probably addresses the requirements in the first comment) is that we say that if you set the timeline to null, we set the hold time. i.e. const currentTime = anim.currentTime;
anim.timeline = null;
assert(anim.currentTime === currentTime); // Animation is frozen |
This is quite confusing. I tried making animations preserve their current time as the hold time but it's complicated by the fact that pause state is represented by the lack of a start time, and when an animation doesn't have a timeline, you can really only set either the start time or the hold time meaningfully. For example, suppose we have: const anim = elem.animate(...);
await anim.ready; At this point Now if we clear the timeline... anim.timeline = null; What we're suggesting in this issue is that That means that we'd need to clear the console.log(anim.currentTime); // Some number like 52.12...
console.log(anim.startTime); // null
console.log(anim.playState); // paused Now, what should happen if we re-attach a timeline? anim.timeline = new DocumentTimeline();
console.log(anim.playState); // running? paused? Whether it is running or paused will depend on whether or not we resolve a new That begs the question, however, what should happen if we do the following? anim.pause();
anim.timeline = null;
anim.timeline = new DocumentTimeline(); Assuming we resolve a new We currently avoid this by saying that the hold time is cleared when we change timelines. That way the paused state is preserved (through the resolved-ness of the A few options that come to mind here if we do want to preserve the current time:
That last option is fairly attractive. It does mean, however, that you can end up with pretty useless Furthermore, such animations will report themselves as running. i.e. const anim = elem.animate(...);
anim.timeline = null;
console.log(anim.playState); // running But maybe that's ok? In a sense it tells you what the animation will do when you do attach a timeline. Furthermore, in an academic sense, maybe you could say the animation actually is running, it's just that it is following the infinitely slow null timeline hence why it doesn't progress. That last point might make even more sense if we later make a distinction between monotonic timelines and infinite timelines (see #2075) where in the latter the |
In an effort to integrate ScrollTimeline with web animations we came along undefined behaviors, such as:
To eliminate a requirement to handle unresolved current time we proposed removing scrollTimeline.fill attribute. Instead, resolve the current time for cases when scroll is outside of start and end offsets as follows:
What was the original intention to bring scrollTimeline.fill attribute in and which functionality is compromised if the attribute is removed? As a result, we extended scroll timeline inactiveness definition to include scrollTimeline.startScrollOffset == scrollTimeline.endScrollOffset condition and specified the following behavior of animations in regards to handling inactive timelines:
Problems with this proposal:
@majido brought a case that perhaps inactive timelines should be handled similarly to null timelines. Intuitively these cases look similar and it would be nice to unify the behavior. Currently running animations with null timeline have start_time = null and hold_time = 0 as illustrated in this example, which works in Firefox too. However animation effect is applied and it is undesired behavior for inactive timelines. We are looking for suggestions and insights on this subject. |
Removing ScrollTimeline fillI support removing
Inactive Timeline BehaviorIf we apply the above change to fill then timeline in-activeness become limited to the case where One interesting case that I like to focus here is a scroller with Per above comment, ideally we went for scroll-linked animation at (1) to have an effect according to the scroll offset, at (2) to have no effect, at (3) to again have effect according to the scroll offset. All of these without requiring authors to anticipate and care about the size of the scroller inner content. Also my preference is if we can have ScrollTimeline with none-scrolling source to behave similar to a null timeline. The following note in the spec suggests this was also the intent:
But I think the current prose behaves differently, in particular it causes the animation to be in the My tests with Firefox nightly suggests that Gecko behaves very closely to what I would think is the most desired behavior when timeline is switched between a null and and active timeline (e.g., Here is a simple code pen that shows this. A. An animation with an active timeline plays as expected. Basically, when timeline goes from active<=>null, the animation goes from paused/running <=> idle and back as expected without any action from the author. I think timeline going from active to inactive should behave the same. |
I don't think this is the right reason to drop the fill attribute. We still have to handle unresolved current times one way or another. However, I think a good reason for dropping the fill attribute is the scenario described in the second paragraph of the first comment in this issue and in Majid's comment above this one.
We should make this magic explicit and introduce the states described in the first comment in this issue.
What does this mean? Is it equivalent to canceling? Is the start time preserved?
Right, this is use case 1 from the first comment in this issue.
Yep, that same suggestion is made earlier in this thread.
I think that's what the text is saying--it should be come Going through this issue and all the others, I think we're converging on something like the following approach:
So the last point is the main one that needs work and one of the questions it raises is whether or not it is ever useful to have an animation that runs at some offset from a fixed timeline (i.e. whether it is ok to simply always make However, it raises questions about how pausing/unpausing works since normally we'd recalculate the We also still need to check the 6 use cases in the start of this issue are addressed by this. |
Thinking about the start time issue bit further:
In some sense, we can already handle these different cases by, e.g. doing |
Proposal for Spec Changes Based on Discussion on 2019-12-18Scroll Timeline - Dropping Fill Mode
Web Animations Spec ChangesFor the purpose of this discussion null timeline is handled the same as inactive timeline.
Use Cases
|
Sorry for my delay in reviewing this. It's looking good but there are a few parts I'm unsure about.
I want to avoid returning any epsilon values. That still leaves open the question of what is the current time of a timeline when it is in the new My intuition here is simply that it should be
This table looks good.
I'm a little unsure about this. It would mean that if we have an animation that is paused, then if the timeline temporarily became inactive, it would become idle. An animation that is running, however, would resume running after the timeline became active again. By comparison, if we set the timeline to null and then back again, the paused animation would continue being paused. That's because the procedure for setting a timeline only clears the hold time if the start time is set. (Also, note that we wouldn't specify that "Play state is I suspect the procedure for responding to a newly inactive timeline might need to cancel pending play/pause tasks. Or perhaps those tasks would need to be updated since the play pending task asserts that either start time or hold time is set but that will no longer be the case if we unconditionally clear the hold time. I'm not sure though--perhaps we'll never queue the task in the case when the hold time is cleared. But we should probably decide what the desired behavior is for a play-pending animation whose timeline becomes inactive.
What is the reason for the "... and both animation start and current time are unresolved" requirement?
I'm afraid I don't quite follow what the proposed change here is.
I'm not sure I follow the first point, since it seems like if the timeline becomes inactive we will clear the hold time so we would no longer be paused in that case anyway. But it's the second point I'm more concerned about. Typically if we have a pending task, the play state tells you what state the animation will be in when it finishes pending. However, this change would make that no longer true. This relates to the previous question about what should happen if the timeline of a play-pending animation becomes inactive.
I think it would actually be preferable if the The other use cases look good but I didn't go into them in details since my comments above might affect the behavior there. Thank you for doing all this work. This is definitely getting closer. Unfortunately, there are a lot of states to consider here. Ultimately we should really draw up a complete state chart of all the possible states and inputs (including the odd states like when a pending-pause is interrupted by a |
Thanks @birtles for reviewing!
Another option to consider is returning unresolved current time. Having BeforeStart and AfterEnd states lets the implementation apply desired animation fill mode.
I agree with this assessment and will start a state diagram. |
To be clear, in the BeforeStart phase will it only be fill: backwards animations which are active or any animation which is active at time 0? Currently I think we have the latter, which leads to an asymmetric behavior with the implicit backwards fill due to 0 being an active time in the animation: #4325
I agree. IMO I think that we should preserve the playing state of animations even if the timeline is temporarily inactive (i.e. content is temporarily not scrollable and becomes scrollable again). |
This seems a bit magical to me. I was thinking something more along the lines of having animations pass both a "current time" and a "phase flag" (or something) to their effect, which incorporates that in the calculation of their active time. It's a little similar to the before flag we use when dealing with step functions where the step is at the start of the interval. Perhaps there's even some way to combine the two concepts? |
My understanding was it is only animations that fill backwards, and not those that are simply active at time 0. |
Per @birtles suggestion this document has 2 state charts:
Two new states are introduced to support initial playing/pausing animations when the timeline is inactive (see the first chart). The intention of these 2 states is to ensure that the effect is not applied in inactive state. This proposal assumes the following spec changes:
Second state chart shows 2 undesired behaviors:
Use cases corrected according to the current proposal:
|
This post addresses scroll timeline current time in BeforeStart and AfterEnd states with examples. The examples are provided for both proposals - infinity and (0, time range) values. Based on @birtles comments the latter is preferable. Please review the code snippets to make sure we are on the same page.
|
Thanks for doing this. I had a look but I couldn't quite understand why play/pause can go to to different states from the idle state. Does one correspond to a pending playback rate change, perhaps? Just taking the active timeline side of the diagram I got something like the following: graphviz / dot markup for the diagramdigraph G {
// States
"Idle" [label="Idle\nST = null\nHT = null\nTask = none"]
"Play-pending" [label="Play-pending\nST = null\nHT = resolved\nTask = play"]
"Pause-pending (from idle)" [label="Pause-pending\n(from idle)\nST = null\nHT = resolved\nTask = pause"]
"Pause-pending (from running)" [label="Pause-pending\n(from running)\nST = resolved\nHT = null\nTask = pause"]
"Running" [label="Running\nST = resolved\nHT = null\nTask = none"]
"Paused" [label="Paused\nST = null\nHT = resolved\nTask = none"]
// Idle state
"Idle" -> "Play-pending" [ label="play()" color="red" ]
"Idle" -> "Pause-pending (from idle)" [ label="pause()" color="green" ]
// Play-pending state
"Play-pending" -> "Running" [ label="ready" style=dashed ]
"Play-pending" -> "Play-pending" [ label="play()" color="red" ]
"Play-pending" -> "Pause-pending (from idle)" [ label="pause()" color="green" ]
// Pause-pending from idle state
"Pause-pending (from idle)" -> "Paused" [ label="ready" style=dashed ]
"Pause-pending (from idle)" -> "Play-pending" [ label="play()" color="red" ]
"Pause-pending (from idle)" -> "Pause-pending (from idle)" [ label="pause()" color="green" ]
// Pause-pending from running state
"Pause-pending (from running)" -> "Paused" [ label="ready" style=dashed ]
// (Following is the aborted paused behavior)
"Pause-pending (from running)" -> "Running" [ label="play()" color="red" ]
"Pause-pending (from running)" -> "Pause-pending (from running)" [ label="pause()" color="green" ]
// Running state
"Running" -> "Running" [ label="play()" color="red" ]
"Running" -> "Pause-pending (from running)" [ label="pause()" color="green" ]
// Paused state
"Paused" -> "Paused" [ label="pause()" color="green" ]
"Paused" -> "Play-pending" [ label="play()" color="red" ]
} I generated the diagram using http://www.webgraphviz.com/ if you want to fix it. |
The second approach is definitely what I had in mind. |
Thanks @birtles for reviewing the diagrams! Sorry about the mix up with 2 different states - I was copying the PPT diagrams and somehow these extra arrows where added. I'll re-generate the diagram with webgraphviz tool, it's more appropriate for collaboration. The original chart is updated, including removing the extra transition from the Idle state on the inactive timeline side.
My understanding is that the transition goes to Play Pending State (ST = resolved HT = null Task = "play"). See https://drafts.csswg.org/web-animations/#playing-an-animation-section, bullet 5. Isn't this the case? |
Thanks @ogerchikov! Yes, you're totally right. I misread that step. The state diagram needs to split the "Play-pending" case into "Play-pending (from idle)" and "Play-pending (aborted pause)" or something like that to cover the two different cases (ST = null, HT = resolved vs ST = resolve, HT = null). |
Animation State ChartsetStartTime/setCurrentTime Active Timeline ChartsetStartTime/setCurrentTime Inactive Timeline Chart |
Based on the animation state charts provided above, here is the essence of the proposal for handling inactive timelines:
animation = new Animation(new KeyframeEffect(...}],
{ duration: 2000}), document.timeline);
animation.play();
await animation.ready;
animation.timeline = null;
console.log(animation.currentTime); //null
animation.currentTime = 500;
console.log(animation.playState); // running because the animation has play pending task
animation.timeline = document.timeline;
await animation.ready;
console.log(animation.playState); //running |
Yes, I agree this is the desired behavior.
I want to avoid this. We have a distinction that setting these members is synchronous. Only the methods are async (e.g. setting |
Please see below the chart if start time of scroll linked animations is initialized to zero for both active and inactive timelines (see #4842). This solves the inconsistency of the state @birtles pointed out and makes animation to produce unresolved current time when the timeline is inactive. |
@ogerchikov similar to #4899 I believe per our last F2F sync, there is no more work needed on this issue given your changes to web-animations specification. |
#4842 has spec changes required to handle inactive scroll timelines. |
w3c/csswg-drafts#5400 There is the issue that led to the spec change for play state: w3c/csswg-drafts#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
w3c/csswg-drafts#5400 There is the issue that led to the spec change for play state: w3c/csswg-drafts#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}
w3c/csswg-drafts#5400 There is the issue that led to the spec change for play state: w3c/csswg-drafts#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}
w3c/csswg-drafts#5400 There is the issue that led to the spec change for play state: w3c/csswg-drafts#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}
This reverts commit 008d0a49de0c0fa5fb0a566827e6d964697516d3. Reason for revert: Decision on w3c/csswg-drafts#5400 Original change's description: > Fix Animation::playState > > w3c/csswg-drafts#5400 > > There is the issue that led to the spec change for play state: > > w3c/csswg-drafts#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
This reverts commit 008d0a49de0c0fa5fb0a566827e6d964697516d3. Reason for revert: Decision on w3c/csswg-drafts#5400 Original change's description: > Fix Animation::playState > > w3c/csswg-drafts#5400 > > There is the issue that led to the spec change for play state: > > w3c/csswg-drafts#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/+/2352513 Reviewed-by: Kevin Ellis <kevers@chromium.org> Commit-Queue: Kevin Ellis <kevers@chromium.org> Cr-Commit-Position: refs/heads/master@{#797351}
This reverts commit 008d0a49de0c0fa5fb0a566827e6d964697516d3. Reason for revert: Decision on w3c/csswg-drafts#5400 Original change's description: > Fix Animation::playState > > w3c/csswg-drafts#5400 > > There is the issue that led to the spec change for play state: > > w3c/csswg-drafts#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/+/2352513 Reviewed-by: Kevin Ellis <kevers@chromium.org> Commit-Queue: Kevin Ellis <kevers@chromium.org> Cr-Commit-Position: refs/heads/master@{#797351}
This reverts commit 008d0a4. Reason for revert: Decision on w3c/csswg-drafts#5400 Original change's description: > Fix Animation::playState > > w3c/csswg-drafts#5400 > > There is the issue that led to the spec change for play state: > > w3c/csswg-drafts#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/+/2352513 Reviewed-by: Kevin Ellis <kevers@chromium.org> Commit-Queue: Kevin Ellis <kevers@chromium.org> Cr-Commit-Position: refs/heads/master@{#797351}
Automatic update from web-platform-tests Fix Animation::playState w3c/csswg-drafts#5400 There is the issue that led to the spec change for play state: w3c/csswg-drafts#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} -- wpt-commits: be33a107474ab852445c617976e3d0b9b44c4a94 wpt-pr: 24925
…tonly Automatic update from web-platform-tests Revert "Fix Animation::playState" This reverts commit 008d0a49de0c0fa5fb0a566827e6d964697516d3. Reason for revert: Decision on w3c/csswg-drafts#5400 Original change's description: > Fix Animation::playState > > w3c/csswg-drafts#5400 > > There is the issue that led to the spec change for play state: > > w3c/csswg-drafts#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/+/2352513 Reviewed-by: Kevin Ellis <kevers@chromium.org> Commit-Queue: Kevin Ellis <kevers@chromium.org> Cr-Commit-Position: refs/heads/master@{#797351} -- wpt-commits: 1fdbfcc68156cd8d8a74a6cfd859b43adc3ca502 wpt-pr: 24978
Automatic update from web-platform-tests Fix Animation::playState w3c/csswg-drafts#5400 There is the issue that led to the spec change for play state: w3c/csswg-drafts#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} -- wpt-commits: be33a107474ab852445c617976e3d0b9b44c4a94 wpt-pr: 24925
…tonly Automatic update from web-platform-tests Revert "Fix Animation::playState" This reverts commit 008d0a49de0c0fa5fb0a566827e6d964697516d3. Reason for revert: Decision on w3c/csswg-drafts#5400 Original change's description: > Fix Animation::playState > > w3c/csswg-drafts#5400 > > There is the issue that led to the spec change for play state: > > w3c/csswg-drafts#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/+/2352513 Reviewed-by: Kevin Ellis <kevers@chromium.org> Commit-Queue: Kevin Ellis <kevers@chromium.org> Cr-Commit-Position: refs/heads/master@{#797351} -- wpt-commits: 1fdbfcc68156cd8d8a74a6cfd859b43adc3ca502 wpt-pr: 24978
Automatic update from web-platform-tests Fix Animation::playState w3c/csswg-drafts#5400 There is the issue that led to the spec change for play state: w3c/csswg-drafts#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} -- wpt-commits: be33a107474ab852445c617976e3d0b9b44c4a94 wpt-pr: 24925
…tonly Automatic update from web-platform-tests Revert "Fix Animation::playState" This reverts commit 008d0a49de0c0fa5fb0a566827e6d964697516d3. Reason for revert: Decision on w3c/csswg-drafts#5400 Original change's description: > Fix Animation::playState > > w3c/csswg-drafts#5400 > > There is the issue that led to the spec change for play state: > > w3c/csswg-drafts#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/+/2352513 Reviewed-by: Kevin Ellis <kevers@chromium.org> Commit-Queue: Kevin Ellis <kevers@chromium.org> Cr-Commit-Position: refs/heads/master@{#797351} -- wpt-commits: 1fdbfcc68156cd8d8a74a6cfd859b43adc3ca502 wpt-pr: 24978
From @birtles on November 24, 2016 7:31
In experimenting with scroll-driven timelines we often have the situation where we want the state of the timeline to determine whether animations are in-effect or not. For example, you may want the timeline to be active for a certain scroll range and animations to have no effect outside that range.
This is quite tricky, because I imagine that there are some use cases were you have multiple animations associated with the same
ScrollTimeline
where you want some to fill backwards and others not to. However, I can't see any combination of timeline and effectfillMode
that will produce that result.That suggests to me that timelines actually have four states:
That analysis might not be right, but whatever approach we take I think we need to have a consistent answer to the following questions:
startTime
of an animation not associated with a timeline, what does it do initially, and when you later attach a timeline?startTime
I guess) when re-attaching to the same timeline. i.e. in what circumstances is the following effectively a no-op:I think we have pretty consistent answers to the above currently, but our answers don't work well with inactive timelines and finite timelines.
We also need to bear in mind the following use cases:
The last one is particularly interesting and would be nice to support if possible (we currently do).
Do we also need to support timelines with multiple independent playback ranges? i.e. are the four states above insufficiently general?
theres-waldo/scroll-driven-animations#1 contains some further details of issues we've hit with this.
Copied from original issue: w3c/web-animations#174
The text was updated successfully, but these errors were encountered: