The replacementRange argument of -insertText: might be out of the bound
of gfx::Range and trigger a checkfail. Use FromPossiblyInvalidNSRange()
to convert NSRange to gfx::Range safely.
Bug: 1365352
Change-Id: Icf4d03af27a04f5c95c48b0b7e3e4f9c383cfbf7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3918730
Reviewed-by: Leonard Grey <lgrey@chromium.org>
Commit-Queue: Keren Zhu <kerenzhu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1051307}