• Nektarios Paisios's avatar
    Implements AXLineForTextMarker and corrects the implementation of... · 9c2f1b4b
    Nektarios Paisios authored
    Implements AXLineForTextMarker and corrects the implementation of AXTextMarkerRangeForLine and insertionPointLineNumber
    
    1. NSAccessibilityLineForTextMarker should return the line number within the object
    it is called on where the given text marker is located.
    
    2. NSAccessibilityTextMarkerRangeForLineParameterizedAttribute was not implemented correctly.
    It should return a text marker range spanning the given line within
    the object it is called on.
    It doesn't receive a text marker as a parameter but an integer representing the
    line number.
    
    3. Per Safari, "insertionPointLineNumber" should return nil when the selection is not collapsed
    or when called on an object that does not contain the caret.
    
    4. Took the opportunity to re-write the line calculation logic using C++ algorithms
    and switch away from using the deprecated sel_start and sel_end attributes.
    
    R=dmazzoni@chromium.org
    
    Bug: 990931
    Change-Id: I96d7aaf56c1603c13f58827bb58b8bf467d91994
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1812100Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
    Commit-Queue: Nektarios Paisios <nektar@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#699334}
    9c2f1b4b
ax_range_unittest.cc 57.5 KB