Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 4cbd5593231d3035447417c47e04f55c682179cf
https://github.com/WebKit/WebKit/commit/4cbd5593231d3035447417c47e04f55c682179cf
Author: Joshua Hoffman <[email protected]>
Date: 2025-02-05 (Wed, 05 Feb 2025)
Changed paths:
A
LayoutTests/accessibility/ax-thread-text-apis/line-requests-starting-after-first-line-expected.txt
A
LayoutTests/accessibility/ax-thread-text-apis/line-requests-starting-after-first-line.html
M Source/WebCore/accessibility/AXTextMarker.cpp
Log Message:
-----------
AX: [Text Marker] TextUnit::Line on webkit.org not including link in the same
line
https://bugs.webkit.org/show_bug.cgi?id=286975
rdar://143915609
Reviewed by Tyler Wilcock.
In the findLine method, we would always start iterating through the runs at
index 0, regardless
of where the current text marker is in the runs. This means that if we have a
text marker pointing
to the middle of the 2nd line, for example, we'd return all of the text leading
up to it but
`currentRuns->lineID(i) != startLineID` would fail before that line was
included, since the
startLineID would be *after* the first linePosition.
To fix this, we can start iterating through the runs from the current runIndex,
and reset the
runIndex for subsequent new objects. This means that the line boundary will be
found once we are
no longer on that current line, as expected.
*
LayoutTests/accessibility/ax-thread-text-apis/line-requests-starting-after-first-line-expected.txt:
Added.
*
LayoutTests/accessibility/ax-thread-text-apis/line-requests-starting-after-first-line.html:
Added.
* Source/WebCore/accessibility/AXTextMarker.cpp:
(WebCore::AXTextMarker::findLine const):
Canonical link: https://commits.webkit.org/289892@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