Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 84b5fbfd136608cd6367294cbe95c485e83afb70
https://github.com/WebKit/WebKit/commit/84b5fbfd136608cd6367294cbe95c485e83afb70
Author: Tyler Wilcock <[email protected]>
Date: 2026-09-05 (Sat, 05 Sep 2026)
Changed paths:
M LayoutTests/accessibility-isolated-tree/TestExpectations
M Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
Log Message:
-----------
AX: In isolated tree mode, walking lines with
AXLineTextMarkerRangeForTextMarker reads the same line forever
https://bugs.webkit.org/show_bug.cgi?id=323509
rdar://186748205
Reviewed by Chris Fleizach.
An assistive technology reads consecutive lines by asking for the line at the
end of the line it just
read, which relies on a line range's end being the next line's start. That was
true in the live tree but
not the isolated one, so the walk read the first line again and never advanced.
On a soft-wrapped
contenteditable, asking for the line at the end of the first line returned [0,
25] -- the first line
again -- where the live tree returns [25, 56].
Both trees end the range at the same character; they disagree about which line
that character belongs
to. AccessibilityObject::lineRangeForPosition walks forward until it leaves the
line, so its end is
the downstream start of the next line. The isolated tree's findLine
deliberately marks a line end
upstream so it means "the end of this line" rather than "the start of the
next", and asking for the
line at such a marker answers with the line it came from.
Hand the client the downstream marker, matching the live tree.
* LayoutTests/accessibility-isolated-tree/TestExpectations:
Mark accessibility/mac/line-range-continuity.html as passing.
* Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper lineTextMarkerRangeForTextMarker:forUnit:]):
Canonical link: https://commits.webkit.org/320575@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications