[webkit-changes] [WebKit/WebKit] 8a0987: [iOS] youtube.com: Exiting fullscreen causes page ...

Jer Noble noreply at github.com
Mon Feb 12 08:45:44 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8a0987250d87de4e1cf0f375336b6a9efb52db0f
      https://github.com/WebKit/WebKit/commit/8a0987250d87de4e1cf0f375336b6a9efb52db0f
  Author: Jer Noble <jer.noble at apple.com>
  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 at 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




More information about the webkit-changes mailing list