Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 42e478a31abe6395c9b9133437f9fced3f112fff
https://github.com/WebKit/WebKit/commit/42e478a31abe6395c9b9133437f9fced3f112fff
Author: Charlie Wolfe <[email protected]>
Date: 2025-01-07 (Tue, 07 Jan 2025)
Changed paths:
M Source/WebKit/Shared/WebBackForwardListFrameItem.cpp
M Source/WebKit/Shared/WebBackForwardListFrameItem.h
M Source/WebKit/UIProcess/ProvisionalPageProxy.cpp
M Source/WebKit/UIProcess/WebBackForwardList.cpp
M Source/WebKit/UIProcess/WebPageProxy.cpp
Log Message:
-----------
[Site Isolation] Avoid reusing the main frame after cross-site navigation
https://bugs.webkit.org/show_bug.cgi?id=285469
rdar://142438253
Reviewed by Alex Christensen.
With site isolation, we were reusing the previous main frame even after
swapping processes for the page.
This will cause issues when enabling the back/forward cache because, after
swapping processes, we need to
put the previous main frame in a suspended state. I needed make several changes
to make this work with
other site isolation changes that assumed we would always reuse the main frame.
More details below.
* Source/WebKit/Shared/WebBackForwardListFrameItem.cpp:
(WebKit::WebBackForwardListFrameItem::sharesAncestor const):
(WebKit::WebBackForwardListFrameItem::hasAncestorFrame): Deleted.
* Source/WebKit/Shared/WebBackForwardListFrameItem.h:
* Source/WebKit/UIProcess/ProvisionalPageProxy.cpp:
(WebKit::ProvisionalPageProxy::ProvisionalPageProxy):
Keep reusing the main frame if it has an opener. We should probably not reuse
the main frame in this case
either, but undoing that is more difficult because the opener needs to be able
to keep a reference to the
main frame.
(WebKit::ProvisionalPageProxy::initializeWebPage):
(WebKit::ProvisionalPageProxy::didCommitLoadForFrame):
* Source/WebKit/UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::addItem):
hasAncestorFrame() assumed that frames that navigated would persist their
frameID, which is no longer the
case after this change. Change the function to check if two items share any
ancestor to keep previous
behavior.
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::commitProvisionalPage):
With site isolation the process passed to ProvisionalPageProxy may be the
current main frame process if
it’s in use by another frame.
Canonical link: https://commits.webkit.org/288547@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes