Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 6166dacefda3453223389520e49ade48a8299c17
https://github.com/WebKit/WebKit/commit/6166dacefda3453223389520e49ade48a8299c17
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/mac/WebViewImpl.mm
Log Message:
-----------
[Liquid Glass] [macOS] Favorites bar in Safari sometimes fails to adapt to
changing luminance
https://bugs.webkit.org/show_bug.cgi?id=294531
rdar://151338155
Reviewed by Richard Robinson.
Make a couple of adjustments to ensure that the favorites bar in Safari remains
legible, even as the
top fixed-position header or page background change when Liquid Glass is
enabled.
1. Always call `-[NSScrollPocket setCaptureColor:]` when using a hard pocket
style, to force UI
above the scroll edge effect region to either be in light mode or dark mode
depending on the
color of the pocket.
2. Remove code that currently *avoids* setting the scroll pocket's capture
color when scrolled past
the top in the case where there is no fixed element. We need to set the
capture color here to
ensure that the favorites bar always appears legible, even when scrolling
over the dark portion
of a website with a light background or vice versa.
* Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _updateFixedContainerEdges:]):
Drive-by fix: add a missing call to `-_updateHiddenScrollPocketEdges` here to
ensure that scroll
pockets are suppressed on iOS when there's a fixed-position container at that
edge.
* Source/WebKit/UIProcess/mac/WebViewImpl.mm:
(WebKit::WebViewImpl::pageDidScroll):
There's no more need to `updateTopScrollPocketCaptureColor` in response to the
web view being
scrolled, since it no longer depends on `m_pageIsScrolledToTop`.
(WebKit::WebViewImpl::updateTopScrollPocketCaptureColor):
Always set the `-captureColor` of the pocket. We also only set the capture
color in the case where a
hard scroll edge effect is used (as opposed to soft scroll edge effect), since
— when using a soft
pocket — the luminance should always come from the sampled content underneath.
This is important to
avoid a white-on-white favorites bar in Reader mode in Safari, on
https://daringfireball.net.
Canonical link: https://commits.webkit.org/296288@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