Cleanup AutomationUtil.findNodeUntil, fix wrapping when moving by line
1. AutomationUtil.findNodeUntil isn't entirely clear due to the use of a callback that wants to keep track of the previous node being visited. This has since become wrong because of the changes made to AutomationTreeWalker. Instead, let's just call AutomationUtil.findNextNode which should gibve us the proper linearization. Take pairs in order and apply the predicate. 2. wrapping by line didn't quite work as expected because of the asymmetric nature of the linearization. We need to get to the end when wrapping from the beginning to the end and start applying our predicate. Note that this is subject to some weird corner cases depending on how we write the predicates (e.g. ones that check for children). 3. Ensure we consider invisible nodes to be leaves. They should also be ignored when encountered (this is already done). TEST=navigate around using ChromeVox Next on the shelf. Observe desirable behaviors. Review URL: https://codereview.chromium.org/1622803002 Cr-Commit-Position: refs/heads/master@{#371620}
Showing
Please register or sign in to comment