[webkit-changes] [WebKit/WebKit] 6f450c: REGRESSION (276177 at main): Fullscreen API tests cra...

aestes noreply at github.com
Tue Mar 19 10:53:34 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6f450cea7dc661b1cc94e487fd99e5703b7c83c5
      https://github.com/WebKit/WebKit/commit/6f450cea7dc661b1cc94e487fd99e5703b7c83c5
  Author: Andy Estes <aestes at apple.com>
  Date:   2024-03-19 (Tue, 19 Mar 2024)

  Changed paths:
    M Source/WebKit/UIProcess/Cocoa/ModelElementControllerCocoa.mm
    M Source/WebKit/UIProcess/Cocoa/SOAuthorization/SOAuthorizationSession.mm
    M Source/WebKit/UIProcess/Cocoa/SystemPreviewControllerCocoa.mm
    M Source/WebKit/UIProcess/Cocoa/VideoPresentationManagerProxy.mm
    M Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm
    M Source/WebKit/UIProcess/PageClient.h
    M Source/WebKit/UIProcess/XR/ios/PlatformXRARKit.mm
    M Source/WebKit/UIProcess/ios/PageClientImplIOS.h
    M Source/WebKit/UIProcess/ios/PageClientImplIOS.mm
    M Source/WebKit/UIProcess/ios/WKUSDPreviewView.mm
    M Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm
    M Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.h
    M Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm

  Log Message:
  -----------
  REGRESSION (276177 at main): Fullscreen API tests crash with a UIViewControllerHierarchyInconsistency exception
https://bugs.webkit.org/show_bug.cgi?id=271193
rdar://124974019

Reviewed by Eric Carlson.

276177 at main changed how VideoPresentationInterface embeds its player view in the parent view to
ensure that -addChildViewController: and -didMoveToParentViewController: are called on the parent
view's view controller. This exposed a bug in VideoPresentationInterfaceIOS::presentingViewController()
where the API client's presenting view controller would be returned even if the WKWebView was moved
to a WKFullScreenViewController, resulting in a UIViewControllerHierarchyInconsistency exception
being thrown.

Resolved this by ensuring VideoPresentationInterfaceIOS::presentingViewController() returns the
WKFullScreenViewController when in element fullscreen. This is done by introducing
PageClient::presentingViewController() which returns the WKFullScreenViewController if in element
fullscreen, otherwise returning UIClient::presentingViewController(). Added FIXME comments to other
call sites of UIClient::presentingViewController() mentioning that this call may be incorrect when
in element fullscreen.

* Source/WebKit/UIProcess/Cocoa/ModelElementControllerCocoa.mm:
(WebKit::ModelElementController::takeModelElementFullscreen):
* Source/WebKit/UIProcess/Cocoa/SOAuthorization/SOAuthorizationSession.mm:
(WebKit::SOAuthorizationSession::presentViewController):
* Source/WebKit/UIProcess/Cocoa/SystemPreviewControllerCocoa.mm:
* Source/WebKit/UIProcess/Cocoa/VideoPresentationManagerProxy.mm:
(WebKit::VideoPresentationModelContext::presentingViewController):
* Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::startApplePayAMSUISession):
* Source/WebKit/UIProcess/PageClient.h:
* Source/WebKit/UIProcess/XR/ios/PlatformXRARKit.mm:
(WebKit::ARKitCoordinator::startSession):
* Source/WebKit/UIProcess/ios/PageClientImplIOS.h:
* Source/WebKit/UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::presentingViewController const):
* Source/WebKit/UIProcess/ios/WKUSDPreviewView.mm:
(-[WKUSDPreviewView thumbnailView:wantsToPresentPreviewController:forItem:]):
* Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::showValidationMessage):
(WebKit::WebPageProxy::Internals::paymentCoordinatorPresentingViewController):
* Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.h:
* Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
(-[WKFullScreenWindowController fullScreenViewController]):

Canonical link: https://commits.webkit.org/276356@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list