Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9014e0de0c569e8c335163803d0e6d61a4fd7bdf
      
https://github.com/WebKit/WebKit/commit/9014e0de0c569e8c335163803d0e6d61a4fd7bdf
  Author: Tyler Wilcock <[email protected]>
  Date:   2026-02-17 (Tue, 17 Feb 2026)

  Changed paths:
    M Source/WebCore/accessibility/AXCoreObject.h
    M Source/WebCore/accessibility/AXGeometryManager.cpp
    M Source/WebCore/accessibility/AXGeometryManager.h
    M Source/WebCore/accessibility/AXObjectCache.h
    M Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp

  Log Message:
  -----------
  AX: When servicing a hit test, preemptively hit-test nearby points and cache 
the results to make future AT hit-tests faster
https://bugs.webkit.org/show_bug.cgi?id=307919
rdar://170401294

Reviewed by Joshua Hoffman.

Certain assistive technologies (like HoverText) send very rapid hit-tests that 
are all close to each other (think of a
mouse moving across the screen). This commit uses this knowledge to build an 
optimization where when we get a hit-test
from an AT, we asynchronously also hit test nearby points and cache the 
results, meaning we can instantly serve follow-up
AT hit-tests for nearby points. The entries in this cache expire after a set 
time, and are invalidated if their object
changes its bounding box.

* Source/WebCore/accessibility/AXCoreObject.h:
* Source/WebCore/accessibility/AXGeometryManager.cpp:
(WebCore::AXGeometryManager::cacheRectIfNeeded):
(WebCore::AXGeometryManager::initializePrimaryScreenRect):
(WebCore::AXGeometryManager::primaryScreenRect):
(WebCore::AXGeometryManager::cachedHitTestResult):
(WebCore::hitTestExpirationTime):
(WebCore::AXGeometryManager::cacheHitTestResult):
(WebCore::AXGeometryManager::expandHitTestCacheAroundPoint):
(WebCore::AXGeometryManager::invalidateHitTestCacheForID):
(WebCore::AXGeometryManager::clearHitTestCache):
* Source/WebCore/accessibility/AXGeometryManager.h:
* Source/WebCore/accessibility/AXObjectCache.h:
* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::accessibilityHitTest const):
(WebCore::AXIsolatedObject::approximateHitTest const):

Canonical link: https://commits.webkit.org/307742@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to