Contact emails
Spec
This leverages the spec change done for render pipeline throttling we're currently using for off screen iframes.
Summary
Delay running the rendering pipeline (style, layout, paint) and executing requestAnimationFrame callbacks inside iframes until pending stylesheets have finished loading. Today we paint white until the pending sheets are done loading, this change makes requestAnimationFrame respect the decision to not actually paint anything.
This makes the platform more rational by avoiding pumping requestAnimationFrame and starting animations when the iframe is not actually painting.
Is this feature supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
Yes.
Interoperability and Compatibility Risk
Moderate.
Chrome has throttled the pipeline of the entire frame tree while the top level page is blocked on sheets for many years, but has not throttled iframes separately from the whole frame tree. Chrome is also throttling the pipeline for off screen third-party iframes today.
No other browser currently throttles requestAnimationFrame when pending sheets are loading.
The primary risk is that content in parent frames depend on requestAnimationFrame running in nested same origin iframes while they're still waiting on external sheets. This situation should be rare because scripts block on external sheets, so the parent frame would either need to access the contentWindow of the iframe directly to call requestAnimationFrame, or a setTimeout/setInterval/event handler inside the iframe would need to run with precise timing so the requestAnimationFrame of the parent and the child would be together.
In person discussions with representatives from Edge and Firefox have expressed interest in rationalizing the platform this way if it's possible to ship without breaking content.
Demo link
This page demonstrates running requestAnimationFrame inside an iframe which is not painting because the sheets are still loading. After this change it will always report 1 frame for the iframe, the first paint where its pixels would actually be displayed.
OWP launch tracking bug
Entry on the feature dashboard
- E