PlainTextRange duplicates CharacterRange functionality and it is missing some like operator NSRange.
<rdar://problem/108380311>
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].