Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 0e817dab16a5d954f3ce6492fb6f7b6b4c1aa03a
https://github.com/WebKit/WebKit/commit/0e817dab16a5d954f3ce6492fb6f7b6b4c1aa03a
Author: Wenson Hsieh <[email protected]>
Date: 2025-05-20 (Tue, 20 May 2025)
Changed paths:
M Source/WTF/wtf/PlatformHave.h
M Source/WebKit/Platform/spi/mac/AppKitSPI.h
M Source/WebKit/UIProcess/API/mac/WKView.mm
M Source/WebKit/UIProcess/API/mac/WKWebViewMac.mm
M Source/WebKit/UIProcess/mac/WebViewImpl.h
M Source/WebKit/UIProcess/mac/WebViewImpl.mm
M Tools/TestWebKitAPI/Tests/TestWebKitAPI/mac/AppKitSPI.h
M Tools/TestWebKitAPI/Tests/WebKitCocoa/ObscuredContentInsets.mm
M Tools/TestWebKitAPI/Tests/mac/WKWebViewTitlebarSeparatorTests.mm
Log Message:
-----------
[macOS] -[WKWebView scrollViewFrame] should account for left/right obscured
content insets
https://bugs.webkit.org/show_bug.cgi?id=293318
rdar://151722135
Reviewed by Abrar Rahman Protyasha.
Adjust `-[WKWebView scrollViewFrame]` so that it's contracted inwards by the
left and right obscured
content insets. This is consistent with `-[NSScrollView scrollViewFrame]`,
which uses
`-[NSView _boundsAdjustedByLateralInsets]` when determining this frame.
* Source/WTF/wtf/PlatformHave.h:
Also remove the `NSSCROLLVIEW_SEPARATOR_TRACKING_ADAPTER` compile-time flag,
since it's been
available on all macOS since Big Sur.
* Source/WebKit/Platform/spi/mac/AppKitSPI.h:
* Source/WebKit/UIProcess/API/mac/WKView.mm:
* Source/WebKit/UIProcess/API/mac/WKWebViewMac.mm:
* Source/WebKit/UIProcess/mac/WebViewImpl.h:
* Source/WebKit/UIProcess/mac/WebViewImpl.mm:
(WebKit::m_flagsChangedEventMonitorTrackingArea):
(WebKit::WebViewImpl::updateWindowAndViewFrames):
(WebKit::WebViewImpl::viewWillMoveToWindowImpl):
(WebKit::WebViewImpl::viewDidHide):
(WebKit::WebViewImpl::viewDidUnhide):
(WebKit::WebViewImpl::pageDidScroll):
(WebKit::WebViewImpl::scrollViewFrame):
* Tools/TestWebKitAPI/Tests/TestWebKitAPI/mac/AppKitSPI.h:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/ObscuredContentInsets.mm:
(TestWebKitAPI::TEST(ObscuredContentInsets, ScrollViewFrameWithObscuredInsets)):
Add a simple API test to check this behavior, by setting obscured content
insets on all sides.
* Tools/TestWebKitAPI/Tests/mac/WKWebViewTitlebarSeparatorTests.mm:
Canonical link: https://commits.webkit.org/295191@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes