Don't move out of editing host when adjusting caret move result for editing boundaries

https://codereview.chromium.org/2250133004 introduced a regression that
editing boundary adjustment may move the result position out of the
editing host. This patch fixes it.

Bug: 936613
Change-Id: If07d33df991635291672370fe8a89fc3a35520da
Reviewed-on: https://chromium-review.googlesource.com/c/1493391
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#636487}
2 files changed