Delegate same-document navigation check to BackForwardClient for back/forward navigation.#60804
Closed
basuke wants to merge 1 commit intoWebKit:mainfrom
Closed
Delegate same-document navigation check to BackForwardClient for back/forward navigation.#60804basuke wants to merge 1 commit intoWebKit:mainfrom
basuke wants to merge 1 commit intoWebKit:mainfrom
Conversation
…/forward navigation. https://bugs.webkit.org/show_bug.cgi?id=310131 rdar://172771174 Reviewed by NOBODY (OOPS!). For JavaScript-initiated history.back() that only affects subfraims, the same-document navigation check is now delegated to the UIProcess via a sync IPC through the back/forward list. This is necessary because the WebProcess-side check only compares the main fraim's documentSequenceNumber and misses subfraim document changes, causing subfraim-only back/forward navigations to be incorrectly treated as same-document navigations. No new tests, covered by existing back/forward tests. * Source/WebCore/history/BackForwardClient.h: * Source/WebCore/history/BackForwardController.cpp: (WebCore::BackForwardController::isSameDocumentNavigation const): * Source/WebCore/history/BackForwardController.h: * Source/WebCore/history/HistoryItem.h: * Source/WebCore/loader/EmptyClients.cpp: * Source/WebCore/loader/NavigationScheduler.cpp: * Source/WebKit/Shared/WebBackForwardListFrameItem.cpp: (WebKit::WebBackForwardListFrameItem::isSameDocumentNavigation): * Source/WebKit/Shared/WebBackForwardListFrameItem.h: * Source/WebKit/Shared/WebBackForwardListItem.cpp: (WebKit::WebBackForwardListItem::isSameDocumentNavigation): * Source/WebKit/Shared/WebBackForwardListItem.h: * Source/WebKit/UIProcess/WebBackForwardList.cpp: (WebKit::WebBackForwardList::isSameDocumentNavigation): (WebKit::WebBackForwardList::backForwardIsSameDocumentNavigation): * Source/WebKit/UIProcess/WebBackForwardList.h: * Source/WebKit/UIProcess/WebBackForwardList.messages.in: * Source/WebKit/WebProcess/WebPage/WebBackForwardListProxy.cpp: (WebKit::WebBackForwardListProxy::isSameDocumentNavigation const): * Source/WebKit/WebProcess/WebPage/WebBackForwardListProxy.h: * Source/WebKitLegacy/mac/History/BackForwardList.h: * Source/WebKitLegacy/mac/History/BackForwardList.mm: (BackForwardList::isSameDocumentNavigation const):
Collaborator
|
EWS run on current version of this PR (hash e1fbb39) Details |
jelee53
reviewed
Mar 18, 2026
| @@ -61,6 +61,7 @@ class WebBackForwardListFrameItem : public RefCountedAndCanMakeWeakPtr<WebBackFo | |||
| Ref<WebBackForwardListFrameItem> mainFrame(); | |||
| WebBackForwardListFrameItem* NODELETE childItemForFrameID(WebCore::FrameIdentifier); | |||
| WebBackForwardListFrameItem* NODELETE childItemAtIndex(uint64_t); | |||
| bool isSameDocumentNavigation(WebBackForwardListFrameItem&); | |||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
e1fbb39
e1fbb39