Add out-of-bound range handling for SetCompositionFromExistingText.
We need to reject out-of-bound ranges. Currently setting range that is outside the bounds of the text buffer in views::Textfield crashes, as Textfield uses RenderText to store the text buffer and RenderText will crash if the range is outside of the cached text buffer. Hence, we change views::Textfield::SetCompositionFromExistingText to clear the composition when the provided range is out-of-bound. Bug: 966484 Change-Id: I770457a1290ca4466b21779264e967789cbb80f6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1754498 Commit-Queue: Siye Liu <siliu@microsoft.com> Reviewed-by:Michael Wasserman <msw@chromium.org> Cr-Commit-Position: refs/heads/master@{#688216}
Showing
Please register or sign in to comment