Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 8cc28c5ae7b621767476ed8038cc06d991477845
https://github.com/WebKit/WebKit/commit/8cc28c5ae7b621767476ed8038cc06d991477845
Author: Phinehas Fuachie <[email protected]>
Date: 2026-02-18 (Wed, 18 Feb 2026)
Changed paths:
M Source/WebKit/UIProcess/Cocoa/VideoPresentationManagerProxy.mm
M Source/WebKit/WebProcess/cocoa/VideoPresentationManager.mm
Log Message:
-----------
Exiting PiP to full screen to inline causes the video to disappear on iOS
https://bugs.webkit.org/show_bug.cgi?id=308120
rdar://162446382
Reviewed by Jer Noble.
When playing a fullscreen video and using swipe-up to enter Picture-in-Picture,
returning to inline
and exiting fullscreen causes the video to disappear while audio continues
playing.
The root cause is a missing addClientForContext call in both the WebContent and
UI processes when
entering PiP via swipe. Unlike tap-to-PiP, the swipe gesture triggers a faster
transition where the
fullscreen mode has already been updated by the time the existing
addClientForContext checks are
evaluated, causing them to fail. This results in an asymmetric refcount that
leads to premature
release of the video layer context.
In the WebContent process, added the addClientForContext call to
fullscreenModeChanged, which is
called at the right time for the swipe path.
In the UI process, the analogous method videosInElementFullscreenChanged is
called for both
entering and exiting fullscreen, so we cannot simply move the call there
without adding extra
refcount on exit. Instead, added a check for
isPlayingVideoInEnhancedFullscreen() in
setupFullscreenWithID to catch the swipe-to-PiP case where the mode has already
transitioned.
* Source/WebKit/UIProcess/Cocoa/VideoPresentationManagerProxy.mm:
(WebKit::VideoPresentationManagerProxy::setupFullscreenWithID):
* Source/WebKit/WebProcess/cocoa/VideoPresentationManager.mm:
(WebKit::VideoPresentationManager::fullscreenModeChanged):
Canonical link: https://commits.webkit.org/307804@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications