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
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Basuke Suzuki
<rdar://problem/178762633>
Basuke Suzuki
Pull request: https://github.com/WebKit/WebKit/pull/66494
EWS
Committed 314648@main (1cff9b97d680): <https://commits.webkit.org/314648@main>
Reviewed commits have been landed. Closing PR #66494 and removing active labels.