Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: db96b72c4ad369670bdc82166e0d9517fca2aa16
      
https://github.com/WebKit/WebKit/commit/db96b72c4ad369670bdc82166e0d9517fca2aa16
  Author: Aditya Keerthi <[email protected]>
  Date:   2024-02-08 (Thu, 08 Feb 2024)

  Changed paths:
    M Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm

  Log Message:
  -----------
  [visionOS] Safari can become unresponsive to pinches/gestures after exiting 
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


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to