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

Issue 23332004: Trigger spell check/remove markers if spell checker gets enabled/disabled. (Closed)

Created:
7 years, 4 months ago by pstanek
Modified:
7 years, 4 months ago
CC:
blink-reviews, dglazkov+blink, eae+blinkwatch
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Trigger 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+322 lines, -23 lines) Patch
A LayoutTests/editing/spelling/spellcheck-disable-enable.html View 1 chunk +64 lines, -0 lines 0 comments Download
A LayoutTests/editing/spelling/spellcheck-disable-enable-expected.txt View 1 chunk +15 lines, -0 lines 0 comments Download
A LayoutTests/editing/spelling/spelling-huge-text.html View 1 chunk +67 lines, -0 lines 0 comments Download
A LayoutTests/editing/spelling/spelling-huge-text-expected.txt View 1 chunk +10 lines, -0 lines 0 comments Download
A LayoutTests/editing/spelling/spelling-huge-text-sync.html View 1 chunk +67 lines, -0 lines 0 comments Download
A LayoutTests/editing/spelling/spelling-huge-text-sync-expected.txt View 1 chunk +10 lines, -0 lines 0 comments Download
M Source/core/editing/Editor.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/editing/Editor.cpp View 1 2 2 chunks +40 lines, -11 lines 0 comments Download
M Source/core/editing/SpellCheckRequester.h View 2 chunks +5 lines, -2 lines 0 comments Download
M Source/core/editing/SpellCheckRequester.cpp View 4 chunks +21 lines, -8 lines 0 comments Download
M Source/web/EditorClientImpl.cpp View 2 chunks +21 lines, -2 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
pstanek
21130005 reload as it was reverted due to performance regression. Let's try this, then
7 years, 4 months ago (2013-08-19 19:29:04 UTC) #1
tony
The change description should make it clear what is different from the previous patch.
7 years, 4 months ago (2013-08-19 19:51:54 UTC) #2
pstanek
On 2013/08/19 19:51:54, tony wrote: > The change description should make it clear what is ...
7 years, 4 months ago (2013-08-19 19:54:09 UTC) #3
pstanek
On 2013/08/19 19:54:09, pstanek wrote: > On 2013/08/19 19:51:54, tony wrote: > > The change ...
7 years, 4 months ago (2013-08-19 19:54:28 UTC) #4
tony
https://codereview.chromium.org/23332004/diff/1/Source/core/editing/Editor.cpp File Source/core/editing/Editor.cpp (right): https://codereview.chromium.org/23332004/diff/1/Source/core/editing/Editor.cpp#newcode1494 Source/core/editing/Editor.cpp:1494: if (kNumChunksToCheck > 1 || !asynchronous) { Having if ...
7 years, 4 months ago (2013-08-19 20:01:15 UTC) #5
pstanek
On 2013/08/19 20:01:15, tony wrote: > https://codereview.chromium.org/23332004/diff/1/Source/core/editing/Editor.cpp > File Source/core/editing/Editor.cpp (right): > > https://codereview.chromium.org/23332004/diff/1/Source/core/editing/Editor.cpp#newcode1494 > ...
7 years, 4 months ago (2013-08-19 21:22:00 UTC) #6
tony
LGTM https://codereview.chromium.org/23332004/diff/9001/Source/core/editing/Editor.cpp File Source/core/editing/Editor.cpp (right): https://codereview.chromium.org/23332004/diff/9001/Source/core/editing/Editor.cpp#newcode1494 Source/core/editing/Editor.cpp:1494: markAllMisspellingsAndBadGrammarInRanges(textCheckingOptions, checkRange.get(), paragraphRange.get(), true, 0); Nit: true -> ...
7 years, 4 months ago (2013-08-19 21:50:01 UTC) #7
tony
Please edit the change description to say what is different from the previous patch. E.g., ...
7 years, 4 months ago (2013-08-19 21:51:58 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pstanek@opera.com/23332004/15001
7 years, 4 months ago (2013-08-20 06:49:42 UTC) #9
commit-bot: I haz the power
Step "update" is always a major failure. Look at the try server FAQ for more ...
7 years, 4 months ago (2013-08-20 07:02:27 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pstanek@opera.com/23332004/15001
7 years, 4 months ago (2013-08-20 07:15:19 UTC) #11
commit-bot: I haz the power
Step "update" is always a major failure. Look at the try server FAQ for more ...
7 years, 4 months ago (2013-08-20 07:21:15 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pstanek@opera.com/23332004/15001
7 years, 4 months ago (2013-08-20 07:25:52 UTC) #13
commit-bot: I haz the power
Step "update" is always a major failure. Look at the try server FAQ for more ...
7 years, 4 months ago (2013-08-20 07:35:54 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pstanek@opera.com/23332004/15001
7 years, 4 months ago (2013-08-20 07:39:54 UTC) #15
commit-bot: I haz the power
7 years, 4 months ago (2013-08-20 09:01:21 UTC) #16
Message was sent while issue was closed.
Change committed as 156378

Powered by Google App Engine
This is Rietveld 408576698