<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - AX: Selection change as a result of focusing an element should include that information in the intent"
   href="https://bugs.webkit.org/show_bug.cgi?id=146533#c5">Comment # 5</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - AX: Selection change as a result of focusing an element should include that information in the intent"
   href="https://bugs.webkit.org/show_bug.cgi?id=146533">bug 146533</a>
              from <span class="vcard"><a class="email" href="mailto:d_russell&#64;apple.com" title="Doug Russell &lt;d_russell&#64;apple.com&gt;"> <span class="fn">Doug Russell</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=146533#c4">comment #4</a>)
<span class="quote">&gt; Comment on <span class=""><a href="attachment.cgi?id=255970&amp;action=diff" name="attach_255970" title="patch">attachment 255970</a> <a href="attachment.cgi?id=255970&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=255970&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=255970&amp;action=review</a>
&gt; 
&gt; &gt; Source/WebCore/accessibility/AccessibilityRenderObject.cpp:1686
&gt; &gt; +    if (AXObjectCache* cache = axObjectCache())
&gt; 
&gt; i don't think you have to worry about axObjectCache() being nullptr inside
&gt; of an AX object</span >

ok

<span class="quote">&gt; 
&gt; &gt; Source/WebCore/dom/Element.h:325
&gt; &gt; +    static AXTextStateChangeIntent defaultFocusTextStateChangeIntent() { return AXTextStateChangeIntent(AXTextStateChangeTypeSelectionMove, AXTextSelection { AXTextSelectionDirectionDiscontiguous, AXTextSelectionGranularityUnknown, true }); }
&gt; 
&gt; is this one different from the default AXTextStateChangeIntent(); 
&gt; for cases, like
&gt; select(Element::defaultFocusTextStateChangeIntent());
&gt; it would be nice to not have to pass the argument</span >

Yes. The default AXTextStateChangeIntent() is all unknown types and focusChange is false. I could have the default value be Element::defaultFocusTextStateChangeIntent() but that feels dangerous.

<span class="quote">&gt; 
&gt; &gt; Source/WebCore/editing/FrameSelection.cpp:174
&gt; &gt; +    AXTextStateChangeIntent newIntent;
&gt; 
&gt; can we remove the else and just initialize with
&gt; newIntent = intent;</span >

ok

<span class="quote">&gt; 
&gt; &gt; Source/WebCore/html/HTMLTextFormControlElement.h:113
&gt; &gt; +    void restoreCachedSelection(const AXTextStateChangeIntent&amp; = AXTextStateChangeIntent());
&gt; 
&gt; AXTextStateChangeIntent is  looking a bit wordy. Since this is being used
&gt; all over non accessibility code, maybe the name should be changed to
&gt; something like
&gt; 
&gt; TextIntention</span >

Would it be ok to do that in a future patch? I'd like to keep this one small.</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>