[webkit-changes] [WebKit/WebKit] 7b7d1a: Cherry-pick 85232d38f6f4. rdar://problem/106112303
Jer Noble
noreply at github.com
Fri Mar 3 12:19:36 PST 2023
Branch: refs/heads/safari-7616.1.5-branch
Home: https://github.com/WebKit/WebKit
Commit: 7b7d1ab1e3ce98773c083945b8329d0d17bc5688
https://github.com/WebKit/WebKit/commit/7b7d1ab1e3ce98773c083945b8329d0d17bc5688
Author: Jer Noble <jer.noble at apple.com>
Date: 2023-03-03 (Fri, 03 Mar 2023)
Changed paths:
M Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.mm
Log Message:
-----------
Cherry-pick 85232d38f6f4. rdar://problem/106112303
REGRESSION(260575 at main): [iPad] Crash when navigating to next YouTube video in fullscreen mode
https://bugs.webkit.org/show_bug.cgi?id=253246
rdar://106112303
Reviewed by Tim Horton.
Remove the MESSAGE_CHECK protecting against videoLayerID being zero in setupFullscreenWithID(). Prior to the
no-double-hosting change, it was impossible to enter this function without a remote layer host having been
created in the WebContent process. After the no-double-hosting change, the remote layer host is created in
the GPU process, and may not have been created by the time setupFullscreenWithID() is called. Once the layer
_is_ created, the videoLayerID is sent to the UI process separately, and the created hosting layer is updated.
* Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:
(WebKit::VideoFullscreenManagerProxy::setupFullscreenWithID):
Canonical link: https://commits.webkit.org/261104@main
Canonical link: https://commits.webkit.org/261058.1@safari-7616.1.5-branch
Commit: 6434292f614546037714ff16f168ba9ad30d61ee
https://github.com/WebKit/WebKit/commit/6434292f614546037714ff16f168ba9ad30d61ee
Author: Jer Noble <jer.noble at apple.com>
Date: 2023-03-03 (Fri, 03 Mar 2023)
Changed paths:
M Source/WebCore/platform/cocoa/VideoFullscreenChangeObserver.h
M Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm
M Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm
M Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.h
M Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.mm
Log Message:
-----------
Cherry-pick e64627c9a4d4. rdar://problem/105990736
REGRESSION(260774 at main): [iPad] Video turns black after entering element fullscreen
https://bugs.webkit.org/show_bug.cgi?id=253225
rdar://105990736
Reviewed by Tim Horton.
Prior to "no-double-layer-hosting", the fullscreen machinery would create an AVPlayerLayerView and AVPlayerLayerViewController
simply to handle the case where the user might exit _element_ fullscreen when playing a video, and that video may need to
immediately enter picture-in-picture mode. As part of that process, the new AVPlayerLayerView would "steal" the video
content from an existing layer. This wasn't a problem in the double layer hosting world; there wasn't anything to steal then,
as the video layer being stolen was empty.
However, in the "no-double-layer-hosting" world, stealing the video layer results in no video being visible in the WKWebView,
as that video layer is the one inserted into the UI-side compositing tree. This code could benefit from a complete re-write,
now that there's a pre-existing AVPlayerLayerView in the web compositing hierarchy. For now, simply work around the problem
by not stealing the video layer prematurely, and by notifying the VideoFullscreenManagerProxy when PiP has ended and the
video layer can be returned to its rightful owner.
* Source/WebCore/platform/cocoa/VideoFullscreenChangeObserver.h:
* Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm:
(VideoFullscreenInterfaceAVKit::doSetup):
(VideoFullscreenInterfaceAVKit::returnToStandby):
* Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm:
* Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.h:
* Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:
(WebKit::VideoFullscreenModelContext::returnToStandby):
(WebKit::VideoFullscreenManagerProxy::returnToStandby):
Canonical link: https://commits.webkit.org/261143@main
Canonical link: https://commits.webkit.org/261058.2@safari-7616.1.5-branch
Compare: https://github.com/WebKit/WebKit/compare/1d89fdbdb2ba...6434292f6145
More information about the webkit-changes
mailing list