[Webkit-unassigned] [Bug 166955] AX: WKContentView needs to implement UITextInput methods to make speak selection highlighting work

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 25 09:12:00 PST 2017


--- Comment #12 from Nan Wang <n_wang at apple.com> ---
Comment on attachment 299684
  --> https://bugs.webkit.org/attachment.cgi?id=299684

View in context: https://bugs.webkit.org/attachment.cgi?id=299684&action=review

>> Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:1870
>> +        next = !next.isNull() ? next.next() : next;
> This is quite possibly the most inefficient way of expanding positions all the way to the beginning or the end of a document.
> Why can't we just use findPlainText? Please explain in the change or in the comment.

I've got a comment already: Try to search for a range which is the closest to the position within the selection range that matches the passed in text.

I think the problem with findPlainText is that the result range might not be the closest or includes the position we passed in. 

e.g. we want to search for the second "the" in "the car is the fastest in the world" at offset 12 (at "h" of the second "the"), findPlainText might return the range of the first or third "the" depending on the range and direction we passed in.

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170125/2b340fa9/attachment.html>

More information about the webkit-unassigned mailing list