Open Bug 1817051 Opened 1 year ago Updated 1 year ago

Animations with a scroll progress timeline should be sampled once per frame

Categories

(Core :: CSS Transitions and Animations, defect)

defect

Tracking

()

People

(Reporter: boris, Unassigned)

References

(Blocks 1 open bug, )

Details

Per spec:

To avoid such layout cycles, animations with a scroll progress timeline are sampled once per frame, after scrolling in response to input events has taken place, but before requestAnimationFrame() callbacks are run. If the sampling of such an animation causes a change to a scroll offset, the animation will not be re-sampled to reflect the new offset until the next frame.

Looks like we may sample the animation multiple times. The related wpt:

  1. https://searchfox.org/mozilla-central/source/testing/web-platform/tests/scroll-animations/css/scroll-timeline-sampling.html
  2. https://searchfox.org/mozilla-central/source/testing/web-platform/tests/scroll-animations/css/scroll-timeline-multi-pass.tentative.html

(In reply to Boris Chiou [:boris] from comment #0)

Looks like we may sample the animation multiple times. The related wpt:
https://searchfox.org/mozilla-central/source/testing/web-platform/tests/scroll-animations/css/scroll-timeline-sampling.html

This test doesn't precisely test what the spec defined. It tests an animated computed style value after requestAnimationFrame() call backs. And to be precise, the test shouldn't use getComputedStyle(), it shouldn't invoke any forcibly flushing style things. And with those, I don't think we will pass the test.

You need to log in before you can comment on or make changes to this bug.