Fix ranges for ITextRangeProvider::GetBoundingRectangles
1. ITextProvider::get_DocumentRange was returning an incorrect range end in some cases. If the node has soft line breaks, then the |start| would be at offset (0) for the first inline text box child of the static text, then end would be the last offset of the first inline child. This is beacuse |start| was a leaf text position, and |end| was based on that value. Calling |CreatePositionAtEndOfAnchor| before normalizing |end| to a leaf text position. Additionally, BrowserAccessibility treats text-only nodes as leaf nodes. Which means, |owner()->GetChildCount()| is (0) for the kStaticText even though it technically has children. 2. AXRange::GetScreenRects normalized the |current_line_start| as a parent position, but not the |current_line_end|. It would then pass incorrect text offsets to |GetRangeBoundsRect|. Normalizing the |current_line_end| as well so the offsets are correct. Bug: 847971 Change-Id: I439ae04d066fc087c9b1f1c14df5bbfc76af53fc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1575107 Commit-Queue: Adam Ettenberger <adettenb@microsoft.com> Reviewed-by:Dominic Mazzoni <dmazzoni@chromium.org> Cr-Commit-Position: refs/heads/master@{#653671}
Showing
Please register or sign in to comment