<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - AX: AXObjectCache::visiblePositionForTextMarkerData() doesn't account for equivalent visibly equivalent positions"
   href="https://bugs.webkit.org/show_bug.cgi?id=154366#c8">Comment # 8</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - AX: AXObjectCache::visiblePositionForTextMarkerData() doesn't account for equivalent visibly equivalent positions"
   href="https://bugs.webkit.org/show_bug.cgi?id=154366">bug 154366</a>
              from <span class="vcard"><a class="email" href="mailto:rniwa&#64;webkit.org" title="Ryosuke Niwa &lt;rniwa&#64;webkit.org&gt;"> <span class="fn">Ryosuke Niwa</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=271611&amp;action=diff" name="attach_271611" title="Patch">attachment 271611</a> <a href="attachment.cgi?id=271611&amp;action=edit" title="Patch">[details]</a></span>
Patch

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

<span class="quote">&gt; Source/WebCore/ChangeLog:8
&gt; +        Existing tests coverage should be sufficient.</span >

This is definitely not true.  There are no tests that got fixed by this change and there is no new test in this patch.
Please write a accessibility test that gets affected by this code change,
or a justification as to why writing such a test is hard/impossible.

<span class="quote">&gt;&gt;&gt; Source/WebCore/accessibility/AXObjectCache.cpp:1416
&gt;&gt;&gt; +    return equivalent;
&gt;&gt; 
&gt;&gt; Instead of manually adjusting the visible position's deep equivalent, you should just create a new VisiblePosition out of textMarkerData and check whether they match or not.
&gt;&gt; 
&gt;&gt; By the way, '&amp;' should be directly adjacent to type in C++ code: <a href="https://webkit.org/code-style-guidelines/#pointers-and-references">https://webkit.org/code-style-guidelines/#pointers-and-references</a>
&gt; 
&gt; The VisiblePosition I have was created from the TextMarkerData so it would always match. I was considering making VisiblePosition::canonicalPosition() a public static method instead of this manual adjustment. What do you think of that?</span >

I'd suggest getting rid of this function altogether. Since the only interesting thing VisiblePosition's constructor does is to call canonicalPosition(),
calling canonicalPosition here and comparing the result will be a slightly-incorrect tautological check that doesn't buy us anything.</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>