Bug 317229
| Summary: | [NavigationScheduler] history.back/forward/go(n) coalescing across processes via UIProcess session history traversal queue | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Basuke Suzuki <basuke> |
| Component: | WebCore 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
Follow-up to https://bugs.webkit.org/show_bug.cgi?id=317077.
Per HTML spec, history.back/forward/go(n) appends a task to the
top-level traversable's session history traversal queue. The previous
fix (bug 317077) implemented per-WebProcess coalescing by forwarding
to the top frame's NavigationScheduler when reachable in this
WebProcess. Under Site Isolation, when the top frame is a RemoteFrame
(a cross-site iframe initiates the traversal), the queue must live
above any single WebProcess.
Symptom:
- iframe (process A) history.back(); and main frame (process B)
history.forward(); queued synchronously do not coalesce; both
navigations execute and the user sees an extra load event the spec
says should not occur.
Proposal:
Introduce SessionHistoryTraversalQueue, owned by WebPageProxy
(top-level traversable proxy). WebProcess NavigationScheduler routes
to it via a new IPC when the top frame is a RemoteFrame. The queue
accumulates pending delta and flushes on a 0-delay timer, calling
goToBackForwardItemAtIndex with the net delta (no-op when delta == 0,
matching "going nowhere"). Class naming leaves room for a future
spec-faithful "sequential apply + synchronous queue jumping"
implementation as a separate epic.
Out of scope for this bug: spec-correct top-level reload semantics
for history.go(0) (currently per-frame reload — see related followup).
Test plan:
- API tests covering cross-process iframe <-> main frame coalescing
under Site Isolation enabled.
- WPT suites under
imported/w3c/web-platform-tests/html/browsers/browsing-the-web/overlapping-navigations-and-traversals/
with SI configuration.
Local prototype on branch eng/basuke/cross-process-traversal-queue
already passes a SiteIsolation.CrossProcessHistoryTraversalCoalesce
API test; bug 317077 API/WPT do not regress.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Basuke Suzuki
<rdar://problem/179574582>
Basuke Suzuki
Pull request: https://github.com/WebKit/WebKit/pull/67386
Basuke Suzuki
<rdar://problem/179641336>
Basuke Suzuki
Pull request: https://github.com/WebKit/WebKit/pull/67459
Basuke Suzuki
<rdar://problem/179857636>
Basuke Suzuki
Pull request: https://github.com/WebKit/WebKit/pull/67993
EWS
Committed 316426@main (7a422d312c3c): <https://commits.webkit.org/316426@main>
Reviewed commits have been landed. Closing PR #67993 and removing active labels.