<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#c10">Comment # 10</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#c7">comment #7</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; Since text checker is defined in terms of string views, not the DOM, seems
&gt; the right architecture would be to convert the selection to offsets within
&gt; the string at the call sites, rather than actually passing the
&gt; VisibleSelection object down. Is there a straightforward way to do it that
&gt; way instead?
&gt; </span >

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