<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - AX: richer text change notifications"
   href="https://bugs.webkit.org/show_bug.cgi?id=142719#c110">Comment # 110</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - AX: richer text change notifications"
   href="https://bugs.webkit.org/show_bug.cgi?id=142719">bug 142719</a>
              from <span class="vcard"><a class="email" href="mailto:bfulgham&#64;webkit.org" title="Brent Fulgham &lt;bfulgham&#64;webkit.org&gt;"> <span class="fn">Brent Fulgham</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=251541&amp;action=diff" name="attach_251541" title="Fix windows builds">attachment 251541</a> <a href="attachment.cgi?id=251541&amp;action=edit" title="Fix windows builds">[details]</a></span>
Fix windows builds

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

<span class="quote">&gt; LayoutTests/ChangeLog:8
&gt; +        Richer accessibility value change notifications. Introduce AXTextEditType, postTextStateChangeNotification and postTextReplacementNotification to give assistive tech apps more reliable context for responding to changes in web content. Also implement a mechanism to post value changes in password form fields in coalesced ticks to thwart analyzing the cadence of changes.</span >

Nit: These lines are kind of long. We usually hard-return at around 80 characters or so since many of our tools don't do auto-line-wrap.

<span class="quote">&gt; Source/WebCore/accessibility/AXObjectCache.cpp:872
&gt; +void AXObjectCache::showIntent(const AXTextStateChangeIntent &amp;intent)</span >

Your using objc syntax here. Should be &quot;const AXTextStateChangeIntent&amp; intent)

<span class="quote">&gt; Source/WebCore/accessibility/AXObjectCache.cpp:985
&gt; +void AXObjectCache::setTextSelectionIntent(AXTextStateChangeIntent intent)</span >

Why is this passed by value here, when you pass by reference in the above method? If AXTextStateChangeIntent is non-trivial in size, we should be reference passing it everywhere.

<span class="quote">&gt; Source/WebCore/editing/Editor.cpp:2851
&gt; +void Editor::changeSelectionAfterCommand(const VisibleSelection&amp; newSelection, FrameSelection::SetSelectionOptions options, AXTextStateChangeIntent intent)</span >

Seems like AXTextStateChangeIntent should be passed by reference, since it's an object?

<span class="quote">&gt; Source/WebCore/editing/FrameSelection.cpp:331
&gt; +void FrameSelection::setSelection(const VisibleSelection&amp; selection, SetSelectionOptions options, AXTextStateChangeIntent intent, CursorAlignOnScroll align, TextGranularity granularity)</span >

Seems like AXTextStateChangeIntent should be passed as a reference.

<span class="quote">&gt; Source/WebCore/editing/FrameSelection.cpp:371
&gt; +void FrameSelection::updateAndRevealSelection(AXTextStateChangeIntent intent)</span >

const AXTextStateChangeIntent&amp; ?

<span class="quote">&gt; Source/WebCore/editing/FrameSelection.cpp:1036
&gt; +    AXTextStateChangeIntent intent = AXTextStateChangeIntent();</span >

I think this could just be &quot;AXTextStateChangeIntent intent;&quot;

<span class="quote">&gt; Source/WebCore/editing/FrameSelection.h:148
&gt; +    WEBCORE_EXPORT void setSelection(const VisibleSelection&amp;, SetSelectionOptions = defaultSetSelectionOptions(), AXTextStateChangeIntent = AXTextStateChangeIntent(), CursorAlignOnScroll = AlignCursorOnScrollIfNeeded, TextGranularity = CharacterGranularity);</span >

These AXTextStateChangeIntent seem like they should be references.

<span class="quote">&gt; Source/WebCore/editing/FrameSelection.h:276
&gt; +    void updateAndRevealSelection(AXTextStateChangeIntent = AXTextStateChangeIntent());</span >

Ditto.

<span class="quote">&gt; Source/WebCore/editing/FrameSelection.h:303
&gt; +    void notifyAccessibilityForSelectionChange(AXTextStateChangeIntent = AXTextStateChangeIntent());</span >

Ditto.

<span class="quote">&gt; Source/WebCore/editing/FrameSelection.h:305
&gt; +    void notifyAccessibilityForSelectionChange(AXTextSelectionIntent) { }</span >

Ditto.

<span class="quote">&gt; Source/WebCore/editing/FrameSelection.h:372
&gt; +inline void FrameSelection::notifyAccessibilityForSelectionChange(AXTextStateChangeIntent)</span >

Ditto.

<span class="quote">&gt; Source/WebCore/editing/atk/FrameSelectionAtk.cpp:81
&gt; +void FrameSelection::notifyAccessibilityForSelectionChange(AXTextStateChangeIntent)</span >

const AXTextStateChangeIntent&amp; ?

<span class="quote">&gt; Source/WebCore/editing/mac/FrameSelectionMac.mm:50
&gt; +void FrameSelection::notifyAccessibilityForSelectionChange(AXTextStateChangeIntent intent)</span >

const AXTextStateChangeIntent&amp; ?</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>