<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - AX: WKContentView needs to implement UITextInput methods to make speak selection highlighting work"
href="https://bugs.webkit.org/show_bug.cgi?id=166955#c13">Comment # 13</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - AX: WKContentView needs to implement UITextInput methods to make speak selection highlighting work"
href="https://bugs.webkit.org/show_bug.cgi?id=166955">bug 166955</a>
from <span class="vcard"><a class="email" href="mailto:n_wang@apple.com" title="Nan Wang <n_wang@apple.com>"> <span class="fn">Nan Wang</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=299684&action=diff" name="attach_299684" title="patch">attachment 299684</a> <a href="attachment.cgi?id=299684&action=edit" title="patch">[details]</a></span>
patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=299684&action=review">https://bugs.webkit.org/attachment.cgi?id=299684&action=review</a>
<span class="quote">>> 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.</span >
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.</pre>
</div>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - AX: WKContentView needs to implement UITextInput methods to make speak selection highlighting work"
href="https://bugs.webkit.org/show_bug.cgi?id=166955#c12">Comment # 12</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - AX: WKContentView needs to implement UITextInput methods to make speak selection highlighting work"
href="https://bugs.webkit.org/show_bug.cgi?id=166955">bug 166955</a>
from <span class="vcard"><a class="email" href="mailto:n_wang@apple.com" title="Nan Wang <n_wang@apple.com>"> <span class="fn">Nan Wang</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=299684&action=diff" name="attach_299684" title="patch">attachment 299684</a> <a href="attachment.cgi?id=299684&action=edit" title="patch">[details]</a></span>
patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=299684&action=review">https://bugs.webkit.org/attachment.cgi?id=299684&action=review</a>
<span class="quote">>> 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.</span >
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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>