[webkit-changes] [WebKit/WebKit] a517df: REGRESSION(264795 at main): Some HLS videos have a fr...

aestes noreply at github.com
Mon Aug 28 21:39:13 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a517dfc6d1cbd03b09f5736cf4b1bf62f8e5ea88
      https://github.com/WebKit/WebKit/commit/a517dfc6d1cbd03b09f5736cf4b1bf62f8e5ea88
  Author: Andy Estes <aestes at apple.com>
  Date:   2023-08-28 (Mon, 28 Aug 2023)

  Changed paths:
    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/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
    M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm
    M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp
    M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h
    M Source/WebKit/WebProcess/GPU/media/cocoa/MediaPlayerPrivateRemoteCocoa.mm

  Log Message:
  -----------
  REGRESSION(264795 at main): Some HLS videos have a frame half as wide as it should be
https://bugs.webkit.org/show_bug.cgi?id=260825
rdar://110467872

Reviewed by Jer Noble.

In 264795 at main, the source of truth for videoLayerSize was moved from MediaPlayerPrivate to
HTMLMediaElement, but a cached value remained on MediaPlayerPrivateRemote (in m_videoLayerSize).
When the GPU process would send the LayerHostingContextIdChanged message to the WebContent process
with a new presentation size, MediaPlayerPrivateRemote's cached value would be updated but
HTMLMediaElement's would not. This could ultimately lead to WebAVPlayerLayer laying out with a size
that didn't match the presentation size of the styled video element.

Fixed this by removing m_videoLayerSize from MediaPlayerPrivateRemote and delegating to
HTMLMediaElement when setting the presentation size specified in the LayerHostingContextIdChanged
message.

No new tests as reproducing this requires content that isn't licenced for inclusion in WebKit.

* Source/WebCore/html/HTMLMediaElement.h:
* Source/WebCore/platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::videoLayerSizeDidChange):
* Source/WebCore/platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayerClient::mediaPlayerVideoLayerSizeDidChange):
* Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
* Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureLayer):
* Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:
(WebKit::MediaPlayerPrivateRemote::platformLayer const):
(WebKit::MediaPlayerPrivateRemote::setVideoLayerSizeFenced): Deleted.
* Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h:
* Source/WebKit/WebProcess/GPU/media/cocoa/MediaPlayerPrivateRemoteCocoa.mm:
(WebKit::MediaPlayerPrivateRemote::layerHostingContextIdChanged):
(WebKit::MediaPlayerPrivateRemote::videoLayerSize const):
(WebKit::MediaPlayerPrivateRemote::setVideoLayerSizeFenced):

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




More information about the webkit-changes mailing list