Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 641034aef871f490ca5f72721a7bf5ed1e815cd4
https://github.com/WebKit/WebKit/commit/641034aef871f490ca5f72721a7bf5ed1e815cd4
Author: Aditya Keerthi <[email protected]>
Date: 2025-07-18 (Fri, 18 Jul 2025)
Changed paths:
M Source/WebKit/UIProcess/ViewGestureController.h
M Source/WebKit/UIProcess/ios/ViewGestureControllerIOS.mm
Log Message:
-----------
REGRESSION (iOS 26): Occasionally can't scroll or refresh a webpage after
navigating back
https://bugs.webkit.org/show_bug.cgi?id=296168
rdar://153082752
Reviewed by Wenson Hsieh and Abrar Rahman Protyasha.
With changes to the navigation swipe on iOS 26, it is much easier for users to
attempt to start a new navigation swipe while the current swipe is not yet
completed. In this scenario, it is possible to get UIKit logic into a state
where the completion handler is never called for cancelled swipes.
Specifically, WebKit’s `_UINavigationInteractiveTransitionBaseDelegate` (used
with a `_UIViewControllerOneToOneTransitionContext`) may gets the
`notifyWhenInteractionChangesUsingBlock` callback with context.canceled=1, but
the `_UIViewControllerOneToOneTransitionContext` completionHandler is never
called. Consequently, `ViewGestureController::endSwipeGesture` never gets called
and the swipe snapshot is left stuck on the screen, giving the appearance of
a non-interactive webpage.
While the underlying issue appears to be in UIKit, work around the issue in
WebKit, by preventing a new navigation swipe from starting if one is already
active.
* Source/WebKit/UIProcess/ViewGestureController.h:
* Source/WebKit/UIProcess/ios/ViewGestureControllerIOS.mm:
(-[WKSwipeTransitionController shouldBeginInteractiveTransition:]):
Note that `ViewGestureController::beginSwipeGesture` already bails
early if there is *any* active gesture. However, that is too late, since that
method is called downstream of `-[WKSwipeTransitionController
startInteractiveTransition:]`.
By that point the transition has already started from UIKit's perspective. As
a result, it is necessary to prevent the transition from starting at all, via
`-[WKSwipeTransitionController shouldBeginInteractiveTransition:]`.
Canonical link: https://commits.webkit.org/297603@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes