Added a method to AXPosition that makes it easier to perform text navigation operations

This patch is 1 of 6 of a larger effort.
The ultimate goal is to remove ui/accessibility/ax_text_utils and replace all its functionality with AXPosition, as well as integrate AXPosition in the chrome.automation API.
1. Implement CreatePositionAtTextBoundary on AXPosition. Move TextDirection from ax_text_utils to ax_text_boundary and rename to AXTextBoundaryDirection.
2. Implement ExpandToEnclosingTextBoundary in AXRange. Create AXRangeExpandBehavior::kLeftFirst,kRightFirst.
3. Remove FindTextBoundary from AXPlatformNodeBase, AXPlatformNodeDelegate, BrowserAccessibility, etc. and re-implement its functionality using AXRange::ExpandToEnclosingTextBoundary. This will unify Win and Linux ATK text navigation in AXPosition and AXRange.
4. Update BrowserAccessibilityCocoa to use AXPosition::CreatePositionAtTextBoundary and AXRange::ExpandToEnclosingTextBoundary. Write extensive tests for all text navigation operations in BrowserAccessibilityCocoa.
5. Expose word boundaries on Views using AXPosition and remove associated functionality from ax_text_utils.
6. Use AXPosition and AXRange to calculate word boundaries in chrome.automation.,

Bug: 992562
Change-Id: I6c6b2c2e2756126cd632840baed699777c88839c
Reviewed-by: Aaron Leventhal <>
Reviewed-by: Kurt Catti-Schmidt <>
Commit-Queue: Nektarios Paisios <>
Cr-Commit-Position: refs/heads/master@{#686806}
20 files changed