Bug 1578309 Comment 24 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 Hiroyuki Ikezoe (:hiro) from comment #10)
> I was guessing the reason why `ready` Promise is not fullfilld there is because we don't have a refresh driver for the OOP iframe.  I wonder whether rAF callbacks or setTimeout callbacks are invoked or not.

I'm not 100% sure when the refresh driver creates, but I notice these differences (in layout-debugger):
1. If the animation is not hidden (or remove `overflow:hidden;`):
* `Animation::mReady->MaybeResolve()` is called (in `ResumeAt()`) and looks like there are two refresh drivers (for content process) running and one of them [dispatchs an animation event](https://searchfox.org/mozilla-central/rev/ca910762568921c0faa34838d6a4efac2471dff1/layout/base/nsRefreshDriver.cpp#1774). I guess the one is for OOP iframe.
* Gecko has the rAF callback in the OOP iframe.
* In Google Chrome, no animation.ready, and no rAF callback.
* In Safari, no animation.ready, but it has rAF callback.
2. if the animation is hidden:
* No one calls `Animation::mReady->MaybeResolve()`. But I still see at least two refresh driver running for content process.
* Gecko has the rAF callback in the OOP iframe.
* In Google Chrome, no animation.ready, and no rAF callback.
* In Safari, no animation.ready, but it has rAF callback.

So both Safari and Chrome don't fulfill animation.ready. Not sure which behavior is reasonable anyway. Maybe no animation.ready fulfill is fine in OOP iframe for now.

BTW, how do I map the refresh driver to the OOP iframe?
(In reply to Hiroyuki Ikezoe (:hiro) from comment #10)
> I was guessing the reason why `ready` Promise is not fullfilld there is because we don't have a refresh driver for the OOP iframe.  I wonder whether rAF callbacks or setTimeout callbacks are invoked or not.

I'm not 100% sure when the refresh driver creates, but I notice these differences (in layout-debugger):
1. If the animation is not hidden (or remove `overflow:hidden;`):
* `Animation::mReady->MaybeResolve()` is called (in `ResumeAt()`) and looks like there are two refresh drivers (for content process) running and one of them [dispatchs an animation event](https://searchfox.org/mozilla-central/rev/ca910762568921c0faa34838d6a4efac2471dff1/layout/base/nsRefreshDriver.cpp#1774). I guess the one is for OOP iframe.
* Gecko has the rAF callback in the OOP iframe.
* In Google Chrome, no animation.ready, and no rAF callback.
* In Safari, no animation.ready, but it has rAF callback.
2. if the animation is hidden:
* No one calls `Animation::mReady->MaybeResolve()`. But I still see at least two refresh drivers running for content process.
* Gecko has the rAF callback in the OOP iframe.
* In Google Chrome, no animation.ready, and no rAF callback.
* In Safari, no animation.ready, but it has rAF callback.

So both Safari and Chrome don't fulfill animation.ready. Not sure which behavior is reasonable anyway. Maybe no animation.ready fulfill is fine in OOP iframe for now.

BTW, how do I map the refresh driver to the OOP iframe?
(In reply to Hiroyuki Ikezoe (:hiro) from comment #10)
> I was guessing the reason why `ready` Promise is not fullfilld there is because we don't have a refresh driver for the OOP iframe.  I wonder whether rAF callbacks or setTimeout callbacks are invoked or not.

I'm not 100% sure when the refresh driver creates, but I notice these differences (in layout-debugger):
1. If the animation is not hidden (or remove `overflow:hidden;`):
* `Animation::mReady->MaybeResolve()` is called (in `ResumeAt()`) and looks like there are two refresh drivers (for content process) running and one of them [dispatchs an animation event](https://searchfox.org/mozilla-central/rev/ca910762568921c0faa34838d6a4efac2471dff1/layout/base/nsRefreshDriver.cpp#1774). I guess the one is for OOP iframe.
* Gecko has the rAF callback in the OOP iframe.
* In Google Chrome, no animation.ready, and no rAF callback.
* In Safari, no animation.ready, but it has rAF callback.
2. if the animation is hidden:
* No one calls `Animation::mReady->MaybeResolve()`. But I still see at least two refresh drivers running for content process.
* Gecko has the rAF callback in the OOP iframe.
* In Google Chrome, no animation.ready, and no rAF callback.
* In Safari, no animation.ready, but it has rAF callback.

So both Safari and Chrome don't fulfill animation.ready. Not sure which behavior is reasonable anyway. Maybe no animation.ready fulfilled is fine in OOP iframe for now.

BTW, how do I map the refresh driver to the OOP iframe?

Back to Bug 1578309 Comment 24