[webkit-changes] [WebKit/WebKit] 5c2899: REGRESSION?(255635 at main): [ iOS ] media/video-obje...

Jer Noble noreply at github.com
Fri Nov 4 08:44:41 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5c28999a8939e779663936b8d44e7a8a569b4cd9
      https://github.com/WebKit/WebKit/commit/5c28999a8939e779663936b8d44e7a8a569b4cd9
  Author: Jer Noble <jer.noble at apple.com>
  Date:   2022-11-04 (Fri, 04 Nov 2022)

  Changed paths:
    M LayoutTests/media/video-object-fit.html
    M LayoutTests/platform/ios-wk2/TestExpectations
    M LayoutTests/platform/mac/TestExpectations
    M Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp
    M Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp
    M Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h
    M Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.messages.in
    M Source/WebKit/GPUProcess/media/cocoa/RemoteMediaPlayerProxyCocoa.mm
    M Source/WebKit/GPUProcess/media/gstreamer/RemoteMediaPlayerProxyGStreamer.cpp
    M Source/WebKit/GPUProcess/media/playstation/RemoteMediaPlayerProxyPlayStation.cpp
    M Source/WebKit/GPUProcess/media/win/RemoteMediaPlayerProxyWin.cpp
    M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp
    M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h
    M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.messages.in
    M Source/WebKit/WebProcess/GPU/media/cocoa/MediaPlayerPrivateRemoteCocoa.mm

  Log Message:
  -----------
  REGRESSION?(255635 at main): [ iOS ] media/video-object-fit.html is a constant failure
https://bugs.webkit.org/show_bug.cgi?id=246698
rdar://101298592

Reviewed by Eric Carlson.

Refactor the test to rely on rVFC(), rather than `canplaythrough`.

* LayoutTests/media/video-object-fit.html:
* LayoutTests/platform/ios-wk2/TestExpectations:
* LayoutTests/platform/mac/TestExpectations:

Because isReadyForVideoSetup() relies on m_readyState, make sure to check it
_after_ the ready state is changed, not before.

* Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::updateStates):

When PrepareForPlayback() is sent, the RemoteMediaPlayerProxy will create a remote
layer hosting context, and in the callback, MediaPlayerPrivateRemote will create a
layer. However this happens _way_ before the remote player is actually ready to display
content, and _way_ before the remote player has a valid naturalSize. So the initial
layout will place the remotely hosted layer assuming a default replaced size of
300x150, which leads to a weird layout change when the true naturalSize change occurs.

Only create a layer hosting context when the remote player says that it has a layer
to display. This guarantees that the initial layer layout of the video content happens
_after_ the naturalSize is known and sizes the layer correctly.

* Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp:
(WebKit::RemoteMediaPlayerProxy::prepareForPlayback):
* Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h:
* Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.messages.in:
* Source/WebKit/GPUProcess/media/cocoa/RemoteMediaPlayerProxyCocoa.mm:
(WebKit::RemoteMediaPlayerProxy::setVideoInlineSizeIfPossible):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerRenderingModeChanged):
(WebKit::RemoteMediaPlayerProxy::setVideoInlineSizeFenced):
(WebKit::RemoteMediaPlayerProxy::prepareForPlayback): Deleted.
* Source/WebKit/GPUProcess/media/gstreamer/RemoteMediaPlayerProxyGStreamer.cpp:
(WebKit::RemoteMediaPlayerProxy::prepareForPlayback): Deleted.
* Source/WebKit/GPUProcess/media/playstation/RemoteMediaPlayerProxyPlayStation.cpp:
(WebKit::RemoteMediaPlayerProxy::prepareForPlayback): Deleted.
* Source/WebKit/GPUProcess/media/win/RemoteMediaPlayerProxyWin.cpp:
(WebKit::RemoteMediaPlayerProxy::prepareForPlayback): Deleted.
* Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:
(WebKit::MediaPlayerPrivateRemote::prepareForPlayback):
* Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h:
* Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.messages.in:
* Source/WebKit/WebProcess/GPU/media/cocoa/MediaPlayerPrivateRemoteCocoa.mm:
(WebKit::MediaPlayerPrivateRemote::layerHostingContextIdChanged):

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




More information about the webkit-changes mailing list