Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 3d354010882cd25a00e72caadf532f31f0d1d341
https://github.com/WebKit/WebKit/commit/3d354010882cd25a00e72caadf532f31f0d1d341
Author: Charlie Wolfe <[email protected]>
Date: 2024-06-07 (Fri, 07 Jun 2024)
Changed paths:
M Source/WebKit/Shared/WebBackForwardListItem.cpp
M Source/WebKit/Shared/WebBackForwardListItem.h
M Source/WebKit/UIProcess/WebBackForwardList.cpp
M Source/WebKit/UIProcess/WebBackForwardList.h
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Source/WebKit/UIProcess/WebPageProxy.h
M Tools/TestWebKitAPI/Tests/WebKitCocoa/SiteIsolation.mm
Log Message:
-----------
[Site Isolation] Do not create separate back forward items for embedded root
child frames
https://bugs.webkit.org/show_bug.cgi?id=275250
rdar://129391516
Reviewed by Alex Christensen.
Before this change, we would add a separate item to the back forward list each
time an out-of-process
iframe was embedded. Then, we would try to skip over these items when moving
the main frame or its local
children back or forward. This did not work in certain cases, like when
navigating nested iframes or when
navigating back to a page that contained iframes. This patch changes this so
that instead, when a root
child frame is embedded, we attach the created back forward items to the item
that corresponds to the
page it was embedded in. Then, when moving back, we reference the frame that
was most recently navigated
to associate it with an out-of-process iframe that may have existed on a
previous back forward item.
* Source/WebKit/Shared/WebBackForwardListItem.cpp:
(WebKit::WebBackForwardListItem::childItemForFrameID const):
(WebKit::WebBackForwardListItem::childItemForProcessID const):
* Source/WebKit/Shared/WebBackForwardListItem.h:
(WebKit::WebBackForwardListItem::addRootChildFrameItem):
(WebKit::WebBackForwardListItem::setMainFrameItem):
(WebKit::WebBackForwardListItem::mainFrameItem):
(WebKit::WebBackForwardListItem::setIsRootChildFrameItem): Deleted.
(WebKit::WebBackForwardListItem::isRootChildFrameItem const): Deleted.
(): Deleted.
* Source/WebKit/UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::addRootChildFrameItem const):
(WebKit::WebBackForwardList::goToItem):
When a web process sends a message indicating it has navigated to a root child
frame item, we need to
update the back forward list with it’s main frame item, since the root child
frame does not exist in
the back forward list.
(WebKit::itemSkippingBackForwardItemsAddedByJSWithoutUserGesture):
* Source/WebKit/UIProcess/WebBackForwardList.h:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::goBack):
(WebKit::WebPageProxy::didChangeBackForwardList):
(WebKit::WebPageProxy::backForwardAddItemShared):
(WebKit::WebPageProxy::backForwardItemAtIndex):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/SiteIsolation.mm:
(TestWebKitAPI::TEST(SiteIsolation, GoBackToPageWithIframe)):
(TestWebKitAPI::TEST(SiteIsolation, NavigateNestedIframeSameOriginBackForward)):
Canonical link: https://commits.webkit.org/279823@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