[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:11:39 PDT 2016


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

--- Comment #10 from Beth Dakin <bdakin at apple.com> ---
(In reply to comment #7)
> Comment on attachment 274216 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=274216&action=review
> 
> Since text checker is defined in terms of string views, not the DOM, seems
> the right architecture would be to convert the selection to offsets within
> the string at the call sites, rather than actually passing the
> VisibleSelection object down. Is there a straightforward way to do it that
> way instead?
> 

I chose to pass a VisibleSelection around WebCore, and then convert it to the offset up in WebKit (we end up passing around the offset on its own in WK2 to get it to the UIProcess) because there has been talk of possibly adding some additional keys to this NSSpellChecker dictionary, and that would cover information that could also be extracted from the VisibleSelection. So I chose to do it this way because I thought it would pave the way for some more straightforward patches in the future.

That being said, I do not have a great understanding of any architectural decisions guiding these WebCore classes. So if you think it's a better/cleaner architecture here to stick to the offset, then I would be happy to do that. Do you think that's better even if I add some additional parameters in the future?

-- 
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/42affbbd/attachment.html>


More information about the webkit-unassigned mailing list