[Webkit-unassigned] [Bug 250072] New: Resize event on iframe fired before rAF on parent document

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 4 03:44:45 PST 2023


            Bug ID: 250072
           Summary: Resize event on iframe fired before rAF on parent
           Product: WebKit
           Version: Safari Technology Preview
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Frames
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: rune.lillesveen at gmail.com

In the case below the rAF on the parent document should be handled before the iframe re-layout is done, which means the resize event handler should be run after the parent document rAF handler. Safari outputs the "resize" before the "rAF":

<!doctype html>
<iframe id="frm" width="100"></iframe>
  setTimeout(() => {
    frm.contentWindow.addEventListener('resize', () => console.log("resize"));
    requestAnimationFrame(() => console.log("rAF"));
    frm.style.width = '200px';
  }, 1000);

Found this while looking at failures in Chrome for: http://wpt.live/css/mediaqueries/media-query-matches-in-iframe.html

Some of the expectations there seem wrong.

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230104/eae54248/attachment.htm>

More information about the webkit-unassigned mailing list