Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c9c92c88a384337106deae20137c89bb6568a216
https://github.com/WebKit/WebKit/commit/c9c92c88a384337106deae20137c89bb6568a216
Author: Aditya Keerthi <[email protected]>
Date: 2026-03-02 (Mon, 02 Mar 2026)
Changed paths:
M Tools/WebKitTestRunner/ios/PlatformWebViewIOS.mm
M Tools/WebKitTestRunner/ios/mainIOS.mm
Log Message:
-----------
[iOS] WebKitTestRunner should migrate to the UIKit scene-based life cycle
https://bugs.webkit.org/show_bug.cgi?id=308862
rdar://171175362
Reviewed by Richard Robinson and Abrar Rahman Protyasha.
UIKit will soon require apps to adopt the scene-based life cycle. Non-adoption
will result in a fatal assertion.
An app can opt-in to the life cycle by implementing the `UIApplicationDelegate`
method `-application:configurationForConnectingSceneSession:options:`.
Implement the delegate method and make other necessary changes to support
the scene-based life cycle.
* Tools/WebKitTestRunner/ios/PlatformWebViewIOS.mm:
(-[WebKitTestRunnerWindow initWithFrame:]): Deleted.
(-[WebKitTestRunnerWindow initWithWindowScene:]):
Use the correct `UIWindow` initializer under the scene-based life cycle.
(WTR::windowScene):
Obtain a window scene from the connected scenes.
At most one window scene is expected, since WebKitTestRunner does not support
multiple scenes, and is not expected to run in any configurations where the
system would create additional scenes.
(WTR::PlatformWebView::PlatformWebView):
* Tools/WebKitTestRunner/ios/mainIOS.mm:
(-[WebKitTestRunnerSceneDelegate scene:willConnectToSession:options:]):
Run the tests once a scene is connected. `applicationDidFinishLaunching:` is not
called before scenes are connected, and is no longer a suitable entry point to
start running tests.
(-[WebKitTestRunnerSceneDelegate sceneDidEnterBackground:]):
`applicationDidEnterBackground:` is not called under the scene-based life cycle.
WebKitTestRunner's window scene is never expected to be backgrounded. Migrate
the
assertion.
(-[WebKitTestRunnerApp
application:configurationForConnectingSceneSession:options:]):
(-[WebKitTestRunnerApp _runTestController]): Deleted.
(-[WebKitTestRunnerApp applicationDidFinishLaunching:]): Deleted.
(-[WebKitTestRunnerApp applicationDidEnterBackground:]): Deleted.
Canonical link: https://commits.webkit.org/308475@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications