<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:simon.fraser&#64;apple.com" title="Simon Fraser (smfr) &lt;simon.fraser&#64;apple.com&gt;"> <span class="fn">Simon Fraser (smfr)</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Provide NSSpellChecker spellChecking methods with the current insertion point"
   href="https://bugs.webkit.org/show_bug.cgi?id=155532">bug 155532</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Attachment #274216 Flags</td>
           <td>review?
           </td>
           <td>review+
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Provide NSSpellChecker spellChecking methods with the current insertion point"
   href="https://bugs.webkit.org/show_bug.cgi?id=155532#c8">Comment # 8</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Provide NSSpellChecker spellChecking methods with the current insertion point"
   href="https://bugs.webkit.org/show_bug.cgi?id=155532">bug 155532</a>
              from <span class="vcard"><a class="email" href="mailto:simon.fraser&#64;apple.com" title="Simon Fraser (smfr) &lt;simon.fraser&#64;apple.com&gt;"> <span class="fn">Simon Fraser (smfr)</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=274216&amp;action=diff" name="attach_274216" title="Patch">attachment 274216</a> <a href="attachment.cgi?id=274216&amp;action=edit" title="Patch">[details]</a></span>
Patch

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

<span class="quote">&gt;&gt; Source/WebCore/ChangeLog:10
&gt;&gt; +        Pass the Frame’s section to a handful of spelling checking methods that call 
&gt; 
&gt; Frame's selection, not Frame's section</span >

Is there any way to test this? API test perhaps?

<span class="quote">&gt; Source/WebKit2/UIProcess/TextChecker.h:75
&gt; +    static Vector&lt;WebCore::TextCheckingResult&gt; checkTextOfParagraph(int64_t spellDocumentTag, StringView text, uint64_t insertionPoint, uint64_t checkingTypes);</span >

I find it a bit odd that the insertionPoint is a uint64_t. Does WebCore handle 64-bit offsets?

<span class="quote">&gt; Source/WebKit2/UIProcess/mac/TextCheckerMac.mm:301
&gt; +    options = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithUnsignedInteger:insertionPoint], NSTextCheckingInsertionPointKey, nil];</span >

You should use literals here: &#64;{} etc.

<span class="quote">&gt; Source/WebKit2/UIProcess/mac/TextCheckerMac.mm:440
&gt; +    options = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithUnsignedInteger:insertionPoint], NSTextCheckingInsertionPointKey, nil];</span >

Literals.

<span class="quote">&gt; Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm:1066
&gt; +    options = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithUnsignedInteger:insertionPointFromCurrentSelection(currentSelection)], NSTextCheckingInsertionPointKey, nil];</span >

literals.

<span class="quote">&gt; Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm:1112
&gt; +    options = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithUnsignedInteger:insertionPointFromCurrentSelection(currentSelection)], NSTextCheckingInsertionPointKey, nil];</span >

ditto.

<span class="quote">&gt; Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm:1300
&gt; +    options = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithUnsignedInteger:insertionPointFromCurrentSelection(currentSelection)], NSTextCheckingInsertionPointKey, nil];</span >

ditto. Maybe we should just wrap -checkString and -requestCheckingOfString: to avoid the repetition?</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>