Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: cc2d17a95691b8c0632e2739542ad65f82153695
https://github.com/WebKit/WebKit/commit/cc2d17a95691b8c0632e2739542ad65f82153695
Author: Abrar Rahman Protyasha <[email protected]>
Date: 2023-11-10 (Fri, 10 Nov 2023)
Changed paths:
M Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h
M Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm
M Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm
M Tools/TestWebKitAPI/Tests/WebKitCocoa/AnimatedResize.mm
M Tools/TestWebKitAPI/Tests/WebKitCocoa/CSSViewportUnits.mm
M Tools/TestWebKitAPI/Tests/WebKitCocoa/FixedLayoutSize.mm
M Tools/TestWebKitAPI/Tests/WebKitCocoa/RestoreScrollPosition.mm
M Tools/TestWebKitAPI/Tests/ios/ScrollViewInsetTests.mm
M Tools/TestWebKitAPI/Tests/ios/ScrollViewScrollabilityTests.mm
M Tools/WebKitTestRunner/ios/PlatformWebViewIOS.mm
Log Message:
-----------
[iOS] `svh`/`dvh` units are unexpectedly equal when Safari tab bar is not
visible
https://bugs.webkit.org/show_bug.cgi?id=261185
rdar://115085360
Reviewed by Wenson Hsieh.
The SPI `-[WKWebView
_overrideLayoutParametersWithMinimumLayoutSize:maximumUnobscuredSizeOverride:]`
is underspecified, and clients calling into this method conflate
`minimumLayoutSize` as _the_ current layout size. This is not appropriate
for us to use as the `minimumUnobscuredSizeOverride` because the current
layout size may not be computed in light of the fact that some dynamic
UI of a client is not visible.
To address this issue, we update the SPI signature to include a new
`minimumUnobscuredSizeOverride` argument, following the precedence set
by the `maximumUnobscuredSizeOverride` parameter, which callers should
populate with the minimum unobscured layout size assuming all dynamic UI
is expanded.
We also update some API tests that call this SPI and reflect the
semantics of the new argument in the updated test expectations.
* Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h:
* Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:
(-[WKWebView
_overrideLayoutParametersWithMinimumLayoutSize:maximumUnobscuredSizeOverride:]):
(-[WKWebView
_overrideLayoutParametersWithMinimumLayoutSize:minimumUnobscuredSizeOverride:maximumUnobscuredSizeOverride:]):
* Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
(WebKit::WKWebViewState::applyTo):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/AnimatedResize.mm:
(TEST):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/CSSViewportUnits.mm:
(TEST):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/FixedLayoutSize.mm:
(TEST):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/RestoreScrollPosition.mm:
(TestWebKitAPI::TEST):
* Tools/TestWebKitAPI/Tests/ios/ScrollViewInsetTests.mm:
(TestWebKitAPI::TEST):
* Tools/TestWebKitAPI/Tests/ios/ScrollViewScrollabilityTests.mm:
(TestWebKitAPI::TEST):
* Tools/WebKitTestRunner/ios/PlatformWebViewIOS.mm:
(-[PlatformWebViewController
viewWillTransitionToSize:withTransitionCoordinator:]):
Canonical link: https://commits.webkit.org/270516@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes