Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1545309 - Run ResizeObserver eventloop test after loading success…
…fully. r=dholbert In test0(), we use the callback of `requestAnimationFrame` to know in which eventloop (i.e. `Tick()`) we are. However, we may not trigger the callback of `requestAnimationFrame` if we are not visible. This is an optimization in Bug 1145439. Detail: We use `Document::ShouldThrottleFrameRequests()` to check if we should throttle the frame requests in the current `Tick()`. This function returns true if we didn't get painted during the last paint, so we are not visible, so throttle the frame requests. Note that because we have to paint this document at least once to unthrottle it, we will drop one `requestAnimationFrame` frame when a document that previously wasn't visible scrolls into view. Therefore, we should make sure we got the first paint before running test0(). Using onload is not perfect, but we don't have other better choose for now. Differential Revision: https://phabricator.services.mozilla.com/D29772 --HG-- extra : moz-landing-system : lando
- Loading branch information