Avoid CachedTextInputInfo::GetPlainTextRange() to crash
This patch changes |CachedTextInputInfo::GetPlainTextRange()| to return empty |PlainTextRange| when passed range is outside of cached text to avoid crash when selection moved during IME text composition. This case is happend with following scenario: 1. Start IME text composition 2. Move selection to another content editable 3. |InputMethodController::TextInputInfo()| in |FrameSelection::SetSelection()|. 4. |InputMethodController::WillChangeFocus()| is called to clear IME text composition from |FocusController|. Bug: 1157910, 1161562 Change-Id: I38ed328558a572388d9e715dd6f6cae481b868e3 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2626624 Commit-Queue: Koji Ishii <kojii@chromium.org> Auto-Submit: Yoshifumi Inoue <yosin@chromium.org> Reviewed-by:Koji Ishii <kojii@chromium.org> Cr-Commit-Position: refs/heads/master@{#842934}
Showing
Please register or sign in to comment