[webkit-changes] [WebKit/WebKit] b8bf24: Exiting fullscreen on ign.com fails to restore scr...
Tim Nguyen
noreply at github.com
Wed Mar 29 11:11:50 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b8bf24826066a38484c8ab1cc31802d712a4a30a
https://github.com/WebKit/WebKit/commit/b8bf24826066a38484c8ab1cc31802d712a4a30a
Author: Tim Nguyen <ntim at apple.com>
Date: 2023-03-29 (Wed, 29 Mar 2023)
Changed paths:
A LayoutTests/fullscreen/fullscreen-restore-scroll-position-overflow-auto-expected.txt
A LayoutTests/fullscreen/fullscreen-restore-scroll-position-overflow-auto.html
M LayoutTests/platform/mac-wk1/TestExpectations
M Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp
M Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.h
M Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp
Log Message:
-----------
Exiting fullscreen on ign.com fails to restore scroll position
https://bugs.webkit.org/show_bug.cgi?id=254632
rdar://106774841
Reviewed by Jer Noble.
The bug is caused by a missing layout in some particular situations (overflow: auto + percentage sizes) before restoring the scroll position.
Adding a call to forceLayout() fixes the issue.
However, in order for the test to work in WebKit Test runner, the save/restoreScrollPosition methods also need to be called in the InjectedBundle.
Safari & minibrowser use a different codepath (involving the UIProcess).
* LayoutTests/fullscreen/fullscreen-restore-scroll-position-overflow-auto-expected.txt: Added.
* LayoutTests/fullscreen/fullscreen-restore-scroll-position-overflow-auto.html: Added.
* LayoutTests/platform/mac-wk1/TestExpectations:
* Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp:
(WebKit::WebFullScreenManager::restoreScrollPosition):
* Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.h:
* Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageWillEnterFullScreen):
(WKBundlePageDidExitFullScreen):
Canonical link: https://commits.webkit.org/262281@main
More information about the webkit-changes
mailing list