[webkit-changes] [WebKit/WebKit] 36fbb6: [Site Isolation] Going back while creating remote ...
Charlie Wolfe
noreply at github.com
Mon Feb 24 12:19:46 PST 2025
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 36fbb6b8eee7cb8caf806b06f6716913d4311b34
https://github.com/WebKit/WebKit/commit/36fbb6b8eee7cb8caf806b06f6716913d4311b34
Author: Charlie Wolfe <charliew at apple.com>
Date: 2025-02-24 (Mon, 24 Feb 2025)
Changed paths:
A LayoutTests/http/tests/site-isolation/history/add-iframes-and-go-back-expected.txt
A LayoutTests/http/tests/site-isolation/history/add-iframes-and-go-back.html
A LayoutTests/http/tests/site-isolation/history/resources/add-recursive-iframes-then-go-back.html
A LayoutTests/http/tests/site-isolation/resources/recursive-create-remote-iframe.html
M Source/WebKit/UIProcess/WebBackForwardList.cpp
M Source/WebKit/UIProcess/WebBackForwardList.h
M Source/WebKit/UIProcess/WebFrameProxy.cpp
M Source/WebKit/UIProcess/WebFrameProxy.h
M Source/WebKit/UIProcess/WebPageProxy.cpp
Log Message:
-----------
[Site Isolation] Going back while creating remote iframes may create incorrect history state
https://bugs.webkit.org/show_bug.cgi?id=288319
rdar://142485711
Reviewed by Alex Christensen.
When an iframe is embedded into a new process, we set state from the current back/forward item onto its
WebFrameProxy to indicate that we expect the iframe to soon load its initial history state. This approach
fails if, at the time of embedding, the current back/forward item has not yet been updated to reference
the page that is embedding the iframe. Instead, we should just set a bool on the WebFrameProxy to
indicate that its initial history state is not yet created, and then search and update the current
back/forward item to include the child frame's state when the history item is committed.
* LayoutTests/http/tests/site-isolation/history/add-iframes-and-go-back-expected.txt: Added.
* LayoutTests/http/tests/site-isolation/history/add-iframes-and-go-back.html: Added.
* LayoutTests/http/tests/site-isolation/history/resources/add-recursive-iframes-then-go-back.html: Added.
* LayoutTests/http/tests/site-isolation/resources/recursive-create-remote-iframe.html: Added.
* Source/WebKit/UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::addChildItem):
* Source/WebKit/UIProcess/WebBackForwardList.h:
* Source/WebKit/UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::setPendingChildBackForwardItem): Deleted.
(WebKit::WebFrameProxy::takePendingChildBackForwardItem): Deleted.
* Source/WebKit/UIProcess/WebFrameProxy.h:
(WebKit::WebFrameProxy::setIsPendingInitialHistoryItem):
(WebKit::WebFrameProxy::isPendingInitialHistoryItem const):
(WebKit::WebFrameProxy::hasPendingChildBackForwardItem const): Deleted.
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::continueNavigationInNewProcess):
(WebKit::WebPageProxy::backForwardAddItemShared):
Canonical link: https://commits.webkit.org/290964@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list