Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 5d59ee3a751171e60e7b4d09360241f202f86d02
https://github.com/WebKit/WebKit/commit/5d59ee3a751171e60e7b4d09360241f202f86d02
Author: Tyler Wilcock <[email protected]>
Date: 2026-09-03 (Thu, 03 Sep 2026)
Changed paths:
A LayoutTests/accessibility/isolated-tree/listmarker-suffix-expected.txt
A LayoutTests/accessibility/isolated-tree/listmarker-suffix.html
A
LayoutTests/accessibility/isolated-tree/mac/text-marker-range-selection-in-list-items-expected.txt
A
LayoutTests/accessibility/isolated-tree/mac/text-marker-range-selection-in-list-items.html
M Source/WebCore/accessibility/AccessibilityRenderObject.cpp
Log Message:
-----------
AX: In isolated tree mode, AXStringForTextMarkerRange drops the space after a
bulleted list marker
https://bugs.webkit.org/show_bug.cgi?id=323274
rdar://186529088
Reviewed by Chris Fleizach.
<ul><li id="item">item 1</li></ul>
The text marker range covering that list item stringifies as "\u2022 item 1" on
the
main thread but as "\u2022item 1" with the isolated tree enabled.
AccessibilityRenderObject::textRuns() drops runs for generated content by asking
shouldExcludeTextRunsForPseudoElement() about renderText->parent()'s pseudo
type, and
PseudoElementType::Marker is one of the types it excludes. That only inspects
the
immediate parent, though, and a marker that needs renderers for its content
does not
parent them directly. RenderTreeBuilder::List::buildMarkerContentRenderers
instead wraps them
in an anonymous inline-block built with createAnonymousStyleWithDisplay, and
that
anonymous style carries no pseudo type. So the ::marker case never fires and the
marker's text becomes text runs of its own.
Walk out of the element-less generated content in textRuns() and return no runs
when a
RenderListMarker is found.
This also fixes
accessibility/mac/text-marker-range-selection-in-list-items.html.
* LayoutTests/accessibility/isolated-tree/listmarker-suffix-expected.txt: Added.
* LayoutTests/accessibility/isolated-tree/listmarker-suffix.html: Added.
*
LayoutTests/accessibility/isolated-tree/mac/text-marker-range-selection-in-list-items-expected.txt:
Added.
*
LayoutTests/accessibility/isolated-tree/mac/text-marker-range-selection-in-list-items.html:
Added.
* Source/WebCore/accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::textRuns):
Canonical link: https://commits.webkit.org/320426@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications