<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - AX: Add a boundary value to AXTextStateChangeType"
   href="https://bugs.webkit.org/show_bug.cgi?id=153085#c30">Comment # 30</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - AX: Add a boundary value to AXTextStateChangeType"
   href="https://bugs.webkit.org/show_bug.cgi?id=153085">bug 153085</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=153085#c29">comment #29</a>)
<span class="quote">&gt; Comment on <span class=""><a href="attachment.cgi?id=269085&amp;action=diff" name="attach_269085" title="Patch">attachment 269085</a> <a href="attachment.cgi?id=269085&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=269085&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=269085&amp;action=review</a>
&gt; 
&gt; Generally looks good. I am concerned about this new VisiblePosition feature.
&gt; Maybe this is the best way to do it, though. Did you consult with other
&gt; WebKit editing code experts on the best way?
&gt; 
&gt; Also need some help from a Windows expert on figuring out why Windows bot
&gt; failed to build.
&gt; 
&gt; review- because we at least want to make the &quot;explicit&quot; change and to get
&gt; Windows building</span >

I sent the patch to Brent Fulgham hoping for some help on this, but haven't heard back yet.

<span class="quote">&gt; 
&gt; &gt; Source/WebCore/accessibility/mac/AXObjectCacheMac.mm:385
&gt; &gt; +            if (intent.selection.focusChange)
&gt; &gt; +                [userInfo setObject:&#64;(intent.selection.focusChange) forKey:NSAccessibilityTextSelectionChangedFocus];
&gt; 
&gt; Does moving this here fix a bug? If so, do is that fix covered by a test
&gt; case?</span >

There's not a known bug related to this, but I noticed that in it's previous location intent.selection.focusChange wasn't guaranteed to be initialized so I moved it up. I can submit it in it's own patch if you'd like me to.

<span class="quote">&gt; 
&gt; &gt; Source/WebCore/editing/FrameSelection.cpp:1110
&gt; &gt; +        // FIXME: BIDI
&gt; 
&gt; Would be nice to write a more specific FIXME. I think I know what you are
&gt; driving at, but explicitly stating it is nicer for other programmers who
&gt; show up later.</span >

Will do.

<span class="quote">&gt; 
&gt; &gt; Source/WebCore/editing/FrameSelection.cpp:1117
&gt; &gt; +        // FIXME: BIDI
&gt; 
&gt; Ditto.
&gt; 
&gt; &gt; Source/WebCore/editing/FrameSelection.cpp:1130
&gt; &gt; +    case SentenceBoundary: // FIXME: Boundary should effect direction
&gt; 
&gt; Grammar error. We mean &quot;should affect&quot; not &quot;should effect&quot;. Also should put
&gt; a period; we use a sort of sentence style on these comments and call for a
&gt; period.</span >

Will do.

<span class="quote">&gt; 
&gt; &gt; Source/WebCore/editing/FrameSelection.cpp:1137
&gt; &gt; +    case ParagraphBoundary: // FIXME: Boundary should effect direction
&gt; 
&gt; Ditto.
&gt; 
&gt; &gt; Source/WebCore/editing/FrameSelection.cpp:1141
&gt; &gt; +    case DocumentBoundary: // FIXME: Boundary should effect direction
&gt; 
&gt; Ditto.
&gt; 
&gt; &gt; Source/WebCore/editing/FrameSelection.cpp:1224
&gt; &gt; +        notifyAccessibilityForSelectionChange((AXTextStateChangeIntent) { AXTextStateChangeTypeSelectionBoundary, textSelectionWithDirectionAndGranularity(direction, granularity) });
&gt; 
&gt; Shouldn’t need parentheses around (AXTextStateChangeIntent). Maybe you did
&gt; that to quiet the mistaken complaint from the style checker?</span >

I'll remove them.

<span class="quote">&gt; 
&gt; &gt; Source/WebCore/editing/VisiblePosition.h:53
&gt; &gt; +    static VisiblePosition boundaryVisiblePosition();
&gt; 
&gt; I’m unclear on how this is intended to be used. We need a comment explaining
&gt; this since it’s not an obvious concept.</span >

I'll add one.

<span class="quote">&gt; 
&gt; &gt; Source/WebCore/editing/VisiblePosition.h:116
&gt; &gt; +    VisiblePosition(bool boundary) : m_affinity(VP_DEFAULT_AFFINITY), m_isBoundary(boundary) { };
&gt; 
&gt; Should qualify this with &quot;explicit&quot; so code inside VisiblePosition can’t
&gt; make the mistake of returning a boolean and have it automatically turned
&gt; into a VisiblePosition.</span >

Will do.

<span class="quote">&gt; 
&gt; &gt; Source/WebCore/editing/VisiblePosition.h:125
&gt; &gt;      Position m_deepPosition;
&gt; &gt;      EAffinity m_affinity;
&gt; &gt; +    bool m_isBoundary = false;
&gt; 
&gt; I think it’s dangerous that now we have a type of VisiblePosition that won’t
&gt; survive a round trop if broken into position and affinity and then made into
&gt; a VIsiblePosition again. Do we have other options here rather than adding
&gt; this state to VisiblePosition?</span >

We could thread error state through the modifyMovingX logic to return why the VisiblePosition it's returning is NULL. It would mean touching a lot more code though.</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>