Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8a0987250d87de4e1cf0f375336b6a9efb52db0f
      
https://github.com/WebKit/WebKit/commit/8a0987250d87de4e1cf0f375336b6a9efb52db0f
  Author: Jer Noble <[email protected]>
  Date:   2024-02-12 (Mon, 12 Feb 2024)

  Changed paths:
    M Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp

  Log Message:
  -----------
  [iOS] youtube.com: Exiting fullscreen causes page to scroll down slightly, 
cropping top of video
https://bugs.webkit.org/show_bug.cgi?id=269120
rdar://120492434

Reviewed by Aditya Keerthi.

In 271567@main, we added a call to `scrollIntoView()` to ensure the element 
which was exiting
fullscreen was visible in the viewport, no matter how much layout shifted the 
element during
the fullscreen transition. However, this has the side effect of "pinning" the 
fullscreen element
to the top of the page, which for the case of YouTube, is under the YouTube 
header bar.

Instead, call `scrollIntoViewIfNotVisible()` (passing in `true` to center the 
element if
offscreen) which is a no-op if the element is already visible.

* Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp:
(WebKit::WebFullScreenManager::didExitFullScreen):

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


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

Reply via email to