[webkit-changes] [WebKit/WebKit] 2f66e5: [Cocoa] Fullscreen on dailymotion.com: Video zooms...
Jer Noble
noreply at github.com
Tue Dec 5 12:55:42 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 2f66e5f323622f0007b2b57f38491d7ba7ed0586
https://github.com/WebKit/WebKit/commit/2f66e5f323622f0007b2b57f38491d7ba7ed0586
Author: Jer Noble <jer.noble at apple.com>
Date: 2023-12-05 (Tue, 05 Dec 2023)
Changed paths:
M Source/WebCore/dom/Document.h
M Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp
Log Message:
-----------
[Cocoa] Fullscreen on dailymotion.com: Video zooms in landscape view when exiting fullscreen
https://bugs.webkit.org/show_bug.cgi?id=265836
rdar://118030773
Reviewed by Andy Estes.
When a device is rotated from portrait to landscape mode, not only will the "restore scroll point"
location be incorrect, but the layout of the page may change entirely. For dailymotion.com, in
portrait mode the video is stuck to the top of the page with `position:fixed`, however in landscape
its allowed to scroll offscreen with `position:absolute`.
To attempt to ameliorate this difference, attempt to scroll the fullscreen element into the viewport
after exiting fullscreen mode. And because the fullscreen element may itself be contained in a
fullscreen iframe, collect a list of all the fullscreen elements and scroll them all into their
respective viewports.
* Source/WebCore/dom/Document.h:
* Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp:
(WebKit::collectFullscreenElementsFromElement):
(WebKit::WebFullScreenManager::didExitFullScreen):
Canonical link: https://commits.webkit.org/271567@main
More information about the webkit-changes
mailing list