Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 52379892b081a3a346c979641831dedddcf224c7
      
https://github.com/WebKit/WebKit/commit/52379892b081a3a346c979641831dedddcf224c7
  Author: Phinehas Fuachie <pfuach...@apple.com>
  Date:   2025-08-14 (Thu, 14 Aug 2025)

  Changed paths:
    M Source/WebCore/platform/cocoa/PlaybackSessionModel.h
    M Source/WebKit/Platform/ios/VideoPresentationInterfaceLMK.mm
    M Source/WebKit/UIProcess/Cocoa/PlaybackSessionManagerProxy.h
    M Source/WebKit/UIProcess/Cocoa/PlaybackSessionManagerProxy.mm
    M Source/WebKit/UIProcess/Cocoa/VideoPresentationManagerProxy.mm
    M Source/WebKit/UIProcess/PageClient.h
    M Source/WebKit/UIProcess/WebFullScreenManagerProxy.h
    M Source/WebKit/UIProcess/ios/PageClientImplIOS.h
    M Source/WebKit/UIProcess/ios/PageClientImplIOS.mm
    M Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.h
    M Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm
    M Source/WebKit/WebKitSwift/LinearMediaKit/LinearMediaTypes.swift
    M Source/WebKit/WebKitSwift/LinearMediaKit/WKSLinearMediaTypes.h

  Log Message:
  -----------
  Fixed Auto-dimming effect in portal window of APMP playback from WebView's 
Div Element Fullscreen
https://bugs.webkit.org/show_bug.cgi?id=296495
rdar://154223902

Reviewed by Andy Estes and Jean-Yves Avenard.

This patch creates a single place to store a user preference: whether videos 
should automatically
dim the background when played in fullscreen. PlaybackSessionModel carries a 
boolean
m_prefersAutoDimming, with accessors that notify its clients when the value 
changes.
PlaybackSessionModelContext forwards the change to 
VideoPresentationManagerProxy, allowing every
concurrent playback context to observe the current setting. 
PlaybackSessionManagerProxy persists
the value to user defaults and relays it to the Web-process fullscreen manager 
so the system knows
which darkness level to apply. VideoPresentationInterfaceLMK applies the flag 
to the underlying
AVPlayerViewController, caches the previous stage darkness on entry and 
restores it on exit.
WKFullScreenWindowControllerIOS consults the proxy when entering fullscreen, 
reflects user changes
made regarding autoDimming back into the proxy.

* Source/WebCore/platform/cocoa/PlaybackSessionModel.h:
(WebCore::PlaybackSessionModel::prefersAutoDimming const):
(WebCore::PlaybackSessionModel::setPrefersAutoDimming):
* Source/WebKit/Platform/ios/VideoPresentationInterfaceLMK.mm:
(WebKit::VideoPresentationInterfaceLMK::presentFullscreen):
(WebKit::VideoPresentationInterfaceLMK::dismissFullscreen):
(WebKit::VideoPresentationInterfaceLMK::ensurePlayableViewController):
* Source/WebKit/UIProcess/Cocoa/PlaybackSessionManagerProxy.h:
* Source/WebKit/UIProcess/Cocoa/PlaybackSessionManagerProxy.mm:
(WebKit::PlaybackSessionModelContext::PlaybackSessionModelContext):
(WebKit::PlaybackSessionModelContext::setPrefersAutoDimming):
(WebKit::PlaybackSessionManagerProxy::prefersAutoDimming const):
(WebKit::PlaybackSessionManagerProxy::setPrefersAutoDimming):
* Source/WebKit/UIProcess/Cocoa/VideoPresentationManagerProxy.mm:
(WebKit::VideoPresentationManagerProxy::didExitFullscreen):
(WebKit::VideoPresentationManagerProxy::didEnterFullscreen):
* Source/WebKit/UIProcess/PageClient.h:
* Source/WebKit/UIProcess/WebFullScreenManagerProxy.h:
(WebKit::WebFullScreenManagerProxy::client):
* Source/WebKit/UIProcess/ios/PageClientImplIOS.h:
* Source/WebKit/UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::fullScreenManagerProxyClient):
(WebKit::PageClientImpl::didEnterFullscreen):
(WebKit::PageClientImpl::didExitFullscreen):
* Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.h:
* Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
(-[WKFullScreenWindowController initWithWebView:]):
(-[WKFullScreenWindowController didEnterVideoFullscreen]):
(-[WKFullScreenWindowController didExitVideoFullscreen]):
(-[WKFullScreenWindowController prefersSceneDimming]):
(-[WKFullScreenWindowController 
_performSpatialFullScreenTransition:completionHandler:]):
(-[WKFullScreenWindowController toggleSceneDimming]):
* Source/WebKit/WebKitSwift/LinearMediaKit/LinearMediaTypes.swift:
(WKSPlayableViewControllerHost.prefersAutoDimming):
(WKSPlayableViewControllerHost.playable):
* Source/WebKit/WebKitSwift/LinearMediaKit/WKSLinearMediaTypes.h:

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to