Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a428fb0a4209061f8d73cffbeb955556f7a0147d
https://github.com/WebKit/WebKit/commit/a428fb0a4209061f8d73cffbeb955556f7a0147d
Author: Jer Noble <[email protected]>
Date: 2023-07-23 (Sun, 23 Jul 2023)
Changed paths:
M
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
M Source/WebCore/platform/graphics/cocoa/NullVideoFullscreenInterface.h
M Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.h
M Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm
M Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.mm
M Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm
Log Message:
-----------
[iOS] Exiting PiP by navigation then restoring page from back/forward cache
results in missing video content
https://bugs.webkit.org/show_bug.cgi?id=259377
rdar://112448871
Reviewed by Eric Carlson.
A few interrelated fixes are needed to resolve this behavior:
- Add a new method to VideoFullscreenInterfaceAVKit,
exitFullscreenWithoutAnimationToMode(),
which will tear down fullscreen and PiP without invalidating the interface
itself.
- In MediaPlayerPrivateAVFoundationObjC, reset m_haveBeenAskedToCreateLayer to
false when
destroying the video layer so that the next creation request won't bail out
early.
- A refcount mismatch occurs when moving from video fullscreen to pip, as the
WebContent
process calls setupFullscreenWithID() again in this case, but does not call
removeClientForContext(). Only add an additional refcount if the interface is
not already
in fullscreen mode.
- Remove the iOS-only direct call of removeClientForContext() from
exitVideoFullscreenToModeWithoutAnimation(). This call will now correctly
result in
the interface calling removeClientForContext() on both macOS and iOS.
*
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::destroyVideoLayer):
* Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.h:
* Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm:
(VideoFullscreenInterfaceAVKit::exitFullscreen):
(VideoFullscreenInterfaceAVKit::exitFullscreenWithoutAnimationToMode):
* Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:
(WebKit::VideoFullscreenManagerProxy::setupFullscreenWithID):
(WebKit::VideoFullscreenManagerProxy::exitFullscreenWithoutAnimationToMode):
* Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm:
(WebKit::VideoFullscreenManager::exitVideoFullscreenToModeWithoutAnimation):
Canonical link: https://commits.webkit.org/266239@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes