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

Animations should stop until the next turn of the event loop if script reads layout properties #5533

Open
pcwalton opened this issue Apr 5, 2015 · 2 comments

Comments

@pcwalton
Copy link
Contributor

@pcwalton pcwalton commented Apr 5, 2015

roc pointed out a potential web-compat problem in off-main-thread animations. This could fail in Servo, whereas it succeeds in all other browser engines:

let el = ... some element ... ;
let r0 = el.getBoundingClientRect();
let r1 = el.getBoundingClientRect();
assert(r0.left == r1.left);

This is because the animation refresh could tick in between let r0 = ... and let r1 = ... and mess with the layout.

The easiest way to fix this is to stop all animations until the next turn of the event loop if script performs layout queries.

@nox
Copy link
Member

@nox nox commented Sep 30, 2017

@pcwalton Wasn't this fixed?

@jdm
Copy link
Member

@jdm jdm commented Sep 30, 2017

I do not believe we have any code that stops animations from progressing if script performs a layout query.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.