RESOLVED FIXED317229
[NavigationScheduler] history.back/forward/go(n) coalescing across processes via UIProcess session history traversal queue
https://bugs.webkit.org/show_bug.cgi?id=317229
Summary [NavigationScheduler] history.back/forward/go(n) coalescing across processes ...
Basuke Suzuki
Reported 2026-06-16 13:01:32 PDT
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
Basuke Suzuki
Comment 1 2026-06-17 15:41:29 PDT
Basuke Suzuki
Comment 2 2026-06-17 15:41:52 PDT
Basuke Suzuki
Comment 3 2026-06-20 07:24:23 PDT
Basuke Suzuki
Comment 4 2026-06-26 16:14:41 PDT
Basuke Suzuki
Comment 5 2026-06-26 17:39:28 PDT
Basuke Suzuki
Comment 6 2026-06-26 17:40:22 PDT
EWS
Comment 7 2026-07-02 14:41:19 PDT
Committed 316426@main (7a422d312c3c): <https://commits.webkit.org/316426@main> Reviewed commits have been landed. Closing PR #67993 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.