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

Issue 2891403004: Fix bug where misspelling underline is not removed properly (Closed)

Created:
3 years, 7 months ago by rlanday
Modified:
3 years, 7 months ago
Reviewers:
yosin_UTC9, Xiaocheng
CC:
blink-reviews, chromium-reviews, groby+blinkspell_chromium.org, kinuko+watch, timvolodine, Xiaocheng
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix bug where misspelling underline is not removed properly I made a change in https://codereview.chromium.org/2755013004 that significantly changed how DocumentMarkers are updated in response to text editing operations. In particular, I made a change that means replacing exactly the range of text marked by a DocumentMarker will preserve the marker (resizing it if necessary) on the new piece of text (previously the marker was removed in this case). This introduced a bug when replacing words using spellcheck suggestions (e.g. from the right-click context menu) because the current logic just replaces the word without explictly removing the marker. The fix is to insert an extra step to explicitly remove the marker. I have added a test case to hopefully ensure this bug does not reoccur. Note: this bug does not occur when the Blink feature IdleTimeSpellChecking is enabled. I believe this is because with the flag enabled, the spellchecker removes the marker when it rechecks the word in the background. BUG=722721

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -0 lines) Patch
M third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp View 1 chunk +3 lines, -0 lines 2 comments Download
M third_party/WebKit/Source/web/tests/WebFrameTest.cpp View 1 chunk +10 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (5 generated)
rlanday
3 years, 7 months ago (2017-05-19 23:32:16 UTC) #3
Xiaocheng
lgtm Thanks for the quick fix!
3 years, 7 months ago (2017-05-20 00:01:55 UTC) #7
yosin_UTC9
https://codereview.chromium.org/2891403004/diff/1/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp File third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp (right): https://codereview.chromium.org/2891403004/diff/1/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp#newcode841 third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp:841: GetFrame().GetDocument()->Markers().RemoveMarkersInRange( If we decide to remove marker explicitly, I ...
3 years, 7 months ago (2017-05-22 05:14:10 UTC) #8
rlanday
On 2017/05/22 at 05:14:10, yosin wrote: > https://codereview.chromium.org/2891403004/diff/1/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp#newcode842 > third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp:842: marker_range, DocumentMarker::MisspellingMarkers()); > I'm not ...
3 years, 7 months ago (2017-05-22 05:21:50 UTC) #9
yosin_UTC9
On 2017/05/22 at 05:21:50, rlanday wrote: > On 2017/05/22 at 05:14:10, yosin wrote: > > ...
3 years, 7 months ago (2017-05-22 06:07:25 UTC) #10
rlanday
On 2017/05/22 at 06:07:25, yosin wrote: > Explicit removing markers for content change, in this ...
3 years, 7 months ago (2017-05-22 06:15:26 UTC) #11
rlanday
On 2017/05/22 at 06:15:26, rlanday wrote: > If you really want to have different behavior ...
3 years, 7 months ago (2017-05-22 06:16:56 UTC) #12
yosin_UTC9
On 2017/05/22 at 06:15:26, rlanday wrote: > On 2017/05/22 at 06:07:25, yosin wrote: > > ...
3 years, 7 months ago (2017-05-22 07:03:19 UTC) #13
rlanday
On 2017/05/22 at 07:03:19, yosin wrote: > Please don't have boolean functions to change behavior ...
3 years, 7 months ago (2017-05-22 17:41:12 UTC) #14
rlanday
3 years, 7 months ago (2017-05-22 22:41:56 UTC) #15
On 2017/05/22 at 17:41:12, rlanday wrote:
> On 2017/05/22 at 07:03:19, yosin wrote:
> > Please don't have boolean functions to change behavior based on "marker's
nature."
> > We have marker type specific list implementation, it should be done in each
DMListImpl.
> > To share code, we can have two functions, content dependent and content
independent, DMListEditor.
> 
> Ok, I will refactor the marker-shifting code so we have two versions.
> 
> Note that we need to get a fix for this merged into the version 59 release
branch. Do you think it's safe to merge another substantial change to the
marker-shifting logic, or should we just go ahead and merge the one-line fix for
the release?

Here's the CL to change the marker-shifting logic:
https://codereview.chromium.org/2895353003

Powered by Google App Engine
This is Rietveld 408576698