Bug 235726

Summary: AX: Isolated tree object frames no longer encode content offsets, so hit testing should be updated accordingly
Product: WebKit Reporter: Tyler Wilcock <tyler_w>
Component: AccessibilityAssignee: Tyler Wilcock <tyler_w>
Status: RESOLVED FIXED    
Severity: Normal CC: andresg_22, cfleizach, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch none

Description Tyler Wilcock 2022-01-27 12:09:21 PST
In -[WKAccessibilityWebPageObjectMac accessibilityHitTest], we have a special isolated tree case:

// Isolated tree frames have the offset encoded into them so we don't need to undo here.
#if ENABLE(ACCESSIBILITY_ISOLATED_TREE)
        applyContentOffset = !WebCore::AXObjectCache::isIsolatedTreeEnabled();
#endif

The statement in the comment no longer seems to be true, as applying this content offset results in hit testing working incorrectly -- specifically, you have to hit test for a larger y-value than your target is actually located at.
Comment 1 Radar WebKit Bug Importer 2022-01-27 12:09:34 PST
<rdar://problem/88146867>
Comment 2 Tyler Wilcock 2022-01-27 16:18:27 PST
Created attachment 450193 [details]
Patch
Comment 3 Tyler Wilcock 2022-01-27 17:46:09 PST
My original comment should say:

as **NOT** applying this content offset results in hit testing working incorrectly

It's correct in the Changelog.
Comment 4 EWS 2022-01-28 08:10:14 PST
Committed r288741 (246534@main): <https://commits.webkit.org/246534@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 450193 [details].