Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f9bd5344132b3fdf437774846f98166ea40067cc
      
https://github.com/WebKit/WebKit/commit/f9bd5344132b3fdf437774846f98166ea40067cc
  Author: Jer Noble <jer.no...@apple.com>
  Date:   2024-01-21 (Sun, 21 Jan 2024)

  Changed paths:
    M Source/WebCore/rendering/RenderVideo.cpp
    M Source/WebCore/rendering/RenderVideo.h

  Log Message:
  -----------
  REGRESSION(265672@main) Netflix.com video is zoomed in and cropped in 
Fullscreen
https://bugs.webkit.org/show_bug.cgi?id=267837
rdar://120803564

Reviewed by Mike Wyrzykowski.

At certain combinations of screen aspect ratio and content aspect ratio, 
Netflix.com content
becomes zoomed-in-and-cropped when in fullscreen mode.

Netflix sizes the <video> element to 100% width, and a fixed height, where that 
height is much
taller than the height of the viewport. It then relies on `object-fit: contain` 
to resize the
video content within that larger element space.

265672@main attempted to correct for "pixel cracks" at certain combinations of 
content aspect
ratio and window aspect ratio by detecting that situation and slightly resizing 
the videoBox
to "cover" the viewport rather than "contain" it. However with Netflix.com's 
layout, this
calculation resulted in making the videoBox much larger than necessary.

Revert 265672@main, and its follow-up fixes, 265672@main and 265672@main.

* Source/WebCore/rendering/RenderVideo.cpp:
(WebCore::RenderVideo::videoBox const):
(WebCore::RenderVideo::updatePlayer):
(WebCore::contentSizeAlmostEqualsFrameSize): Deleted.
(WebCore::RenderVideo::inElementOrVideoFullscreen const): Deleted.
* Source/WebCore/rendering/RenderVideo.h:

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


_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to