Fixed bugs with finding line boundaries using IA2 get_textAtOffset and AXPosition::AtStartOfLine.

1. AXPosition can handle offsets at the end of text, so no need to do "--offset" in get_textAtOffset when offset == text length.
2. The end boundary should be found based on the start boundary, not based on the original offset to error-out for situations when both the start and end boundaries are before the original offset.
3. AXPosition::AtStartOfLine should report |true| for text positions that are right after a newline when that newline is before some text. This is because visually the position is at the start of a new line. In practice this situation only occurs at the end of a text field.
4. COM return values should be set to defaults (0 and nullptr) when the operation fails.
BUG=725629
R=dmazzoni@chromium.org
CC=aleventhal@chromium.org
TESTED=manually with Jaws, unit tests

Review-Url: https://codereview.chromium.org/2897163002
Cr-Commit-Position: refs/heads/master@{#474861}
4 files changed