[webkit-changes] [WebKit/WebKit] e9dd88: window.onload is repeatedly re-executed when chang...

Charlie Wolfe noreply at github.com
Sun Feb 26 17:15:10 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e9dd88dee6734e6eb661f36d609bcf7fab47b936
      https://github.com/WebKit/WebKit/commit/e9dd88dee6734e6eb661f36d609bcf7fab47b936
  Author: Charlie Wolfe <charliew at apple.com>
  Date:   2023-02-26 (Sun, 26 Feb 2023)

  Changed paths:
    A LayoutTests/http/tests/navigation/cross-origin-iframe-location-hash-reexecute-onload-expected.txt
    A LayoutTests/http/tests/navigation/cross-origin-iframe-location-hash-reexecute-onload.html
    A LayoutTests/http/tests/navigation/resources/change-location-hash-onload.html
    M Source/WebCore/loader/FrameLoader.cpp

  Log Message:
  -----------
  window.onload is repeatedly re-executed when changing URL fragment during onload
https://bugs.webkit.org/show_bug.cgi?id=252931
rdar://105158419

Reviewed by Chris Dumez.

When a cross-origin iframe changes its fragment identifier while its load event is being processed,
we end up in a state where we will continually re-fire window.onload. We should fix this by only
firing the load event on the frame's owner element. This still addresses the concern the original
change fixed (259384 at main), but without needing to always re-fire the window load event.

* LayoutTests/http/tests/navigation/cross-origin-iframe-location-hash-reexecute-onload-expected.txt: Added.
* LayoutTests/http/tests/navigation/cross-origin-iframe-location-hash-reexecute-onload.html: Added.
* LayoutTests/http/tests/navigation/resources/change-location-hash-onload.html: Added.
* Source/WebCore/loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadInSameDocument):

Canonical link: https://commits.webkit.org/260860@main




More information about the webkit-changes mailing list