AX: Fix LocalFrame hit testing in layout tests#60747
Merged
webkit-commit-queue merged 1 commit intoWebKit:mainfrom Mar 19, 2026
Merged
Conversation
Collaborator
|
EWS run on previous version of this PR (hash 0ddc3bc) Details
|
0ddc3bc to
fe63c78
Compare
Collaborator
|
EWS run on previous version of this PR (hash fe63c78) Details |
twilco
reviewed
Mar 17, 2026
twilco
reviewed
Mar 17, 2026
twilco
reviewed
Mar 17, 2026
fe63c78 to
fd328cd
Compare
Collaborator
|
EWS run on previous version of this PR (hash fd328cd) Details |
fd328cd to
0b73534
Compare
Collaborator
|
EWS run on previous version of this PR (hash 0b73534) Details
|
0b73534 to
a55fbdf
Compare
Collaborator
|
EWS run on previous version of this PR (hash a55fbdf) Details |
twilco
approved these changes
Mar 18, 2026
a55fbdf to
52a04d1
Compare
Collaborator
|
EWS run on previous version of this PR (hash 52a04d1) Details
|
52a04d1 to
9432874
Compare
Collaborator
|
EWS run on current version of this PR (hash 9432874) Details |
https://bugs.webkit.org/show_bug.cgi?id=310080 rdar://172721343 Reviewed by Tyler Wilcock. With ACCESSIBILITY_LOCAL_FRAME enabled, relative frames are no longer supported. This is an issue for layout tests, since all coordinates for hit testing are expected to be in page-relative position. This patch fixes that by converting page to screen coords only when in test mode. The other core fix here is recursively calling approximateHitTest on local frames. This allows us to pass through a hit test seemlessly, and gets around some of the complications with wrappers + LocalFrame. To support tests, a new method, isFrameGeometryInitialized, was added. This will allow layout tests to wait on initialization before performing any geometry-related actions or queries. * LayoutTests/accessibility-isolated-tree/TestExpectations: * LayoutTests/accessibility/button-hit-test.html: * LayoutTests/accessibility/dynamic-changes-update-position.html: * LayoutTests/accessibility/hit-test-on-stitched-text.html: * LayoutTests/accessibility/mac/imagemap-hittest.html: * LayoutTests/accessibility/mac/line-range-for-text-marker.html: * LayoutTests/accessibility/mac/scroll-to-visible-action.html: * LayoutTests/accessibility/mac/text-marker-for-bounds.html: * LayoutTests/accessibility/table-cell-hit-test-not-column.html: * LayoutTests/accessibility/text-input-hit-test.html: * LayoutTests/resources/accessibility-helper.js: * Source/WebCore/accessibility/AXCoreObject.h: (WebCore::AXCoreObject::isFrameGeometryInitialized const): * Source/WebCore/accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::AXObjectCache): * Source/WebCore/accessibility/AccessibilityScrollView.cpp: (WebCore::AccessibilityScrollView::isFrameGeometryInitialized const): * Source/WebCore/accessibility/AccessibilityScrollView.h: * Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: (-[WebAccessibilityObjectWrapper _accessibilityIsFrameGeometryInitialized]): * Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp: (WebCore::AXIsolatedObject::accessibilityHitTest const): (WebCore::AXIsolatedObject::approximateHitTest const): (WebCore::AXIsolatedObject::screenRelativePosition const): (WebCore::AXIsolatedObject::screenRelativeRect const): (WebCore::AXIsolatedObject::isFrameGeometryInitialized const): * Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h: * Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp: (WebCore::AXIsolatedTree::createEmptyContent): (WebCore::AXIsolatedTree::applyPendingChangesLocked): (WebCore::createIsolatedObjectData): * Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h: (WebCore::AXIsolatedTree::isFrameGeometryInitialized const): * Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm: (attributeValueForTesting): * Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h: (WTR::AccessibilityUIElement::isFrameGeometryInitialized const): * Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl: * Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.h: * Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm: (WTR::AccessibilityUIElementIOS::isFrameGeometryInitialized const): * Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.h: * Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: (WTR::attributeValue): (WTR::AccessibilityUIElementMac::isFrameGeometryInitialized const): Canonical link: https://commits.webkit.org/309535@main
9432874 to
ca8a934
Compare
Collaborator
|
Committed 309535@main (ca8a934): https://commits.webkit.org/309535@main Reviewed commits have been landed. Closing PR #60747 and removing active labels. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🛠 vision-apple
ca8a934
9432874