Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d521cb41c396151b0331a98b8e559ce715fad9f6
      
https://github.com/WebKit/WebKit/commit/d521cb41c396151b0331a98b8e559ce715fad9f6
  Author: Charlie Wolfe <[email protected]>
  Date:   2024-12-24 (Tue, 24 Dec 2024)

  Changed paths:
    M Source/WebKit/Shared/WebBackForwardListFrameItem.cpp
    M Source/WebKit/Shared/WebBackForwardListFrameItem.h
    M Source/WebKit/Shared/WebBackForwardListItem.cpp
    M Source/WebKit/Shared/WebBackForwardListItem.h
    M Source/WebKit/UIProcess/WebBackForwardList.cpp
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/SiteIsolation.mm

  Log Message:
  -----------
  [Site Isolation] Discard uncached back items for navigated over isolated 
iframes
https://bugs.webkit.org/show_bug.cgi?id=285096
rdar://141934328

Reviewed by Pascoe.

When storing session history for an uncached site isolated iframe, any 
navigation of an ancestor frame
invalidates the history state for all of its descendants. This is because 
navigating back will require
the ancestor to reload its children, and the previously stored state will have 
changed.

To fix this, when a new back/forward item is added, all prior items with an 
ancestor that navigated
should be discarded. I also needed to add logic to associate the state from the 
current back/forward item
to be set as the parent of the state committed by the site-isolated web process.

No change in behavior with site isolation disabled.

* Source/WebKit/Shared/WebBackForwardListFrameItem.cpp:
(WebKit::WebBackForwardListFrameItem::hasAncestorFrame):
* Source/WebKit/Shared/WebBackForwardListFrameItem.h:
(WebKit::WebBackForwardListFrameItem::setParent):
* Source/WebKit/Shared/WebBackForwardListItem.cpp:
(WebKit::WebBackForwardListItem::setParentFromItem):
* Source/WebKit/Shared/WebBackForwardListItem.h:
* Source/WebKit/UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::addItem):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::backForwardAddItemShared):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/SiteIsolation.mm:
(TestWebKitAPI::TEST(SiteIsolation, 
DiscardUncachedBackItemForNavigatedOverIframe)):

Canonical link: https://commits.webkit.org/288281@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

Reply via email to