Bug 1578309 Comment 48 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

(In reply to Boris Chiou [:boris] from comment #47)
> (In reply to Hiroyuki Ikezoe (:hiro) from comment #46)
> > Yeah, looks like the rAF case should be fixed by the TODO, the animation.ready case should be handled separately [here](https://searchfox.org/mozilla-central/rev/08bd4e9a7b2cda36f26b5c94fdcc5bd802e9114c/layout/painting/nsDisplayList.cpp#2280) in TriggerPendingAnimations, but yeah, the animation case should also be fixed by using ShouldThrottleFrameRequests there.
> 
> Yes. Using ShouldThrottleFrameRequests() in TriggerPendingAnimations() works as expected. I am writing a patch (and a test) for in-process case.

Using ShouldThrottleFrameRequests() is not enough. We don't trigger pending animations only if
1. The frame is throttled (e.g. we don't paint this iframe), and
2. this is a cross-origin iframe

So for example.
`<iframe id="iframe" srcdoc='<div id="target"></div>'></iframe>`
It seems we treat this as non cross-origin, so we should still trigger pending animation in this case.
(In reply to Boris Chiou [:boris] from comment #47)
> (In reply to Hiroyuki Ikezoe (:hiro) from comment #46)
> > Yeah, looks like the rAF case should be fixed by the TODO, the animation.ready case should be handled separately [here](https://searchfox.org/mozilla-central/rev/08bd4e9a7b2cda36f26b5c94fdcc5bd802e9114c/layout/painting/nsDisplayList.cpp#2280) in TriggerPendingAnimations, but yeah, the animation case should also be fixed by using ShouldThrottleFrameRequests there.
> 
> Yes. Using ShouldThrottleFrameRequests() in TriggerPendingAnimations() works as expected. I am writing a patch (and a test) for in-process case.

Using ShouldThrottleFrameRequests() is not enough. We wouldn't like to trigger pending animations only if
1. the frame is throttled (e.g. we don't paint this iframe), and
2. this is a cross-origin iframe

So for example.
`<iframe id="iframe" srcdoc='<div id="target"></div>'></iframe>`
It seems we treat this as non cross-origin, so we should still trigger pending animation in this case.

Back to Bug 1578309 Comment 48