| Summary: | AX: Retire accessibility PlainTextRange and use CharacterRange instead. | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Andres Gonzalez <andresg_22> | ||||||||||||||||
| Component: | Accessibility | Assignee: | Andres Gonzalez <andresg_22> | ||||||||||||||||
| Status: | RESOLVED FIXED | ||||||||||||||||||
| Severity: | Normal | CC: | aboxhall, andresg_22, apinheiro, cfleizach, cgarcia, darin, dmazzoni, ews-watchlist, jcraig, jdiggs, samuel_white, tyler_w, webkit-bug-importer | ||||||||||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||||||||||
| Version: | WebKit Nightly Build | ||||||||||||||||||
| Hardware: | All | ||||||||||||||||||
| OS: | All | ||||||||||||||||||
| Attachments: |
|
||||||||||||||||||
|
Description
Andres Gonzalez
2023-04-21 12:29:50 PDT
Created attachment 466034 [details]
Patch
Comment on attachment 466034 [details]
Patch
r+ after EWS passes
Created attachment 466064 [details]
Patch
Created attachment 466074 [details]
Patch
Created attachment 466077 [details]
Patch
Created attachment 466110 [details]
Patch
Created attachment 466206 [details]
Patch
commit-queue failed to commit attachment 466206 [details] to WebKit repository. To retry, please set cq+ flag again.
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. Created attachment 466465 [details]
Patch
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. 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]. |