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

Issue 2273453003: Stop SpellChecker::chunkAndMarkAllMisspellingsAndBadGrammar from using TextCheckingParagrah (Closed)

Created:
4 years, 4 months ago by Xiaocheng
Modified:
4 years, 3 months ago
Reviewers:
yosin_UTC9
CC:
blink-reviews, chromium-reviews, groby+blinkspell_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@RemoveSCRDoubleCheck
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Stop SpellChecker::chunkAndMarkAllMisspellingsAndBadGrammar from using TextCheckingParagrah SpellChecker::chunkAndMarkAllMisspellingsAndBadGrammar() does not really need a TextCheckingParagraph as its parameter; an EphemeralRange of text to check is sufficient. Hence, this patch changes its parameter from a TextCheckingParagraph to an EphemeralRange, simplifying code and improving performance by eliminating the overhead for finding the paragraph containing the text to be checked. BUG=n/a TEST=n/a; no visible change Committed: https://crrev.com/41165826c11cc0b7f1457b4c455d7e2eb2de0819 Cr-Commit-Position: refs/heads/master@{#414328}

Patch Set 1 #

Patch Set 2 : Rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -19 lines) Patch
M third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp View 2 chunks +15 lines, -18 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 24 (14 generated)
Xiaocheng
PTAL.
4 years, 4 months ago (2016-08-25 01:23:15 UTC) #12
yosin_UTC9
lgtm What's a wonderful change! Nice finding! (^_^)b
4 years, 4 months ago (2016-08-25 01:32:56 UTC) #14
Xiaocheng
On 2016/08/25 at 01:32:56, yosin wrote: > lgtm > > What's a wonderful change! Nice ...
4 years, 4 months ago (2016-08-25 01:55:57 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2273453003/20001
4 years, 4 months ago (2016-08-25 04:00:51 UTC) #17
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 4 months ago (2016-08-25 05:39:54 UTC) #18
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/41165826c11cc0b7f1457b4c455d7e2eb2de0819 Cr-Commit-Position: refs/heads/master@{#414328}
4 years, 4 months ago (2016-08-25 05:42:21 UTC) #20
groby-ooo-7-16
On 2016/08/25 01:55:57, Xiaocheng wrote: > On 2016/08/25 at 01:32:56, yosin wrote: > > lgtm ...
4 years, 3 months ago (2016-08-25 14:28:43 UTC) #21
Xiaocheng
On 2016/08/25 at 14:28:43, groby wrote: > On 2016/08/25 01:55:57, Xiaocheng wrote: > > On ...
4 years, 3 months ago (2016-08-26 01:29:47 UTC) #22
groby-ooo-7-16
On 2016/08/26 01:29:47, Xiaocheng wrote: > On 2016/08/25 at 14:28:43, groby wrote: > > On ...
4 years, 3 months ago (2016-08-26 01:44:40 UTC) #23
Xiaocheng
4 years, 3 months ago (2016-08-26 01:51:41 UTC) #24
Message was sent while issue was closed.
On 2016/08/26 at 01:44:40, groby wrote:
> On 2016/08/26 01:29:47, Xiaocheng wrote:
> > On 2016/08/25 at 14:28:43, groby wrote:
> > > On 2016/08/25 01:55:57, Xiaocheng wrote:
> > > > On 2016/08/25 at 01:32:56, yosin wrote:
> > > > > lgtm
> > > > > 
> > > > > What's a wonderful change! Nice finding! (^_^)b
> > > > 
> > > > In retrospect, why are we tuning the text range by
word/sentence/paragraph
> > > > boundaries before creating a SpellCheckRequest? If we do as what this
patch
> > > > does, we are already dumping everything in the root editable element
into
> > the
> > > > request in most cases (when the text is short), making the previous
tuning
> > > > useless (unless the full text range is super long).
> > > > 
> > > > Or maybe we should make the check |if (fullTextLength <= kChunkSize)|
prior
> > to
> > > > all the tuning?
> > > 
> > > "The full range is super-long" is unfortunately a fairly common use case.
> > People copy/paste what seems entire novels, which can cause significant UI
jank.
> > 
> > 
> > Yeah, but editing to short text has to be the most common use case. And this
> > patch shouldn't change anything when pasting long text.
> > 
> > > 
> > > And a question, since I'm not too familiar with the Blink code: Doesn't
this
> > patch lose us the fact checks are extended to sentence boundaries? (That's a
> > somewhat relevant feature for server-side checking, which relies on context)
> > 
> > It should still keep passing full sentences. There are two cases:
> > - When the full text in the root editable element is short, the full text is
> > checked, which is fine;
> > - When the full text is long, we are chunking the checking range, extend
each
> > chunk to sentence boundaries and check each extended chunk, which is still
fine.
> 
> Thank you for the explanation!

... and this patch is going to be reverted due to crbug.com/641083.

After a discussion with yosin@, we think there's enough refactoring and local
optimization to the existing spell checker. We should start working on the idle
time spell checker.

Powered by Google App Engine
This is Rietveld 408576698