<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@apple.com" title="Beth Dakin <bdakin@apple.com>"> <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">> Comment on <span class=""><a href="attachment.cgi?id=274216&action=diff" name="attach_274216" title="Patch">attachment 274216</a> <a href="attachment.cgi?id=274216&action=edit" title="Patch">[details]</a></span>
> Patch
>
> View in context:
> <a href="https://bugs.webkit.org/attachment.cgi?id=274216&action=review">https://bugs.webkit.org/attachment.cgi?id=274216&action=review</a>
>
> >> Source/WebCore/ChangeLog:10
> >> + Pass the Frameâs section to a handful of spelling checking methods that call
> >
> > Frame's selection, not Frame's section
>
> Is there any way to test this? API test perhaps?
> </span >
Hmmmmmm. I don't think so, but I will give this more thought.
<span class="quote">> > Source/WebKit2/UIProcess/TextChecker.h:75
> > + static Vector<WebCore::TextCheckingResult> checkTextOfParagraph(int64_t spellDocumentTag, StringView text, uint64_t insertionPoint, uint64_t checkingTypes);
>
> I find it a bit odd that the insertionPoint is a uint64_t. Does WebCore
> handle 64-bit offsets?
> </span >
I think you're right, and int_32t would be more appropriate here given the underlying WebCore types.
<span class="quote">> > Source/WebKit2/UIProcess/mac/TextCheckerMac.mm:301
> > + options = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithUnsignedInteger:insertionPoint], NSTextCheckingInsertionPointKey, nil];
>
> You should use literals here: @{} etc.
> </span >
Okay!
<span class="quote">> > Source/WebKit2/UIProcess/mac/TextCheckerMac.mm:440
> > + options = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithUnsignedInteger:insertionPoint], NSTextCheckingInsertionPointKey, nil];
>
> Literals.
> </span >
Will fix.
<span class="quote">> > Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm:1066
> > + options = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithUnsignedInteger:insertionPointFromCurrentSelection(currentSelection)], NSTextCheckingInsertionPointKey, nil];
>
> literals.
> </span >
Will fix.
<span class="quote">> > Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm:1112
> > + options = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithUnsignedInteger:insertionPointFromCurrentSelection(currentSelection)], NSTextCheckingInsertionPointKey, nil];
>
> ditto.
> </span >
Will fix.
<span class="quote">> > Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm:1300
> > + options = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithUnsignedInteger:insertionPointFromCurrentSelection(currentSelection)], NSTextCheckingInsertionPointKey, nil];
>
> ditto. Maybe we should just wrap -checkString and -requestCheckingOfString:
> 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>