Open Bug 1441173 Opened 7 years ago Updated 1 year ago

window.promiseDocumentFlushed should not work with subframes

Categories

(Core :: General, enhancement)

enhancement

Tracking

()

People

(Reporter: mconley, Unassigned)

References

Details

window.promiseDocumentFlushed is meant to be called on top-level inner windows, and not on the outerWindows of subframes. This is also because we have this case to deal with: <iframe style="display: none"></iframe> <script> var i = document.querySelector("iframe"); i.style.display = ""; i.contentWindow.promiseDocumentFlushed(() => 1); </script> With the code as it currently stands, we throw an exception here because the PresShell for the subframe doesn't exist. The other complication is that sometimes a subframe will report that _it_ doesn't need a style or layout flush, even though its parent _does_, meaning that a style or layout flush could still occur when querying for style / layout information even though the nsGlobalWindowInner determines that no style or layout flushes are required[1] [1]: See bug 1434376 comment 69 and bug 1434376 comment 70
Severity: normal → S3
Flags: needinfo?(jmathies)
You need to log in before you can comment on or make changes to this bug.