Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: ab72213571733c4284711044d37f4db1248ac11c https://github.com/WebKit/WebKit/commit/ab72213571733c4284711044d37f4db1248ac11c Author: Jer Noble <jer.no...@apple.com> Date: 2023-06-01 (Thu, 01 Jun 2023)
Changed paths: M Source/WebCore/html/HTMLMediaElement.cpp M Source/WebCore/html/HTMLMediaElement.h M Source/WebCore/platform/graphics/MediaPlayer.cpp M Source/WebCore/platform/graphics/MediaPlayer.h M Source/WebCore/platform/graphics/VideoLayerManager.h M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm M Source/WebCore/platform/graphics/avfoundation/objc/VideoLayerManagerObjC.h M Source/WebCore/platform/graphics/avfoundation/objc/VideoLayerManagerObjC.mm M Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h M Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxyConfiguration.h M Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxyConfiguration.serialization.in M Source/WebKit/GPUProcess/media/cocoa/RemoteMediaPlayerProxyCocoa.mm M Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerManager.cpp Log Message: ----------- REGRESSION(264306@main) [Cocoa] Moving to next video on YouTube.com while in PiP resizes video contents incorrectly https://bugs.webkit.org/show_bug.cgi?id=257564 rdar://110026753 Reviewed by Eric Carlson. In 264306@main, we stopped resizing the video contents layer whenever normal layout starts, to avoid breaking layout of media that's currently displayed in fullscreen or pip modes. However, this had the paradoxical effect of breaking layout when a media element moves from one src to another. This is because the `videoInlineSize` last set by the fullscreen or pip window is cached at the MediaPlayerPrivate layer, and this value is lost when the media is unloaded and new src loaded. The MediaPlayerPrivate will use the `presentationSize` as the initial size of the layer (which is the inline size; `videoInlineSize` needs to be renamed to `videoLayerSize`). Cache the `videoInlineSize` value at the HTMLMediaElement level. Add a new MediaPlayerClient method so that the MediaPlayer can query the HTMLMediaElement for that size at creation time. Pass that value across the WC -> GPU process boundary in RemoteMediaPlayerProxyConfiguration. * Source/WebCore/html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::videoInlineSize const): (WebCore::HTMLMediaElement::setVideoInlineSizeFenced): * Source/WebCore/html/HTMLMediaElement.h: * Source/WebCore/platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::videoInlineSize const): * Source/WebCore/platform/graphics/MediaPlayer.h: (WebCore::MediaPlayerClient::mediaPlayerVideoInlineSize const): * Source/WebCore/platform/graphics/VideoLayerManager.h: * Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer): * Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureLayer): * Source/WebCore/platform/graphics/avfoundation/objc/VideoLayerManagerObjC.h: * Source/WebCore/platform/graphics/avfoundation/objc/VideoLayerManagerObjC.mm: (WebCore::VideoLayerManagerObjC::setVideoLayer): * Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp: (WebKit::RemoteMediaPlayerProxy::RemoteMediaPlayerProxy): * Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h: * Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxyConfiguration.h: * Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxyConfiguration.serialization.in: * Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerManager.cpp: (WebKit::RemoteMediaPlayerManager::createRemoteMediaPlayer): Canonical link: https://commits.webkit.org/264795@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes