[Webkit-unassigned] [Bug 155532] Provide NSSpellChecker spellChecking methods with the current insertion point

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 16 16:06:31 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=155532

--- Comment #9 from Beth Dakin <bdakin at apple.com> ---
(In reply to comment #8)
> Comment on attachment 274216 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=274216&action=review
> 
> >> 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?
> 

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

> > 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?
> 

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

> > Source/WebKit2/UIProcess/mac/TextCheckerMac.mm:301
> > +    options = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithUnsignedInteger:insertionPoint], NSTextCheckingInsertionPointKey, nil];
> 
> You should use literals here: @{} etc.
> 

Okay!

> > Source/WebKit2/UIProcess/mac/TextCheckerMac.mm:440
> > +    options = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithUnsignedInteger:insertionPoint], NSTextCheckingInsertionPointKey, nil];
> 
> Literals.
> 

Will fix.

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

Will fix.

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

Will fix.

> > 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?

Hmm, I'm not sure I follow. How would this help?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160316/1e772771/attachment-0001.html>


More information about the webkit-unassigned mailing list