Open Bug 1636416 Opened 4 years ago Updated 4 years ago

IntersectionObserver doesn't report transform animations' changes on the compositor

Categories

(Core :: DOM: Animation, defect)

76 Branch
defect

Tracking

()

People

(Reporter: alexander, Unassigned)

References

(Blocks 1 open bug)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36

Steps to reproduce:

Create IntersectionObserver
Observe element that has CSS transition or animation
Move this element to intersect with root as part of CSS animation or transition

Actual results:

IntersectionObserver callback triggering is throttled

Expected results:

Callbacks should work as configured.

Here's the reproduction link:
https://codepen.io/talmand/pen/oNvdQOR/

Strange thing is when you move mouse mouse around the document it starts to trigger properly. In Chrome is does not trigger at all unless you move mouse around, here's Chromium bug:
https://bugs.chromium.org/p/chromium/issues/detail?id=1080583
However in Chrome it could be also remedied by empty requestAnimationFrame function trigger on each frame. It doesn't help in case of Firefox though. In Safari nothing seems to help...

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → DOM: Animation
Product: Firefox → Core

I guess we could not throttle transform animation updates on the main thread if there's an IntersectionObserver observing that element or something... A bit annoying :)

Interesting that rAF in Chrome updates the throttled animation state. Maybe that explains some of the animation synchronization differences that we see with Chrome from time to time?

Status: UNCONFIRMED → NEW
Ever confirmed: true

Yeah, Chrome's behavior is interesting. To fix this issue we need to observe transform animations on the compositor.

Summary: IntersectionObserver and CSS animations issue → IntersectionObserver doesn't report transform animations' changes on the compositor

Because this bug's Severity is normal and has not been changed, and this bug's priority is -- (none,) indicating it has has not been previously triaged, the bug's Severity is being updated to -- (default, untriaged.)

Severity: normal → --

The severity field is not set for this bug.
:birtles, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(brian)
Severity: -- → S3
Flags: needinfo?(brian)
You need to log in before you can comment on or make changes to this bug.