Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 0a26e2324b05b49545cbd3e3a45e47934530d48f
https://github.com/WebKit/WebKit/commit/0a26e2324b05b49545cbd3e3a45e47934530d48f
Author: Chris Dumez <[email protected]>
Date: 2025-11-03 (Mon, 03 Nov 2025)
Changed paths:
A
LayoutTests/http/tests/navigation-api/policy-decision-deny-prevents-navigate-event-expected.txt
A
LayoutTests/http/tests/navigation-api/policy-decision-deny-prevents-navigate-event.html
M
LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigate-event/navigate-anchor-cross-origin.html
M Source/WebCore/loader/DocumentLoader.h
M Source/WebCore/loader/FrameLoadRequest.cpp
M Source/WebCore/loader/FrameLoadRequest.h
M Source/WebCore/loader/FrameLoader.cpp
M Source/WebCore/loader/FrameLoader.h
M Source/WebCore/loader/NavigationAction.h
Log Message:
-----------
REGRESSION(299927@main): Command-clicking Reddit link no longer opens new tab
https://bugs.webkit.org/show_bug.cgi?id=301832
rdar://162982187
Reviewed by Rupin Mittal.
Make sure we delay firing the navigate event after the client has allowed
the navigation to occur via the navigation policy decision. Previously,
we'd fire the JS event first, allow the page to process the navigation
before the client app is even made aware of the navigation.
Test:
http/tests/navigation-api/policy-decision-deny-prevents-navigate-event.html
*
LayoutTests/http/tests/navigation-api/policy-decision-deny-prevents-navigate-event-expected.txt:
Added.
*
LayoutTests/http/tests/navigation-api/policy-decision-deny-prevents-navigate-event.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigate-event/navigate-anchor-cross-origin.html:
Fix existing WPT test to run properly with the WebKit infrastructure. The test
was trying to load
"https://does-not-exist" which is a not local and thus gets rejected by our
WebKitTestRunner (tests cannnot
try to load anything from the internet). This was previously not observed
because the load rejection by
WebKitTestRunner happens in the navigation policy decision and the policy
decision would prevously not prevent
the navigate event from firing.
* Source/WebCore/loader/DocumentLoader.h:
(WebCore::DocumentLoader::triggeringAction):
* Source/WebCore/loader/FrameLoadRequest.cpp:
* Source/WebCore/loader/FrameLoadRequest.h:
* Source/WebCore/loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadURL):
(WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
* Source/WebCore/loader/FrameLoader.h:
* Source/WebCore/loader/NavigationAction.h:
(WebCore::NavigationAction::setPendingDispatchNavigateEvent):
(WebCore::NavigationAction::std::function<bool):
Canonical link: https://commits.webkit.org/302468@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications