RESOLVED FIXED 255802
AX: Retire accessibility PlainTextRange and use CharacterRange instead.
https://bugs.webkit.org/show_bug.cgi?id=255802
Summary AX: Retire accessibility PlainTextRange and use CharacterRange instead.
Andres Gonzalez
Reported 2023-04-21 12:29:50 PDT
PlainTextRange duplicates CharacterRange functionality and it is missing some like operator NSRange.
Attachments
Patch (52.20 KB, patch)
2023-04-21 15:14 PDT, Andres Gonzalez
no flags
Patch (52.20 KB, patch)
2023-04-24 09:24 PDT, Andres Gonzalez
no flags
Patch (51.83 KB, patch)
2023-04-25 08:23 PDT, Andres Gonzalez
no flags
Patch (52.83 KB, patch)
2023-04-25 10:35 PDT, Andres Gonzalez
no flags
Patch (52.83 KB, patch)
2023-04-26 13:39 PDT, Andres Gonzalez
no flags
Patch (52.77 KB, patch)
2023-05-04 07:22 PDT, Andres Gonzalez
no flags
Patch (51.76 KB, patch)
2023-05-23 11:59 PDT, Andres Gonzalez
no flags
Radar WebKit Bug Importer
Comment 1 2023-04-21 12:30:05 PDT
Andres Gonzalez
Comment 2 2023-04-21 15:14:18 PDT
Tyler Wilcock
Comment 3 2023-04-21 15:42:07 PDT
Comment on attachment 466034 [details] Patch r+ after EWS passes
Andres Gonzalez
Comment 4 2023-04-24 09:24:54 PDT
Andres Gonzalez
Comment 5 2023-04-25 08:23:16 PDT
Andres Gonzalez
Comment 6 2023-04-25 10:35:18 PDT
Andres Gonzalez
Comment 7 2023-04-26 13:39:33 PDT
Andres Gonzalez
Comment 8 2023-05-04 07:22:37 PDT
EWS
Comment 9 2023-05-04 09:11:21 PDT
commit-queue failed to commit attachment 466206 [details] to WebKit repository. To retry, please set cq+ flag again.
Carlos Garcia Campos
Comment 10 2023-05-08 01:54:16 PDT
Comment on attachment 466206 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=466206&action=review > Source/WebCore/accessibility/AccessibilityObject.cpp:1522 > - unsigned textLength = getLengthForTextRange(); > - if (range.start + range.length > textLength) > + if (range.location + range.length > text().length()) There's a change in behavior here. ATSPI implements getLengthForTextRange() in a different way, I don't know why, but it's required here. > Source/WebCore/accessibility/AccessibilityObject.cpp:1533 > - unsigned textLength = getLengthForTextRange(); > - if (range.start + range.length > textLength) > + unsigned textLength = text().length(); > + if (range.location + range.length > textLength) And here.
Andres Gonzalez
Comment 11 2023-05-23 11:59:45 PDT
Darin Adler
Comment 12 2023-05-23 15:24:48 PDT
Generally it should be OK to use CharacterRange as a parameter rather than const CharacterRange& and should be more efficient rather than less efficient. Worth considering when touching all these call sites.
EWS
Comment 13 2023-05-23 19:55:29 PDT
Committed 264452@main (13f559711a81): <https://commits.webkit.org/264452@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 466465 [details].
Note You need to log in before you can comment on or make changes to this bug.