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

Issue 21694005: Spell check whole content of an editable element when it gets focused. (Closed)

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

Description

Spell check whole content of an editable element when it gets focused. This is how Gecko and Presto behave. Without this patch Blink spell checks an editable after moving the caret/unfocusing the editable but the check spans only the line the caret was previously at (possibly plus 1-2 lines around). Textareas and contenteditables are only spell checked on first focus. BUG=264730 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=156583

Patch Set 1 #

Total comments: 5

Patch Set 2 : Rebase & review comments. #

Total comments: 2

Patch Set 3 : async test added. Sync suffixed with -sync #

Total comments: 7

Patch Set 4 : Review comments #

Patch Set 5 : Changed the hash set to a bit in Node. #

Patch Set 6 : change alerts to logs (tests) #

Total comments: 2

Patch Set 7 : style & spurious comment removal. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+289 lines, -21 lines) Patch
M LayoutTests/editing/spelling/focusing-other-frame.html View 1 2 3 4 5 2 chunks +3 lines, -1 line 0 comments Download
M LayoutTests/editing/spelling/markers-input-type-text.html View 1 2 3 4 5 2 chunks +2 lines, -1 line 0 comments Download
A LayoutTests/editing/spelling/spellcheck-editable-on-focus.html View 1 2 1 chunk +69 lines, -0 lines 0 comments Download
A LayoutTests/editing/spelling/spellcheck-editable-on-focus-expected.txt View 1 2 1 chunk +16 lines, -0 lines 0 comments Download
A LayoutTests/editing/spelling/spellcheck-editable-on-focus-multiframe.html View 1 2 3 4 5 1 chunk +56 lines, -0 lines 0 comments Download
A LayoutTests/editing/spelling/spellcheck-editable-on-focus-multiframe-expected.txt View 1 2 3 4 1 chunk +17 lines, -0 lines 0 comments Download
A LayoutTests/editing/spelling/spellcheck-editable-on-focus-sync.html View 1 2 1 chunk +51 lines, -0 lines 0 comments Download
A LayoutTests/editing/spelling/spellcheck-editable-on-focus-sync-expected.txt View 1 2 1 chunk +16 lines, -0 lines 0 comments Download
M Source/core/dom/Document.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/core/dom/Node.h View 1 2 3 4 2 chunks +4 lines, -0 lines 0 comments Download
M Source/core/editing/Editor.h View 1 2 3 4 5 6 3 chunks +4 lines, -2 lines 0 comments Download
M Source/core/editing/Editor.cpp View 1 2 3 4 5 6 3 chunks +37 lines, -8 lines 0 comments Download
M Source/core/html/HTMLInputElement.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/HTMLTextAreaElement.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/HTMLTextAreaElement.cpp View 1 2 3 2 chunks +7 lines, -0 lines 0 comments Download
M Source/web/EditorClientImpl.cpp View 1 1 chunk +4 lines, -7 lines 0 comments Download

Messages

Total messages: 40 (0 generated)
pstanek
Last one split out of 20709004.
7 years, 4 months ago (2013-08-02 13:19:56 UTC) #1
please use gerrit instead
https://chromiumcodereview.appspot.com/21694005/diff/1/LayoutTests/editing/spelling/spellcheck-editable-on-focus.html File LayoutTests/editing/spelling/spellcheck-editable-on-focus.html (right): https://chromiumcodereview.appspot.com/21694005/diff/1/LayoutTests/editing/spelling/spellcheck-editable-on-focus.html#newcode12 LayoutTests/editing/spelling/spellcheck-editable-on-focus.html:12: <textarea>zz zz zz.</textarea> Could you please add <input type="text"> ...
7 years, 4 months ago (2013-08-02 16:48:45 UTC) #2
tony
https://chromiumcodereview.appspot.com/21694005/diff/1/Source/core/editing/Editor.cpp File Source/core/editing/Editor.cpp (right): https://chromiumcodereview.appspot.com/21694005/diff/1/Source/core/editing/Editor.cpp#newcode106 Source/core/editing/Editor.cpp:106: frame->editor()->markMisspellingsAndBadGrammar(selection); Is it really OK to check all of ...
7 years, 4 months ago (2013-08-02 17:01:16 UTC) #3
pstanek
On 2013/08/02 17:01:16, tony wrote: > https://chromiumcodereview.appspot.com/21694005/diff/1/Source/core/editing/Editor.cpp > File Source/core/editing/Editor.cpp (right): > > https://chromiumcodereview.appspot.com/21694005/diff/1/Source/core/editing/Editor.cpp#newcode106 > ...
7 years, 4 months ago (2013-08-02 17:18:42 UTC) #4
tony
On 2013/08/02 17:18:42, pstanek wrote: > On 2013/08/02 17:01:16, tony wrote: > > > https://chromiumcodereview.appspot.com/21694005/diff/1/Source/core/editing/Editor.cpp ...
7 years, 4 months ago (2013-08-02 17:33:54 UTC) #5
pstanek
On 2013/08/02 17:33:54, tony wrote: > On 2013/08/02 17:18:42, pstanek wrote: > > On 2013/08/02 ...
7 years, 4 months ago (2013-08-02 20:13:13 UTC) #6
pstanek
On 2013/08/02 20:13:13, pstanek wrote: > On 2013/08/02 17:33:54, tony wrote: > > On 2013/08/02 ...
7 years, 4 months ago (2013-08-02 20:16:20 UTC) #7
ojan
Why is focus the right time to do this? Won't we already have spellchecked the ...
7 years, 4 months ago (2013-08-02 22:41:20 UTC) #8
pstanek
On 2013/08/02 22:41:20, ojan wrote: > Why is focus the right time to do this? ...
7 years, 4 months ago (2013-08-05 10:21:00 UTC) #9
ojan
On 2013/08/05 10:21:00, pstanek wrote: > On 2013/08/02 22:41:20, ojan wrote: > > Why is ...
7 years, 4 months ago (2013-08-05 17:25:52 UTC) #10
pstanek
On 2013/08/05 17:25:52, ojan wrote: > On 2013/08/05 10:21:00, pstanek wrote: > > On 2013/08/02 ...
7 years, 4 months ago (2013-08-07 17:46:38 UTC) #11
ojan
On 2013/08/07 17:46:38, pstanek wrote: > On 2013/08/05 17:25:52, ojan wrote: > > On 2013/08/05 ...
7 years, 4 months ago (2013-08-07 22:58:09 UTC) #12
Hajime Morrita
I hope this to be done asynchronously because 1) the text can be large and ...
7 years, 4 months ago (2013-08-08 06:02:50 UTC) #13
pstanek
On 2013/08/08 06:02:50, morrita1 wrote: > I hope this to be done asynchronously because 1) ...
7 years, 4 months ago (2013-08-12 14:58:06 UTC) #14
pstanek
On 2013/08/12 14:58:06, pstanek wrote: > On 2013/08/08 06:02:50, morrita1 wrote: > > I hope ...
7 years, 4 months ago (2013-08-20 18:24:22 UTC) #15
pstanek
On 2013/08/20 18:24:22, pstanek wrote: > On 2013/08/12 14:58:06, pstanek wrote: > > On 2013/08/08 ...
7 years, 4 months ago (2013-08-20 18:25:09 UTC) #16
pstanek
On 2013/08/20 18:25:09, pstanek wrote: > On 2013/08/20 18:24:22, pstanek wrote: > > On 2013/08/12 ...
7 years, 4 months ago (2013-08-20 18:29:24 UTC) #17
please use gerrit instead
https://codereview.chromium.org/21694005/diff/17001/LayoutTests/editing/spelling/spellcheck-editable-on-focus.html File LayoutTests/editing/spelling/spellcheck-editable-on-focus.html (right): https://codereview.chromium.org/21694005/diff/17001/LayoutTests/editing/spelling/spellcheck-editable-on-focus.html#newcode33 LayoutTests/editing/spelling/spellcheck-editable-on-focus.html:33: internals.settings.setAsynchronousSpellCheckingEnabled(false); Please also add the same test for asynchronous ...
7 years, 4 months ago (2013-08-20 18:33:52 UTC) #18
pstanek
https://codereview.chromium.org/21694005/diff/17001/LayoutTests/editing/spelling/spellcheck-editable-on-focus.html File LayoutTests/editing/spelling/spellcheck-editable-on-focus.html (right): https://codereview.chromium.org/21694005/diff/17001/LayoutTests/editing/spelling/spellcheck-editable-on-focus.html#newcode33 LayoutTests/editing/spelling/spellcheck-editable-on-focus.html:33: internals.settings.setAsynchronousSpellCheckingEnabled(false); On 2013/08/20 18:33:52, Rouslan Solomakhin wrote: > Please ...
7 years, 4 months ago (2013-08-20 20:44:43 UTC) #19
please use gerrit instead
LGTM for layout tests. I'm not familiar with Editor code and defer that review to ...
7 years, 4 months ago (2013-08-20 21:24:02 UTC) #20
tony
https://codereview.chromium.org/21694005/diff/33001/Source/core/editing/Editor.cpp File Source/core/editing/Editor.cpp (right): https://codereview.chromium.org/21694005/diff/33001/Source/core/editing/Editor.cpp#newcode1073 Source/core/editing/Editor.cpp:1073: // the passed in element is put into m_editablesSpellCheckedOnFocus ...
7 years, 4 months ago (2013-08-20 22:10:38 UTC) #21
pstanek
https://codereview.chromium.org/21694005/diff/33001/Source/core/editing/Editor.h File Source/core/editing/Editor.h (right): https://codereview.chromium.org/21694005/diff/33001/Source/core/editing/Editor.h#newcode328 Source/core/editing/Editor.h:328: Vector<RefPtr<Node> > m_editablesSpellCheckedOnFocus; On 2013/08/20 22:10:39, tony wrote: > ...
7 years, 4 months ago (2013-08-21 06:05:17 UTC) #22
pstanek
PTAL
7 years, 4 months ago (2013-08-21 07:55:48 UTC) #23
tony
This is better, but I'm still worried about m_editablesAlreadySpellChecked growing and never clearing elements that ...
7 years, 4 months ago (2013-08-21 17:15:23 UTC) #24
pstanek
On 2013/08/21 17:15:23, tony wrote: > This is better, but I'm still worried about m_editablesAlreadySpellChecked ...
7 years, 4 months ago (2013-08-21 17:32:16 UTC) #25
pstanek
On 2013/08/21 17:32:16, pstanek wrote: > On 2013/08/21 17:15:23, tony wrote: > > This is ...
7 years, 4 months ago (2013-08-21 17:35:47 UTC) #26
tony
> On 2013/08/21 17:32:16, pstanek wrote: > > On 2013/08/21 17:15:23, tony wrote: > > ...
7 years, 4 months ago (2013-08-21 17:58:58 UTC) #27
pstanek
On 2013/08/21 17:58:58, tony wrote: > > On 2013/08/21 17:32:16, pstanek wrote: > > > ...
7 years, 4 months ago (2013-08-21 18:04:42 UTC) #28
tony
On 2013/08/21 18:04:42, pstanek wrote: > Yeah but what users want is when they have ...
7 years, 4 months ago (2013-08-21 18:11:31 UTC) #29
pstanek
On 2013/08/21 18:11:31, tony wrote: > On 2013/08/21 18:04:42, pstanek wrote: > > > Yeah ...
7 years, 4 months ago (2013-08-21 18:12:50 UTC) #30
pstanek
On 2013/08/21 18:12:50, pstanek wrote: > On 2013/08/21 18:11:31, tony wrote: > > On 2013/08/21 ...
7 years, 4 months ago (2013-08-22 14:09:30 UTC) #31
tony
LGTM https://codereview.chromium.org/21694005/diff/54001/Source/core/editing/Editor.cpp File Source/core/editing/Editor.cpp (right): https://codereview.chromium.org/21694005/diff/54001/Source/core/editing/Editor.cpp#newcode1020 Source/core/editing/Editor.cpp:1020: if (!isContinuousSpellCheckingEnabled()) { Nit: If you early return, ...
7 years, 4 months ago (2013-08-22 18:44:33 UTC) #32
pstanek
On 2013/08/22 18:44:33, tony wrote: > LGTM > > https://codereview.chromium.org/21694005/diff/54001/Source/core/editing/Editor.cpp > File Source/core/editing/Editor.cpp (right): > ...
7 years, 4 months ago (2013-08-22 19:41:28 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pstanek@opera.com/21694005/62001
7 years, 4 months ago (2013-08-22 19:43:36 UTC) #34
commit-bot: I haz the power
Change committed as 156583
7 years, 4 months ago (2013-08-22 22:19:41 UTC) #35
ojan
spellcheck-editable-on-focus.html looks to be flaky. http://test-results.appspot.com/dashboards/flakiness_dashboard.html#group=%40ToT%20Blink&showExpectations=true&tests=editing%2Fspelling%2Fspellcheck-editable-on-focus.html
7 years, 4 months ago (2013-08-23 01:52:19 UTC) #36
pstanek
On 2013/08/23 01:52:19, ojan wrote: > spellcheck-editable-on-focus.html looks to be flaky. > > http://test-results.appspot.com/dashboards/flakiness_dashboard.html#group=%2540ToT%2520Blink&showExpectations=true&tests=editing%252Fspelling%252Fspellcheck-editable-on-focus.html Will ...
7 years, 4 months ago (2013-08-23 11:46:18 UTC) #37
please use gerrit instead
On 2013/08/23 11:46:18, pstanek wrote: > On 2013/08/23 01:52:19, ojan wrote: > > spellcheck-editable-on-focus.html looks ...
7 years, 4 months ago (2013-08-23 14:33:14 UTC) #38
pstanek
On 2013/08/23 14:33:14, Rouslan Solomakhin wrote: > On 2013/08/23 11:46:18, pstanek wrote: > > On ...
7 years, 4 months ago (2013-08-23 14:35:35 UTC) #39
pstanek
7 years, 4 months ago (2013-08-23 14:37:19 UTC) #40
Message was sent while issue was closed.
On 2013/08/23 14:35:35, pstanek wrote:
> On 2013/08/23 14:33:14, Rouslan Solomakhin wrote:
> > On 2013/08/23 11:46:18, pstanek wrote:
> > > On 2013/08/23 01:52:19, ojan wrote:
> > > > spellcheck-editable-on-focus.html looks to be flaky.
> > > > 
> > > >
> > >
> >
>
http://test-results.appspot.com/dashboards/flakiness_dashboard.html#group=%25...
> > > 
> > > Will take a look into this when working on 278119. I can reproduce
flakiness
> > but
> > > only when running all editing tests. Does not happen when running
> > > editing/spelling only. Weird.
> > 
> > That sounds like other tests are switching some settings that affect your
> test,
> > but you do not reset them. LayoutTests/editing/spelling/resources/util.js,
for
> > example, sets these settings:
> > 
> >     internals.settings.setAsynchronousSpellCheckingEnabled(true);
> >     internals.settings.setSmartInsertDeleteEnabled(true);
> >     internals.settings.setSelectTrailingWhitespaceEnabled(false);
> >     internals.settings.setUnifiedTextCheckerEnabled(true);
> >     internals.settings.setEditingBehavior("win");
> 
> Actually it turned out to be simpler: a bug in the code :).

Test's code that is. Anyway. Fix pushed to
https://codereview.chromium.org/22859062/

Powered by Google App Engine
This is Rietveld 408576698