Have atk_text_set_caret_offset focus focusable ancestors

Instead of simply looking at the parent node and the child node when
deciding whether to set focus or set the sequential navigation starting
point, look at the node and all ancestor nodes inside the same document.

Bug: 974108
Change-Id: I2cbf6b0f338910f7f7cfa88227be64da2841ed69
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1728567
Reviewed-by: Joanmarie Diggs <jdiggs@igalia.com>
Commit-Queue: Martin Robinson <mrobinson@igalia.com>
Cr-Commit-Position: refs/heads/master@{#688102}
3 files changed