Bug 235407

Summary: Load event never firing after form is submitted
Product: WebKit Reporter: Sam Sneddon [:gsnedders] <gsnedders>
Component: Page LoadingAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, ap, beidson, cdumez, darin, ews-watchlist, ggaren, japhet, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
URL: http://wpt.live/html/semantics/forms/form-submission-target/rel-base-target.html
Attachments:
Description Flags
WIP patch
none
Patch
none
Patch ews-feeder: commit-queue-

Description Sam Sneddon [:gsnedders] 2022-01-20 08:48:17 PST
On the above test (note: this requires pop-ups to be allowed), the test is constantly resulting in a harness TIMEOUT.

The underlying cause of this seems to be us never actually firing the load event for the test document.
Comment 1 Radar WebKit Bug Importer 2022-01-20 08:48:29 PST
<rdar://problem/87831049>
Comment 2 Sam Sneddon [:gsnedders] 2022-01-21 04:00:31 PST
Reduces down to:

<div id=log></div>
<form action=about:blank target=_blank><input type=hidden name=input></form>
<script>
  const t1 = performance.now();
  const submitter = document.querySelector("form");
  submitter.submit();

  window.onload = () => {
    document.querySelector("#log").textContent = `loaded after ${performance.now() - t1}ms`;
    
  }
</script>
Comment 3 Alexey Proskuryakov 2022-01-23 17:52:06 PST
I looked through our other form submission bugs, but this one seems new.
Comment 4 Chris Dumez 2022-03-04 09:10:52 PST
I am investigating.
Comment 5 Chris Dumez 2022-03-04 09:33:16 PST
Created attachment 453849 [details]
WIP patch
Comment 6 Chris Dumez 2022-03-04 09:50:59 PST
Created attachment 453851 [details]
Patch
Comment 7 Chris Dumez 2022-03-04 10:45:19 PST
Created attachment 453857 [details]
Patch
Comment 8 Geoffrey Garen 2022-03-04 12:25:40 PST
Comment on attachment 453857 [details]
Patch

r=me
Comment 9 EWS 2022-03-04 12:36:21 PST
Committed r290841 (248077@main): <https://commits.webkit.org/248077@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 453857 [details].