Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(813)

Unified Diff: components/spellcheck/renderer/spellcheck_provider.cc

Issue 2494123002: Spellcheck : Fix caching in cases where text is deleted. (Closed)
Patch Set: rebase + fix year Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/spellcheck/renderer/BUILD.gn ('k') | components/spellcheck/renderer/spellcheck_provider_test.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/spellcheck/renderer/spellcheck_provider.cc
diff --git a/components/spellcheck/renderer/spellcheck_provider.cc b/components/spellcheck/renderer/spellcheck_provider.cc
index bd91fc57664670af07885ea74db512df75b5baa7..097d0c965683cfd6a8902033f879f1213a9e998d 100644
--- a/components/spellcheck/renderer/spellcheck_provider.cc
+++ b/components/spellcheck/renderer/spellcheck_provider.cc
@@ -330,17 +330,10 @@ bool SpellCheckProvider::SatisfyRequestFromCache(
if (start <= text_length && end <= text_length)
++result_size;
}
- if (result_size > 0) {
- blink::WebVector<blink::WebTextCheckingResult> results(result_size);
- for (size_t i = 0; i < result_size; ++i) {
- results[i].decoration = last_results_[i].decoration;
- results[i].location = last_results_[i].location;
- results[i].length = last_results_[i].length;
- results[i].replacement = last_results_[i].replacement;
- }
- completion->didFinishCheckingText(results);
- return true;
- }
+ blink::WebVector<blink::WebTextCheckingResult> results(last_results_.data(),
+ result_size);
+ completion->didFinishCheckingText(results);
+ return true;
}
return false;
« no previous file with comments | « components/spellcheck/renderer/BUILD.gn ('k') | components/spellcheck/renderer/spellcheck_provider_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698