Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1bf55d0035b52a07ec9f3befc690ee56e77efa6f
      
https://github.com/WebKit/WebKit/commit/1bf55d0035b52a07ec9f3befc690ee56e77efa6f
  Author: Phinehas Fuachie <[email protected]>
  Date:   2026-09-23 (Wed, 23 Sep 2026)

  Changed paths:
    M Source/WebKit/UIProcess/Cocoa/VideoPresentationManagerProxy.h
    M Source/WebKit/UIProcess/Cocoa/VideoPresentationManagerProxy.mm

  Log Message:
  -----------
  Video disappears returning from Picture-in-Picture to element fullscreen then 
inline on iOS
https://bugs.webkit.org/show_bug.cgi?id=324992
rdar://181656299

Reviewed by Jer Noble.

setupFullscreenWithID takes one client reference for an entire fullscreen/PiP 
session, guarded so it
is not taken again while the interface is already presenting. 
didCleanupFullscreen releases one each
time it runs and it runs once per presentation mode being torn down. Entering 
element fullscreen
puts the video into PiP standby, so returning from PiP and then exiting 
fullscreen produces two
cleanups against that one reference.

The second release drops the count below the reference the inline video holds 
for its hosted layer.
The count reaches zero, invalidateInterface tears down the layerHostView and 
playerLayer that
didCleanupFullscreen had just handed the video layer back to and the video is 
gone while audio
continues.

Track whether the session's reference is currently held so that taking it and 
releasing it stay
symmetric.

* Source/WebKit/UIProcess/Cocoa/VideoPresentationManagerProxy.h:
* Source/WebKit/UIProcess/Cocoa/VideoPresentationManagerProxy.mm:
(WebKit::VideoPresentationManagerProxy::invalidate):
(WebKit::VideoPresentationManagerProxy::removeClientForContext):
(WebKit::VideoPresentationManagerProxy::setupFullscreenWithID):
(WebKit::VideoPresentationManagerProxy::didCleanupFullscreen):

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



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

Reply via email to