<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - AX: [Mac] Implement next/previous text marker functions using TextIterator"
   href="https://bugs.webkit.org/show_bug.cgi?id=152728#c10">Comment # 10</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - AX: [Mac] Implement next/previous text marker functions using TextIterator"
   href="https://bugs.webkit.org/show_bug.cgi?id=152728">bug 152728</a>
              from <span class="vcard"><a class="email" href="mailto:n_wang&#64;apple.com" title="Nan Wang &lt;n_wang&#64;apple.com&gt;"> <span class="fn">Nan Wang</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=268922&amp;action=diff" name="attach_268922" title="patch">attachment 268922</a> <a href="attachment.cgi?id=268922&amp;action=edit" title="patch">[details]</a></span>
patch

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=268922&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=268922&amp;action=review</a>

I'll address other comments.

<span class="quote">&gt;&gt; Source/WebCore/accessibility/AXObjectCache.h:55
&gt;&gt; +    int characterOffset;
&gt; 
&gt; what is startIndex and what is ignored used for?</span >

In the range of a text node's content, the start offset is not always 0. So I used (startIndex + character count) to set the correct start offset when creating a range from text marker range.
Ignored is used here for password field, so we can skip that when calling next/previous text marker call.

<span class="quote">&gt;&gt; Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:847
&gt;&gt; +    if (isTextMarkerIgnored(textMarker))
&gt; 
&gt; doesn't this need to be in a while loop</span >

I'm calling nextTextMarkerForNode:, not textMarkerForNode:. So it's recursive.

<span class="quote">&gt;&gt; Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:856
&gt;&gt; +    if (isTextMarkerIgnored(textMarker))
&gt; 
&gt; doesn't this need to be in a while loop</span >

ditto.

<span class="quote">&gt;&gt; Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:877
&gt;&gt; +    if (!textMarkerData.axID &amp;&amp; !textMarkerData.ignored)
&gt; 
&gt; can we use axID = 0 to mean ignored?</span >

We also return an empty TextMarkerData when node is nullptr. In that case we want to return nil for the text marker. For example we get to the end of document that we can't ignore it and keep going forward. But here for password filed, we want to treat it differently, so that we know the node exists and there might be nodes after it.</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>