[webkit-changes] [WebKit/WebKit] c839c8: URL scheme handler is not used when redirecting fr...
Chris Dumez
noreply at github.com
Thu Dec 21 12:50:22 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c839c8024f7775cc5326bd8a5b10639a40620111
https://github.com/WebKit/WebKit/commit/c839c8024f7775cc5326bd8a5b10639a40620111
Author: Chris Dumez <cdumez at apple.com>
Date: 2023-12-21 (Thu, 21 Dec 2023)
Changed paths:
M Source/WebKit/UIProcess/WebProcessPool.cpp
M Tools/TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm
Log Message:
-----------
URL scheme handler is not used when redirecting from http(s) to the custom scheme
https://bugs.webkit.org/show_bug.cgi?id=266751
rdar://117891282
Reviewed by John Wilander and Alex Christensen.
We updated our process-swapping logic in a recent iOS update and it broke the flow
to add a new payment method in some cases. The flow navigates from a https:// URL
to a another scheme which the client app is supposed to handle via a URL scheme
handler. In older iOS version, we used to process-swap for such navigations and
the navigation in the new WebProcess would correctly use the URL scheme handler.
However, in newer iOS versions, we sometimes don't process-swap. This is the case
for example when the process has not committed a provisional load yet. Because
we don't process-swap, the redirect happens in the old process, the URL scheme
handler is not used and we ask the network to try and follow the redirect, which
fails.
To address the issue, I am adding a check in processForNavigationInternal() to
make sure we process-swap when redirecting to a new scheme and this scheme has a
custom handler registered.
This is covered by a new API test.
* Source/WebKit/UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::processForNavigationInternal):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:
Canonical link: https://commits.webkit.org/272427@main
More information about the webkit-changes
mailing list