<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <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#c9">Comment # 9</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:bdakin&#64;apple.com" title="Beth Dakin &lt;bdakin&#64;apple.com&gt;"> <span class="fn">Beth Dakin</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=155532#c8">comment #8</a>)
<span class="quote">&gt; 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>
&gt; Patch
&gt; 
&gt; View in context:
&gt; <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>
&gt; 
&gt; &gt;&gt; Source/WebCore/ChangeLog:10
&gt; &gt;&gt; +        Pass the Frame’s section to a handful of spelling checking methods that call 
&gt; &gt; 
&gt; &gt; Frame's selection, not Frame's section
&gt; 
&gt; Is there any way to test this? API test perhaps?
&gt; </span >

Hmmmmmm. I don't think so, but I will give this more thought.

<span class="quote">&gt; &gt; Source/WebKit2/UIProcess/TextChecker.h:75
&gt; &gt; +    static Vector&lt;WebCore::TextCheckingResult&gt; checkTextOfParagraph(int64_t spellDocumentTag, StringView text, uint64_t insertionPoint, uint64_t checkingTypes);
&gt; 
&gt; I find it a bit odd that the insertionPoint is a uint64_t. Does WebCore
&gt; handle 64-bit offsets?
&gt; </span >

I think you're right, and int_32t would be more appropriate here given the underlying WebCore types.

<span class="quote">&gt; &gt; Source/WebKit2/UIProcess/mac/TextCheckerMac.mm:301
&gt; &gt; +    options = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithUnsignedInteger:insertionPoint], NSTextCheckingInsertionPointKey, nil];
&gt; 
&gt; You should use literals here: &#64;{} etc.
&gt; </span >

Okay!

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

Will fix.

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

Will fix.

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

Will fix.

<span class="quote">&gt; &gt; Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm:1300
&gt; &gt; +    options = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithUnsignedInteger:insertionPointFromCurrentSelection(currentSelection)], NSTextCheckingInsertionPointKey, nil];
&gt; 
&gt; ditto. Maybe we should just wrap -checkString and -requestCheckingOfString:
&gt; to avoid the repetition?</span >

Hmm, I'm not sure I follow. How would this help?</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>