<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:darin&#64;apple.com" title="Darin Adler &lt;darin&#64;apple.com&gt;"> <span class="fn">Darin Adler</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Provide NSSpellChecker spellChecking methods with the current insertion point"
   href="https://bugs.webkit.org/show_bug.cgi?id=155532">bug 155532</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
               &nbsp;
           </td>
           <td>darin&#64;apple.com
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Provide NSSpellChecker spellChecking methods with the current insertion point"
   href="https://bugs.webkit.org/show_bug.cgi?id=155532#c12">Comment # 12</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - 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:darin&#64;apple.com" title="Darin Adler &lt;darin&#64;apple.com&gt;"> <span class="fn">Darin Adler</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=155532#c10">comment #10</a>)
<span class="quote">&gt; That being said, I do not have a great understanding of any architectural
&gt; decisions guiding these WebCore classes. So if you think it's a
&gt; better/cleaner architecture here to stick to the offset, then I would be
&gt; happy to do that. Do you think that's better even if I add some additional
&gt; parameters in the future?</span >

This is really a layering question.

Before this change, these functions were an abstract interface to spell checking that was independent of the DOM. After the change, they are hooks for spell checking that are not independent of the DOM.

I don’t have a strong feeling about which design is better, but I don’t like place we have landed with the division of responsibilities where extracting the text to spell check is a job for the caller, but interpreting the selection position is a job for the spell checking functions. I’d prefer that the work of extracting the text to spell check and the other contextual information needed to correctly check from the DOM was either done entirely by the caller or entirely by the spell checking functions.

This is not an urgent issue but nice to resolve in the longer term. We can talk in person about this at some point.</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>