DescriptionTrigger spell check/remove markers if spell checker gets enabled/disabled.
With this change when spell checker is turned off the misspelling markers
disappear from the document (which is what a user expects and this currently
works in chromium because UI code takes care of that - with this change it may
stop). OTOH if spell checker is turned on again one would expect misspellings
will appear right away - in the currently focused editable at least. This is how
Gecko and Presto behave and this is what this patch does. Note it's not only
about restoring old markers because content might have changed or language might
have been switched. This is why new check is requested. This change may also
come in handy if spell checking language is changed. It would require restarting
spell checker on UI side on language change, though.
Since there might be an awful lot of text in the focused editable when spell
checker gets enabled, spell checking is chunked up. If asynchronous spell
checker is enabled whole text is checked. Otherwise only one chunk is checked
(the default chunk's size is set to 16KB but it might also be slightly bigger
since all chunks are aligned to the sentence boundary).
BUG=264737
This is the second attempt as this patch was integrated but
reverted due to performance regression found by
DOM/textarea-edit.html (issue 274569). This patch optimizes
single chunk case to try to avoid the regression.
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=156378
Patch Set 1 #
Total comments: 1
Patch Set 2 : Reorganization #
Total comments: 1
Patch Set 3 : true=>asynchronous #Messages
Total messages: 16 (0 generated)
|