<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#c27">Comment # 27</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:darin&#64;apple.com" title="Darin Adler &lt;darin&#64;apple.com&gt;"> <span class="fn">Darin Adler</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=300061&amp;action=diff" name="attach_300061" title="patch">attachment 300061</a> <a href="attachment.cgi?id=300061&amp;action=edit" title="patch">[details]</a></span>
patch

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=300061&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=300061&amp;action=review</a>

<span class="quote">&gt; Source/WebCore/dom/Range.h:128
&gt; +    WEBCORE_EXPORT int collectSelectionRectsWithoutUnionInteriorLines(Vector&lt;SelectionRect&gt;&amp;);</span >

Seems like line number should be unsigned rather than int.

<span class="quote">&gt; Source/WebCore/editing/TextIterator.cpp:2681
&gt; +static Ref&lt;Range&gt; findPlainTextMatchesInRange(const Range&amp; range, const String&amp; target, FindOptions options, size_t&amp; matchStart, size_t&amp; matchLength, const std::function&lt;bool(size_t, size_t)&gt;&amp; matches)</span >

I find the design of this function quite peculiar and not straightforward as it should be. The idea that the function’s job is to fill in the two values, matchStart and matchLength, as a side effect, is super-strange. Can we find a more straightforward design pattern?

<span class="quote">&gt; Source/WebCore/editing/TextIterator.cpp:2704
&gt; +    auto result = std::pair&lt;size_t, size_t&gt; { matchStart, matchLength };</span >

What’s the point of putting this into a pair, since we just break the pair apart below?</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>