Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 5d95f54a2edd93d34b6c540293da2fe136064317
https://github.com/WebKit/WebKit/commit/5d95f54a2edd93d34b6c540293da2fe136064317
Author: Tyler Wilcock <[email protected]>
Date: 2024-03-31 (Sun, 31 Mar 2024)
Changed paths:
A LayoutTests/accessibility/shadow-dom-hit-test-expected.txt
A LayoutTests/accessibility/shadow-dom-hit-test.html
M LayoutTests/platform/glib/TestExpectations
M LayoutTests/platform/ios/TestExpectations
A LayoutTests/platform/ios/accessibility/shadow-dom-hit-test-expected.txt
M LayoutTests/platform/mac-wk1/TestExpectations
M Source/WebCore/accessibility/AccessibilityRenderObject.cpp
M Source/WebCore/accessibility/AccessibilityRenderObject.h
Log Message:
-----------
Hover Text(a11y) is not working in Safari with Shadow Content
https://bugs.webkit.org/show_bug.cgi?id=271847
rdar://problem/125576324
Reviewed by Chris Fleizach.
Prior to this patch, when hit testing in
AccessibilityRenderObject::accessibilityHitTest returned content within a
shadow host, we would almost always transform the result into the containing
Node::shadowHost(). This effectively
prevents hit testing from reaching any content within the shadow DOM, breaking
Hover Text and anything else that relies on hit testing.
This behavior was introduced with this commit in 2008:
https://github.com/WebKit/WebKit/commit/ca5f21d630582a3f99fa65a6c882ec552ec10756#diff-58fcfb084a74fbbe8e6908f1d3bc813ecb43f3fa5729c5ff17451c215be3446e
There is no test or explanation justifying this behavior, so this patch removes
it, fixing the bug.
This patch also refactors a few functions to take references instead of
pointers to avoid needless null checks, and renames
AccessibilityRenderObject::accessibilityParentForImageMap to associatedAXImage
as that is what it actually does.
* LayoutTests/accessibility/shadow-dom-hit-test-expected.txt: Added.
* LayoutTests/accessibility/shadow-dom-hit-test.html: Added.
* LayoutTests/platform/ios/TestExpectations: Enable new test.
* LayoutTests/platform/ios/accessibility/shadow-dom-hit-test-expected.txt:
Added.
* Source/WebCore/accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::associatedAXImage const):
(WebCore::AccessibilityRenderObject::documentLinks):
(WebCore::AccessibilityRenderObject::accessibilityImageMapHitTest const):
(WebCore::AccessibilityRenderObject::accessibilityHitTest const):
(WebCore::AccessibilityRenderObject::accessibilityParentForImageMap const):
Deleted.
(WebCore::shouldUseShadowHostForHitTesting): Deleted.
* Source/WebCore/accessibility/AccessibilityRenderObject.h:
Canonical link: https://commits.webkit.org/276865@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes