Fix AXRange::GetAnchors from stopping at empty anchors
1. In order to collect the anchors between the start and end positions of an `AXRange`, an incorrect condition is evaluating if the start of the current anchor is equal to its end position, expecting such case to only be present when we reach the end of the `AXRange`. Such assumption does not hold for anchors of objects invisible to the text representation (such as checkboxes, images, etc.), since the anchor is empty and its start and end positions are the same. Refactoring `AXRange::GetAnchors` to cover such case. 2. Introducing unit tests for `AXRange::GetAnchors`. 3. Adding unit test coverage in `AXPlatformNodeTextRangeProviderTest` for the issue in `GetBoundingRectangles` which led to this bug. Bug: 928948 Change-Id: I73ef429b7fb5043cfb535ce05909ac243b31aef1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1595545 Commit-Queue: Ethan Jimenez <ethavar@microsoft.com> Reviewed-by:Nektarios Paisios <nektar@chromium.org> Cr-Commit-Position: refs/heads/master@{#659701}
Showing
This diff is collapsed.
Please register or sign in to comment