• Aaron Leventhal's avatar
    Useful result for IAText get_characterExtents() in empty textfield · 7565b09d
    Aaron Leventhal authored
    Products like ZoomText use get_characterExtents with the special IA2_TEXT_OFFSET_CARET to get the
    bounds of the character with the caret. Sometimes this results in getting the bounds for the
    null character at the end of an editable textfield's text. In this case, get_characterExtents()
    should return what the caret bounds would be if placed there.
    
    In order to make this work, we can use the bounds of the anonymous inner editor element within
    a textfield, and collapse it to the width of the caret. Normally this is exposed, but in the
    case of an empty textfield, we were ignoring it.
    
    This CL also adds a lot more tests for different kinds of empty fields. The plan is to move
    the character extents implementation into the ui/accessibility code so that the automation
    API support can leverage it.
    
    Bug: 869985
    
    Change-Id: I907a9df834f88aa9bf536e4dbbc9432e33d31202
    Reviewed-on: https://chromium-review.googlesource.com/c/1255203
    Commit-Queue: Aaron Leventhal <aleventhal@chromium.org>
    Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#596513}
    7565b09d
aria-readonly-expected-blink.txt 1.54 KB