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

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

  Log Message:
  -----------
  REGRESSION (270199@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@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@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


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to