Update Move to match the spec

As per the spec, "If the text range cannot be moved as far as the
requested number of text units, but can be moved by a smaller number of
text units, the text range should be moved by the smaller number of text
units and pRetVal should be set to the number of text units moved
successfully."
(https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationcore/nf-uiautomationcore-itextrangeprovider-move)

Currently, regarding the case discussed above, ITextRangeProvider::Move
will not move the range forward, even if it can move a smaller number
of units. This change updates this logic to more closely match the spec.

This change relies on the following two changes as they affect the
behavior of ITextRangeProvider::MoveEndpointByUnit() at the beginning
and end of a document for various text unit types.
https://chromium-review.googlesource.com/c/chromium/src/+/1604407
https://chromium-review.googlesource.com/c/chromium/src/+/1612255/2

Bug: 961867
Change-Id: I712ec3206346639fd32a8d64fb620412ce10c4d5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1612406
Commit-Queue: Alison Maher <almaher@microsoft.com>
Reviewed-by: Kurt Catti-Schmidt <kschmi@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#661625}
2 files changed