[webkit-changes] [WebKit/WebKit] 0d56bc: REGRESSION (270199 at main): [visionOS] YouTube video...

Aditya Keerthi noreply at github.com
Sun Jan 7 18:18:55 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 0d56bc1e302098ab1649ceda9e2390d3a625f787
      https://github.com/WebKit/WebKit/commit/0d56bc1e302098ab1649ceda9e2390d3a625f787
  Author: Aditya Keerthi <akeerthi at apple.com>
  Date:   2024-01-07 (Sun, 07 Jan 2024)

  Changed paths:
    M Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm

  Log Message:
  -----------
  REGRESSION (270199 at main): [visionOS] YouTube video fullscreen layout does not fill screen to fit the full window
https://bugs.webkit.org/show_bug.cgi?id=267135
rdar://119830067

Reviewed by Richard Robinson and Wenson Hsieh.

270199 at main removed two pieces of logic that previously guaranteed that the
layout parameters (such as `window.innerWidth`) exposed to the web during the
"fullscreenchange" event reflected the fullscreen size.

Prior to that change `[webView setFrame:];` and
`[webView _overrideLayoutParametersWithMinimumLayoutSize:maximumUnobscuredSizeOverride:];`
in `-[WKFullScreenWindowController enterFullScreen:]` guaranteed that behavior.

YouTube sets the video element's width/height to `window.innerWidth`/`window.innerHeight`
in the "fullscreenchange" event, resulting in video that doesn't fill the screen.

Even when the "resize" event is fired, a flash of the incorrect size is observed.

Fix by restoring the call to `[webView setFrame:];`.
`[webView _overrideLayoutParametersWithMinimumLayoutSize:maximumUnobscuredSizeOverride:];`
is not restored since the goal in 270199 at main to avoid overriding viewport layout
parameters remains.

* Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
(-[WKFullScreenWindowController enterFullScreen:]):

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




More information about the webkit-changes mailing list