Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f5da6586859790d1caf0f1b253578dafadb5968f
      
https://github.com/WebKit/WebKit/commit/f5da6586859790d1caf0f1b253578dafadb5968f
  Author: Jean Haberer <[email protected]>
  Date:   2025-12-11 (Thu, 11 Dec 2025)

  Changed paths:
    M 
LayoutTests/model-element/immersive/model-element-immersive-basic-expected.txt
    M LayoutTests/model-element/immersive/model-element-immersive-basic.html
    M Source/WebCore/dom/DocumentImmersive.cpp
    M Source/WebCore/dom/DocumentImmersive.h
    M Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
    M Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/UIProcess/WebPageProxy.h
    M Source/WebKit/WebProcess/WebPage/WebPage.cpp
    M Source/WebKit/WebProcess/WebPage/WebPage.h
    M Source/WebKit/WebProcess/WebPage/WebPage.messages.in
    M Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl
    M Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
    M Tools/WebKitTestRunner/InjectedBundle/TestRunner.h
    M Tools/WebKitTestRunner/TestController.h
    M Tools/WebKitTestRunner/TestInvocation.cpp
    M Tools/WebKitTestRunner/ios/TestControllerIOS.mm

  Log Message:
  -----------
  The client app should be able to exit the immersive element
https://bugs.webkit.org/show_bug.cgi?id=303819
rdar://166127172

Reviewed by Etienne Segonzac.

Add a method on WKWebView to trigger an exit on the current immersive element.

* 
LayoutTests/model-element/immersive/model-element-immersive-basic-expected.txt:
* LayoutTests/model-element/immersive/model-element-immersive-basic.html:
Test that the method works as expected.

* Source/WebCore/dom/DocumentImmersive.cpp:
(WebCore::DocumentImmersive::exitImmersive):
* Source/WebCore/dom/DocumentImmersive.h:
Add an exitImmersive() method without callback that logs eventual errors.

* Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _immersiveEnvironmentDelegate]):
(-[WKWebView _setImmersiveEnvironmentDelegate:]):
(-[WKWebView _exitImmersive]):
Move the private methods inside the private implementation of WKWebView.
Add the _exitImmersive private method.
This will be moved to an API with rdar://problem/164244457.

* Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::exitImmersive):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::exitImmersive const):
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/WebProcess/WebPage/WebPage.messages.in:
Plumb the signal down to the immersive document.

* Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::exitImmersive):
* Tools/WebKitTestRunner/InjectedBundle/TestRunner.h:
* Tools/WebKitTestRunner/TestController.h:
* Tools/WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
* Tools/WebKitTestRunner/ios/TestControllerIOS.mm:
(WTR::TestController::exitImmersive):
Plumb a signal into the test runner to test the _exitImmersive method.

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



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

Reply via email to