Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 383ba72d164097ef9f267981d102d19a5bb0b577
https://github.com/WebKit/WebKit/commit/383ba72d164097ef9f267981d102d19a5bb0b577
Author: Wenson Hsieh <[email protected]>
Date: 2025-06-16 (Mon, 16 Jun 2025)
Changed paths:
M Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
M Source/WebKit/UIProcess/API/Cocoa/WKWebViewInternal.h
M Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h
M Source/WebKit/UIProcess/API/mac/WKWebViewMac.mm
M Source/WebKit/UIProcess/mac/WebViewImpl.mm
Log Message:
-----------
[Liquid Glass] Add a way to hide the top fixed color extension view and
override top scroll edge effect color
https://bugs.webkit.org/show_bug.cgi?id=294574
rdar://153564136
Reviewed by Abrar Rahman Protyasha and Megan Gardner.
Add support for 2 new SPI methods (hopefully, soon-to-be APIs) on `WKWebView`:
• `_shouldSuppressTopColorExtensionView`, used to prevent WebKit from
automatically placing a
color extension view when a fixed element near the top of the viewport is
detected.
• `_overrideTopScrollEdgeEffectColor`, used to override the capture color of
the scroll edge
effect view on macOS.
The combination of these two properties allows clients (i.e. Safari) to
implement a mode where it
doesn't show website colors (i.e. background color, or top fixed element color)
as the background of
the tab bar; instead, a hard pocket tinted with the default system background
color is used.
* Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _updateFixedColorExtensionViews]):
(-[WKWebView _shouldSuppressTopColorExtensionView]):
(-[WKWebView _setShouldSuppressTopColorExtensionView:]):
Add support for the new properties; see above for more details.
* Source/WebKit/UIProcess/API/Cocoa/WKWebViewInternal.h:
* Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h:
* Source/WebKit/UIProcess/API/mac/WKWebViewMac.mm:
(-[WKWebView _overrideTopScrollEdgeEffectColor]):
(-[WKWebView _setOverrideTopScrollEdgeEffectColor:]):
* Source/WebKit/UIProcess/mac/WebViewImpl.mm:
(WebKit::WebViewImpl::updateTopScrollPocketCaptureColor):
Also avoid tinting the top scroll pocket with the sampled fixed position color
when the top color
extension view is suppressed. Setting `-captureColor` here only made sense in
the case where there's
a color extension view beneath the pocket.
Canonical link: https://commits.webkit.org/296293@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