Skip to content

Commit

Permalink
Fullscreen UIScene adjustments are not reverted if the Web Content pr…
Browse files Browse the repository at this point in the history
…ocess crashes while in fullscreen

https://bugs.webkit.org/show_bug.cgi?id=253216
rdar://106107254

Reviewed by Aditya Keerthi.

* Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
(-[WKFullScreenWindowController _exitFullscreenImmediately]):
Perform the fullscreen transition without animation if exiting fullscreen "immediately",
which happens in cases such as Web Content process crash or WKWebView unparenting.
This ensures that all of the scene/window cleanup work happens even if we don't go through
the usual animated dismissal path.

Canonical link: https://commits.webkit.org/261051@main
  • Loading branch information
hortont424 committed Mar 2, 2023
1 parent 8cfac26 commit 76239d6
Showing 1 changed file with 7 additions and 0 deletions.
Expand Up @@ -1082,6 +1082,13 @@ - (void)_exitFullscreenImmediately
if (page)
page->setSuppressVisibilityUpdates(true);

#if ENABLE(FULLSCREEN_WINDOW_EFFECTS)
[UIView performWithoutAnimation:^{
CompletionHandler<void()> completionHandler = []() { };
performFullscreenTransition(_lastKnownParentWindow.get(), _window.get(), _parentWindowState.get(), false, WTFMove(completionHandler));
}];
#endif

[self _reinsertWebViewUnderPlaceholder];

if (auto* manager = self._manager) {
Expand Down

0 comments on commit 76239d6

Please sign in to comment.