On Mac returns the previous line when between lines
If the provided text marker is between lines, such as when on a soft line break or on an ignored position that separates lines, we return the previous line when VoiceOver asks for the line text marker range. This is the same to how the WebKit code in Safari works. See webcore/editing/VisibleUnits.cc::endOfLine(VisiblePosition&, LineEndpointComputationMode, bool) in the WebKit source code. Also, this patch temporarily switches to CreateNextLineStartPosition for computing the end of the line range. This should not have any drastic user visible behavior change, but it's important to do until CreatNextLineEndPosition is fixed to handle ignored positions. Failure to introduce this workaround would delay fixing of line navigation in Docs with VoiceOver. R=dmazzoni@chromium.org Bug: 1015408 Change-Id: Ifeb67d4de688fddace461568e064fc9768024fba Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2023277 Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org> Reviewed-by:Dominic Mazzoni <dmazzoni@chromium.org> Cr-Commit-Position: refs/heads/master@{#735945}
Showing
Please register or sign in to comment