Skip to content

Commit be8a633

Browse files
Use proper documentLoader for fragmentNavigation with ongoing async navigation
1 parent 4c6f6d1 commit be8a633

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1006,7 +1006,9 @@ void WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction(const Navigat
10061006
// the provisional load's DocumentLoader needs to receive navigation policy decisions. We need a better model for this state.
10071007
documentLoader = static_cast<WebDocumentLoader*>(coreFrame->loader().provisionalDocumentLoader());
10081008
}
1009-
if (!documentLoader)
1009+
// PolicyDecisionMode::Synchronous means that it is a FragmentNavigation and in that case we should use documentLoader,
1010+
// because there can be ongoing (in policy or provisional state) navigation.
1011+
if (!documentLoader || policyDecisionMode == PolicyDecisionMode::Synchronous)
10101012
documentLoader = static_cast<WebDocumentLoader*>(coreFrame->loader().documentLoader());
10111013

10121014
navigationActionData.clientRedirectSourceForHistory = documentLoader->clientRedirectSourceForHistory();

0 commit comments

Comments
 (0)