[webkit-changes] [WebKit/WebKit] 0cbb97: FrameState and its UI process-side wrapper should ...
Charlie Wolfe
noreply at github.com
Mon Dec 23 02:07:36 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 0cbb972550c26fe86431994b5748a7c1fe5779dd
https://github.com/WebKit/WebKit/commit/0cbb972550c26fe86431994b5748a7c1fe5779dd
Author: Charlie Wolfe <charliew at apple.com>
Date: 2024-12-23 (Mon, 23 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/API/Cocoa/WKBackForwardListItem.mm
M Source/WebKit/UIProcess/ProvisionalPageProxy.cpp
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Source/WebKit/UIProcess/ios/ViewGestureControllerIOS.mm
Log Message:
-----------
FrameState and its UI process-side wrapper should not require duplicate frame trees
https://bugs.webkit.org/show_bug.cgi?id=285054
rdar://141856040
Reviewed by Alex Christensen.
WebBackForwardListFrameItem is a UI process-side wrapper for FrameState, and both maintain child objects
that are expected to match. So, when a child HistoryItem is created or destroyed in the web process,
logic is needed to update both WebBackForwardListFrameItem and FrameState. To simplify this, we should
clear FrameState::children when storing it in the UI process and only have WebBackForwardListFrameItem
manage its children. I added copyFrameStateWithChildren() to recreate a FrameState with children, which
can be sent to the web process to restore history.
This should not change behavior.
* Source/WebKit/Shared/WebBackForwardListFrameItem.cpp:
(WebKit::WebBackForwardListFrameItem::WebBackForwardListFrameItem):
(WebKit::WebBackForwardListFrameItem::setChild):
(WebKit::WebBackForwardListFrameItem::setFrameState):
(WebKit::WebBackForwardListFrameItem::copyFrameStateWithChildren):
(WebKit::WebBackForwardListFrameItem::updateChildFrameState): Deleted.
* Source/WebKit/Shared/WebBackForwardListFrameItem.h:
* Source/WebKit/Shared/WebBackForwardListItem.cpp:
(WebKit::WebBackForwardListItem::rootFrameState const):
* Source/WebKit/Shared/WebBackForwardListItem.h:
* Source/WebKit/UIProcess/API/Cocoa/WKBackForwardListItem.mm:
(-[WKBackForwardListItem _scrollPosition]):
* Source/WebKit/UIProcess/ProvisionalPageProxy.cpp:
(WebKit::ProvisionalPageProxy::goToBackForwardItem):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::goToBackForwardItem):
(WebKit::WebPageProxy::backForwardItemAtIndex):
* Source/WebKit/UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
Canonical link: https://commits.webkit.org/288245@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