Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 61c2f70daad1521351ef64cb61c94c4c8cf05cb0 https://github.com/WebKit/WebKit/commit/61c2f70daad1521351ef64cb61c94c4c8cf05cb0 Author: Andres Gonzalez <andresg...@apple.com> Date: 2023-07-28 (Fri, 28 Jul 2023)
Changed paths: A LayoutTests/accessibility/mac/text-marker-range-selection-in-list-items-expected.txt A LayoutTests/accessibility/mac/text-marker-range-selection-in-list-items.html M Source/WebCore/accessibility/AccessibilityObject.cpp Log Message: ----------- AX: Unexpected speech synthesis behavior for unordered lists https://bugs.webkit.org/show_bug.cgi?id=259030 rdar://112085797 Reviewed by Chris Fleizach. As noted in the FIXME comment in AccessibilityObject::stringForRange, passing the original range.start to listMarkerTextForNodeAndPosition() is incorrect and it.range.start() should be passed instead. This solves the problem of list markers getting inserted in the middle of list item text when the <li> element contains children like in item3 of the layout test. The new layout test exercises setting and retrieving selection in list items, coverage that was missing in the test suite. In addition, listMarkerTextForNodeAndPosition(...) was optimized to avoid walking up the RenderObject hierarchy twice unnecessarily for list items. Some code cleanup. * LayoutTests/accessibility/mac/text-marker-range-selection-in-list-items-expected.txt: Added. * LayoutTests/accessibility/mac/text-marker-range-selection-in-list-items.html: Added. * Source/WebCore/accessibility/AccessibilityObject.cpp: (WebCore::renderListItemContainerForNode): (WebCore::AccessibilityObject::listMarkerTextForNodeAndPosition): (WebCore::AccessibilityObject::stringForRange const): (WebCore::listMarkerTextForNode): Deleted. Canonical link: https://commits.webkit.org/266383@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes