Bug 316345

Summary: [Site Isolation] Form state in nested frames is lost when restoring from back/forward cache with UseUIProcessForBackForwardItemLoading
Product: WebKit Reporter: Basuke Suzuki <basuke>
Component: WebKit Misc.Assignee: Basuke Suzuki <basuke>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Basuke Suzuki
Reported 2026-06-04 15:08:29 PDT
When UseUIProcessForBackForwardItemLoading is enabled under Site Isolation (as it is in production via WebProcessPool::createWebPage), restoring a page that contains nested frames from the back/forward cache leaves the nested frames inaccessible: their contentDocument is null, so form state stored in nested frames is lost. Reproduced by fast/loader/site-isolation/form-state-restore-with-frames.html once UseUIProcessForBackForwardItemLoading is coupled to Site Isolation in WebKitTestRunner. The test deterministically fails (5/5) with: FAIL frame$($("frame1"), "input2").value should be value2. Threw exception TypeError: null is not an object FAIL frame$(frame$($("frame1"), "frame2"), "input3").value should be value3. Threw exception TypeError: null is not an object (evaluating 'frame.contentDocument') This was previously masked because the layout-test harness did not actually enable UseUIProcessForBackForwardItemLoading under Site Isolation: WebKitTestRunner's per-test preference reset clobbered the product's auto-enable (see bug 316344). Coupling the flag in the harness surfaces the underlying restoration defect. EWS on the draft may reveal additional tests affected by the same root cause.
Attachments
Basuke Suzuki
Comment 1 2026-06-04 15:11:47 PDT
Basuke Suzuki
Comment 2 2026-06-04 15:12:06 PDT
EWS
Comment 3 2026-06-05 10:35:21 PDT
Committed 314648@main (1cff9b97d680): <https://commits.webkit.org/314648@main> Reviewed commits have been landed. Closing PR #66494 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.