[webkit-changes] [WebKit/WebKit] 249fdd: Hulu.com content is stretched when moving to next ...

Jer Noble noreply at github.com
Sun Sep 25 18:08:29 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 249fdd9c0f8bf064190f69a2791917b762922bee
      https://github.com/WebKit/WebKit/commit/249fdd9c0f8bf064190f69a2791917b762922bee
  Author: Jer Noble <jer.noble at apple.com>
  Date:   2022-09-25 (Sun, 25 Sep 2022)

  Changed paths:
    M Source/WebCore/html/HTMLMediaElement.cpp
    M Source/WebCore/page/Quirks.cpp
    M Source/WebCore/page/Quirks.h

  Log Message:
  -----------
  Hulu.com content is stretched when moving to next episode
https://bugs.webkit.org/show_bug.cgi?id=245641
<rdar://100199996>

Reviewed by Eric Carlson.

As a prelude: at some point, WebKit fixed a bug where the `object-fit` CSS property was not honored
if set before media began loading in a HTMLVideoElement. Hulu.com sets it's video element's
`object-fit:` style to `fill`. When Hulu.com navigates to the next episode in a playlist, it resets
the <video>'s `width:` and `height:` style to 100%, causing the video to stretch visibly. Previous
to the mentioned fix, this bug would "hide" this behavior, by causing the renderer to ignore `fill`
and default to `contain`.

Add a quirk for Hulu.com that reverts to the previous (broken) behavior.

* Source/WebCore/html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::updateMediaPlayer):
* Source/WebCore/page/Quirks.cpp:
(WebCore::Quirks::needsVideoShouldMaintainAspectRatioQuirk const):
* Source/WebCore/page/Quirks.h:

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




More information about the webkit-changes mailing list