Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[visionOS] Safari can become unresponsive to pinches/gestures after e…
…xiting fullscreen https://bugs.webkit.org/show_bug.cgi?id=268970 rdar://121572842 Reviewed by Wenson Hsieh. Hit-test redirection is applied by the system whenever a view controller with a custom presentation style, such as WebKit's fullscreen view controller, is presented. Unlike on iOS, WebKit does not explicitly dismiss the view controller, since window hiding is used for the exit transition. In most cases, this is fine, since the `UIWindow` will also be deallocated on exit. However, there is no guarantee that `UIWindow` deallocation will occur, and its object lifetime cannot be relied upon for correctness. In this case, the system will still attempt to redirect hit-testing to the presented view controller. Consequently, pinches and gestures may get redirected to a hidden view controller, rather than the visible Safari window, resulting in unresponsiveness. Fix by explicitly dismissing the presented view controller on fullscreen exit. In the longer term, hit-test redirection logic should be updated by the system, to avoid hidden windows. However, as that is a riskier change, and dismissing the fullscreen view controller is good cleanup, that is the immediate solution. * Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm: (-[WKFullScreenWindowController _performSpatialFullScreenTransition:completionHandler:]): Canonical link: https://commits.webkit.org/274309@main
- Loading branch information