<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#c3">Comment # 3</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:cfleizach&#64;apple.com" title="chris fleizach &lt;cfleizach&#64;apple.com&gt;"> <span class="fn">chris fleizach</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=268269&amp;action=diff" name="attach_268269" title="patch">attachment 268269</a> <a href="attachment.cgi?id=268269&amp;action=edit" title="patch">[details]</a></span>
patch

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

<span class="quote">&gt; Source/WebCore/ChangeLog:8
&gt; +        Implemented a way to navigate to previous/next text marker using Range and TextIterator.</span >

can you add a few sentences as to why you're doing this

<span class="quote">&gt; Source/WebCore/accessibility/AXObjectCache.cpp:1431
&gt; +    Node* currNode = nullptr;</span >

currNode -&gt; currentNode

<span class="quote">&gt; Source/WebCore/accessibility/AXObjectCache.cpp:1448
&gt; +                if (preNode)</span >

if (Node* preNode = previousNode(currNode))

<span class="quote">&gt; Source/WebCore/accessibility/AXObjectCache.cpp:1457
&gt; +        int currLen = iterator.text().length();</span >

currLen = currentLength

<span class="quote">&gt; Source/WebCore/accessibility/AXObjectCache.cpp:1469
&gt; +            </span >

extra newline can be removed

<span class="quote">&gt; Source/WebCore/accessibility/AXObjectCache.cpp:1509
&gt; +    RefPtr&lt;Range&gt; range =  Range::create(*document);</span >

too many spaces 

&quot;= Range&quot;

<span class="quote">&gt; Source/WebCore/accessibility/AXObjectCache.cpp:1512
&gt; +    if (ec)</span >

return ec ? nullptr : range;

<span class="quote">&gt; Source/WebCore/accessibility/AXObjectCache.cpp:1626
&gt; +    if (node-&gt;parentNode() &amp;&amp; node-&gt;parentNode()-&gt;renderer() &amp;&amp;  node-&gt;parentNode()-&gt;renderer()-&gt;isBody() &amp;&amp; !node-&gt;previousSibling())</span >

too many spaces between the &amp;&amp;
&quot;node-&gt;parentNode()-&gt;renderer() &amp;&amp;  node-&gt;parentNode()-&gt;renderer()-&gt;isBody()&quot;

<span class="quote">&gt; Source/WebCore/accessibility/AXObjectCache.h:65
&gt; +    CharacterOffset(Node* n, int offset, int remaining)</span >

you might be able to put default values for these parameters and then remove the default constructor
CharacterOffset() { }

--&gt; 
CharacterOffset(Node* n = nullptr, int offset = 0, int remaining = 0)

<span class="quote">&gt; Source/WebCore/accessibility/AccessibilityObject.cpp:724
&gt; +    return AXObjectCache::rangeForNodeContents(node);</span >

seems like you could probably just do

return AXObjectCache::rangeForNodeContents(node());

and then handle the nil case inside rangeForNodeContents

<span class="quote">&gt; Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:790
&gt; +static AccessibilityObject* accessibilityObjectForTextMarker(AXObjectCache* cache, CFTypeRef textMarker)</span >

these methods might be better off inside WebAXObjectWrapperBase so that they can be used by iOS and OSX

<span class="quote">&gt; Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:830
&gt; +- (id)textMarkerForNode:(Node&amp;)node Offset:(int)offset</span >

Offset -&gt; offset

<span class="quote">&gt; LayoutTests/ChangeLog:7
&gt; +</span >

we should add a test for navigation within a user-select:none area</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>