Skip to content
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

Make rAF and web-animation timestamps relative and coarsened #9823

Merged
merged 2 commits into from
Oct 4, 2023

Conversation

noamr
Copy link
Contributor

@noamr noamr commented Oct 2, 2023

This fixes a bug in the spec where rAF and web animations were given a shared timestamp (not relative to the time origin).

Closes #7931

(See WHATWG Working Mode: Changes for more details.)


/infrastructure.html ( diff )
/webappapis.html ( diff )

@domenic
Copy link
Member

domenic commented Oct 3, 2023

Can we fix IntersectionObserver at the same time? And then we could compute the relativized/coarsened timestamp once, e.g. up around step 5 where now is defined, and then just pass it along three times.

@noamr
Copy link
Contributor Author

noamr commented Oct 3, 2023

Can we fix IntersectionObserver at the same time? And then we could compute the relativized/coarsened timestamp once, e.g. up around step 5 where now is defined, and then just pass it along three times.

It would need to be computed once per document as each would have a different relative time. So do you mean something like having an associated "current rendering time" for each document?

@domenic
Copy link
Member

domenic commented Oct 3, 2023

Good point, that would be unnecessarily messy. Your current structure is good then. Still, should we fix IntersectionObserver at the same time, or just go ahead and merge this as-is? I don't think we can call #7931 closed until we fix all three though, right?

(And maybe we should make Web Animations consistent?? Or maybe that's another can of worms; https://drafts.csswg.org/web-animations-1/#document-timelines looks pretty different from the usual infrastructure.)

@noamr
Copy link
Contributor Author

noamr commented Oct 3, 2023

Good point, that would be unnecessarily messy. Your current structure is good then. Still, should we fix IntersectionObserver at the same time, or just go ahead and merge this as-is? I don't think we can call #7931 closed until we fix all three though, right?

Also fixed intersection observer.

(And maybe we should make Web Animations consistent?? Or maybe that's another can of worms; https://drafts.csswg.org/web-animations-1/#document-timelines looks pretty different from the usual infrastructure.)

I would fix that as part of web animations. It seems to be worded in a bit of a monkey-patched way there.

@domenic domenic merged commit 43b1200 into whatwg:main Oct 4, 2023
1 check passed
@noamr noamr deleted the raf-relative branch October 4, 2023 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

rAF Timestamp Relativeness Mismatch
2 participants