Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 0b53fc9713a27a7af61a06931ff125a4abe86af9
https://github.com/WebKit/WebKit/commit/0b53fc9713a27a7af61a06931ff125a4abe86af9
Author: Phinehas Fuachie <[email protected]>
Date: 2026-07-30 (Thu, 30 Jul 2026)
Changed paths:
A
LayoutTests/http/tests/site-isolation/iframe-reinsert-same-src-commits-expected.txt
A
LayoutTests/http/tests/site-isolation/iframe-reinsert-same-src-commits.html
A
LayoutTests/http/tests/site-isolation/resources/frame-reports-commit-to-top.html
M Source/WebKit/UIProcess/ProvisionalFrameProxy.cpp
M Source/WebKit/UIProcess/ProvisionalFrameProxy.h
M Source/WebKit/UIProcess/WebFrameProxy.cpp
M Source/WebKit/UIProcess/WebPageProxy.cpp
Log Message:
-----------
[Site Isolation] Cross-origin iframe stuck at about:blank after removal and
re-insertion
https://bugs.webkit.org/show_bug.cgi?id=320204
rdar://164521127
Reviewed by Alex Christensen.
Under Site Isolation, removing a cross-origin <iframe> and re-inserting it with
its src still set
can issue two navigations on the same frame in quick succession. The second
navigation supersedes
the first, replacing the frame's provisional frame; the first navigation then
reports a
cancellation (NSURLErrorCancelled).
didFailProvisionalLoadForFrameShared unconditionally tore down the frame's
current provisional
frame on that cancellation, destroying the second (healthy) provisional frame
that was still
loading. As a result the navigation never committed and the frame stayed stuck
on its initial empty
document (about:blank), so cross-origin content such as a re-inserted media
embed never loaded.
Tag each ProvisionalFrameProxy with the NavigationIdentifier it was created for
and only tear down
the current provisional frame when the failing navigation is the one that owns
it. A superseded
navigation's stale cancellation is now ignored, leaving the live provisional
frame intact to
commit. This mirrors the existing supersession check in
ProvisionalPageProxy::validateInput().
Test: http/tests/site-isolation/iframe-reinsert-same-src-commits.html
*
LayoutTests/http/tests/site-isolation/iframe-reinsert-same-src-commits-expected.txt:
Added.
* LayoutTests/http/tests/site-isolation/iframe-reinsert-same-src-commits.html:
Added.
*
LayoutTests/http/tests/site-isolation/resources/frame-reports-commit-to-top.html:
Added.
* Source/WebKit/UIProcess/ProvisionalFrameProxy.cpp:
(WebKit::ProvisionalFrameProxy::ProvisionalFrameProxy):
* Source/WebKit/UIProcess/ProvisionalFrameProxy.h:
(WebKit::ProvisionalFrameProxy::navigationID const):
* Source/WebKit/UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::prepareForProvisionalLoadInProcess):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didFailProvisionalLoadForFrameShared):
Canonical link: https://commits.webkit.org/318289@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications