Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 5c8815338e44fcd357b4ef0d537d4565873348f3
https://github.com/WebKit/WebKit/commit/5c8815338e44fcd357b4ef0d537d4565873348f3
Author: Tyler Wilcock <[email protected]>
Date: 2026-02-17 (Tue, 17 Feb 2026)
Changed paths:
M Source/WebCore/accessibility/AXObjectCache.cpp
M Source/WebCore/page/ChromeClient.h
M Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp
M Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h
Log Message:
-----------
AX: Eliminate sync IPC from mapScreenPointToPagePoint on macOS
https://bugs.webkit.org/show_bug.cgi?id=307807
rdar://170323909
Reviewed by Joshua Hoffman.
AXObjectCache::mapScreenPointToPagePoint converts screen coordinates to page
coordinates for accessibility hit testing. It previously used sync IPC via
ChromeClient::screenToRootView(), which blocks the web process waiting for
the UI process to perform coordinate conversion.
On macOS, the web process already has the necessary data cached to perform
this conversion locally: m_accessibilityPosition contains the screen position
of the root view's bottom-left corner, sent asynchronously via
WindowAndViewFramesChanged.
This patch adds a new ChromeClient method,
screenToRootViewUsingCachedPosition(),
that attempts the conversion using cached data. On macOS, when the cached window
frame is available, the conversion is performed locally. Otherwise (or on iOS
where WindowAndViewFramesChanged is a no-op), we fall back to sync IPC.
* Source/WebCore/accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::mapScreenPointToPagePoint const):
* Source/WebCore/page/ChromeClient.h:
(WebCore::ChromeClient::screenToRootViewUsingCachedPosition const):
* Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::screenToRootViewUsingCachedPosition const):
* Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h:
Canonical link: https://commits.webkit.org/307710@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications