Commit 1653062c authored by timvolodine's avatar timvolodine Committed by Commit bot

[Android][Mac] Enable spellcheck caching on Android and Mac platforms.

This patch enables caching of spellcheck results to improve performance
and address issues mentioned below.

In its current state i.e. without caching spellcheck on Android and Mac
has a number of issues e.g.:
- selection (click) of words or movement of the caret can result
in unnecessary calls to the platform spellchecker.
- typing of non-word characters in the end results in unnecessary
calls to the platform spellchecker.
- modifying text does not always result in invocation of spellchecker,
hence not showing the misspelled words.

BUG=583616, 629609

Review-Url: https://codereview.chromium.org/2317113004
Cr-Commit-Position: refs/heads/master@{#418631}
parent a8197bd2
......@@ -260,9 +260,9 @@ void SpellCheckProvider::OnRespondTextCheck(
&textcheck_results);
completion->didFinishCheckingText(textcheck_results);
// TODO(groby): Add request caching once OSX reports back original request.
// (cf. SpellCheckProvider::OnRespondSpellingService)
// Cache the request and the converted results.
last_request_ = line;
last_results_.swap(textcheck_results);
}
void SpellCheckProvider::OnToggleSpellPanel(bool is_currently_visible) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment