-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stop ColdModeSpellCheckRequester from repeatedly checking in full
In the original design, ColdModeSpellCheckRequester is responsible for doing spellchecking after the page is idle after a while (>1s) to ensure that we don't miss anything to check in the hot mode. It turns out to be too aggressive because it always checks the content of the editable element in full even after some minor operations (e.g., moving caret), causing significant input delay when the content is large. This patch: - Makes ColdModeSpellCheckRequester memorize the editable elements whose contents have been checked in full, so that when invoked on such an element, it won't do any checking if no text change is detected, or just check a short chunk around the selection for small text changes - We also maintain the accumulated text change delta after fully checking an element. If that exceeds a threshold, we re-allow doing full checking on the element. Bug: 1000616 Fixed: 1326287 Change-Id: I56a48583ed1f63e64e6d313672a0ba1c1052bbd3 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3822635 Reviewed-by: Yoshifumi Inoue <yosin@chromium.org> Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org> Cr-Commit-Position: refs/heads/main@{#1035181}
- Loading branch information
1 parent
7225905
commit 9db6f9c
Showing
9 changed files
with
239 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.