[Spellchecker] Handles nested editables correctly in cold mode checker
When the currently focused editable element is nested in an uneditable element (see the new layout test in this CL as an example), cold mode spellchecker may create invalid checking ranges: - the range starts at the end position of the last sentence - the range ends at the last position in the focused editable element - when the editable element is nested in uneditable element, a reversed range is created This patch fixes the issue by using the highest root editable as the element to check, so that all sentences are within the element. To ensure that uneditable nodes in the highest root are not marked, this patch also modifies SpellChecker::IsSpellCheckingEnabledAt() to return false on uneditable nodes. Bug: 848026 Change-Id: I26d9852ffc66aad150cf3856fd402fc31e3ad3a0 Reviewed-on: https://chromium-review.googlesource.com/1080215Reviewed-by:Yoshifumi Inoue <yosin@chromium.org> Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org> Cr-Commit-Position: refs/heads/master@{#563159}
Showing
Please register or sign in to comment