Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 24356033c71e8e73c60bc99e751e0458937c04ac
https://github.com/WebKit/WebKit/commit/24356033c71e8e73c60bc99e751e0458937c04ac
Author: Wenson Hsieh <[email protected]>
Date: 2026-08-20 (Thu, 20 Aug 2026)
Changed paths:
M Source/WebKit/UIProcess/API/Cocoa/WKWebView.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/WebKit/WKWebView/ObscuredContentInsets.mm
Log Message:
-----------
[Liquid Glass] Subject area in mail compose sometimes flashes when shrinking
image down from original size
https://bugs.webkit.org/show_bug.cgi?id=322186
rdar://185383012
Reviewed by Aditya Keerthi and Abrar Rahman Protyasha.
When resizing an image in Mail, it's possible for the top obscured inset area
to flash for a frame
or two when resizing or changing an image, in such a way that the web view goes
from being
scrollable to non-scrollable. This happens because of a general optimization to
avoid adding the
scroll pocket when a web view is scrolled to the top — because various editing
commands in Mail
compose (not just resizing an image, but deleting content, changing font size,
etc.) can change the
scrollability of the page in a way that's not synchronized with painting, the
scroll pocket can pop
in and out of the view hierarchy as the user edits.
This works around that issue in Mail by adding a carveout for this optimization
in the case where
the web view is `_editable` (i.e. Mail compose, IMAP Notes). It would be ideal
(for a future patch)
to try and synchronize scroll pocket updates due to changes in scrollability
with the compositing
(rendering update) lifecycle.
Test:
ObscuredContentInsets.ScrollPocketRemainsWhenScrolledToTopInEditableWebView
* Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _setEditable:]):
* Source/WebKit/UIProcess/API/mac/WKWebViewMac.mm:
(-[WKWebView _setUsesAutomaticContentInsetBackgroundFill:]):
* Source/WebKit/UIProcess/mac/WebViewImpl.h:
* Source/WebKit/UIProcess/mac/WebViewImpl.mm:
(WebKit::WebViewImpl::pageDidScroll):
(WebKit::WebViewImpl::updateScrollPocketVisibilityWhenScrolledToTopAndNonEditable):
(WebKit::WebViewImpl::updateScrollPocket):
(WebKit::WebViewImpl::updateScrollPocketVisibilityWhenScrolledToTop): Deleted.
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/ObscuredContentInsets.mm:
(TestWebKitAPI::TEST(ObscuredContentInsets,
ScrollPocketRemainsWhenScrolledToTopInEditableWebView)):
Canonical link: https://commits.webkit.org/319537@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications