Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 98f32bc74deaeb95471f888c1b27855e255770cd
https://github.com/WebKit/WebKit/commit/98f32bc74deaeb95471f888c1b27855e255770cd
Author: Wenson Hsieh <[email protected]>
Date: 2026-07-24 (Fri, 24 Jul 2026)
Changed paths:
M Source/WTF/wtf/PlatformHave.h
M Source/WebKit/Platform/spi/mac/AppKitSPI.h
M Source/WebKit/UIProcess/mac/WebViewImpl.h
M Source/WebKit/UIProcess/mac/WebViewImpl.mm
M Tools/TestWebKitAPI/Helpers/mac/AppKitSPI.h
M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/EditorStateTests.mm
Log Message:
-----------
macOS 27: Siri affordance should dismiss immediately after scrolling the
selection away from the mouse cursor
https://bugs.webkit.org/show_bug.cgi?id=320221
rdar://180970146
Reviewed by Richard Robinson, Aditya Keerthi, and Abrar Rahman Protyasha.
The changes in 316271@main allowed the Siri affordance to dismiss after a short
delay (2 seconds),
once scrolling ends. However, this still looks strange, as the UI lingers on
screen where it
shouldn't be.
To mitigate this, we detect when the mouse cursor no longer intersects with the
bounds of the
selection rect (based on `EditorState`), and explicitly dismiss the Siri
affordance.
Test: EditorStateTests.DismissSiriAffordanceWhenSelectionScrollsAwayFromCursor
* Source/WTF/wtf/PlatformHave.h:
* Source/WebKit/Platform/spi/mac/AppKitSPI.h:
* Source/WebKit/UIProcess/mac/WebViewImpl.h:
* Source/WebKit/UIProcess/mac/WebViewImpl.mm:
(WebKit::WebViewImpl::handleProcessSwapOrExit):
(WebKit::WebViewImpl::pageDidScroll):
(WebKit::WebViewImpl::updateCursorOverlapsSelectionAndNotifyIfNeeded):
* Tools/TestWebKitAPI/Helpers/mac/AppKitSPI.h:
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/EditorStateTests.mm:
(-[TestSiriAffordanceController isVisible]):
(-[TestSiriAffordanceController dismiss]):
(-[TestSiriAffordanceController setRealController:]):
(-[TestSiriAffordanceController forwardingTargetForSelector:]):
(-[TestSiriAffordanceController respondsToSelector:]):
(TestWebKitAPI::TEST(EditorStateTests,
DismissSiriAffordanceWhenSelectionScrollsAwayFromCursor)):
Canonical link: https://commits.webkit.org/317914@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications