Fixes line navigation when line boundary positions are ignored

The impotous for this patch is a bug on the Mac whereby line navigation doesn't work
in certain situations, i.e. when the line braking object is ignored.
On Windows, this bug has not yet been reported because ignored line breaking objects
are usually at the end of lines, not at the start, and Windows always reads from the start of the current
line to the start of the next one.

This patch:
1. ensures that AXPositions returned from methods that move to next or
previous boundaries of a specific type always return unignored positions.
2. Makes the logic that finds the next or the previous unignored position work
in BrowserAccessibilityPosition, especially since BrowserAccessibilityPosition is used on the Mac.
3. Changes the IsIgnored logic and unifies it under one method:
A) A position is ignored only if its anchor is ignored, or in the case of a tree position,
the child pointed to by the position is ignored, or in the case of a text position,
the leaf text position is ignored.
B) Removes the logic that checks if the ancestry chain doesn't include an ignored node.
Since Ignored nodes are removed from the platform tree, but all their descendants are not,
this logic doesn't seem to be needed.
4. Fixes AXTree::GetUnignoredSelection to properly handle tree positions, if an ignored selection
endpoint is represented by a tree position. In this case, the resulting unignored selection endpoint
should also be a tree position.

[email protected], [email protected]

Bug: 1015408
Change-Id: Ie41cbed7609249155ba12096c5c28ed4234f7e87
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1867610
Commit-Queue: Nektarios Paisios <[email protected]>
Reviewed-by: Aaron Leventhal <[email protected]>
Reviewed-by: Adam Ettenberger <[email protected]>
Cr-Commit-Position: refs/heads/master@{#723211}
12 files changed