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

Issue 2806683002: Don't ever split DocumentMarkers on remove (Closed)

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

Description

Don't ever split DocumentMarkers on remove Right now some of the DocumentMarkerController::removeMarkers() methods take an enum flag, RemovePartiallyOverlappingMarkerOrNot that controls what the method does with markers that partially intersect the passed-in range but do not fall entirely within it. If the value DoNotRemovePartiallyOverlappingMarker is passed, the section in the passed-in range is removed and the remaining piece(s) of the marker are left in place (otherwise the entire marker is removed). If the passed-in range contains part of the interior of the marker but neither the start nor end position, this means the marker is split into two pieces, which requires copying the marker. yosin thinks copying markers is weird and we should try to avoid ever having to do it. I believe this is possible if we eliminate this flag and just never split markers on removal. I don't think any of the currently-existing marker types (Spelling, Grammar, Composition, TextMatch) ever make sense to split, and neither do the new types I'm going to add (Suggestion, SuggestionHighlight). The only test cases I had to update after this change are ones I added based on the current behavior. BUG=707867 Review-Url: https://codereview.chromium.org/2806683002 Cr-Commit-Position: refs/heads/master@{#464524} Committed: https://chromium.googlesource.com/chromium/src/+/98f1927737cd1c3fd5d471b74cc94333e9e37972

Patch Set 1 #

Patch Set 2 : Leave partial markers in place for non-splitting case, preserve endpoints for splitting case #

Total comments: 1

Patch Set 3 : Move deletion behavior change to previous CL #

Patch Set 4 : Rebase on test cases I'm adding in another CL #

Total comments: 1

Patch Set 5 : Rebase, remove enum #

Patch Set 6 : Rebase (no manual changes) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -160 lines) Patch
M third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.h View 1 2 3 4 5 2 chunks +9 lines, -22 lines 0 comments Download
M third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp View 1 2 3 4 5 4 chunks +6 lines, -40 lines 0 comments Download
M third_party/WebKit/Source/core/editing/markers/DocumentMarkerControllerTest.cpp View 1 2 3 4 5 4 chunks +9 lines, -93 lines 0 comments Download
M third_party/WebKit/Source/core/editing/spellcheck/HotModeSpellCheckRequester.cpp View 1 2 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp View 1 2 1 chunk +2 lines, -3 lines 0 comments Download

Messages

Total messages: 45 (24 generated)
rlanday
3 years, 8 months ago (2017-04-07 01:57:54 UTC) #2
Xiaocheng
Is there a more detailed analysis of the existing call sites, so that we are ...
3 years, 8 months ago (2017-04-07 02:22:42 UTC) #5
rlanday
On 2017/04/07 at 02:22:42, xiaochengh wrote: > Is there a more detailed analysis of the ...
3 years, 8 months ago (2017-04-07 03:02:49 UTC) #6
rlanday
On 2017/04/07 at 03:02:49, rlanday wrote: > On 2017/04/07 at 02:22:42, xiaochengh wrote: > > ...
3 years, 8 months ago (2017-04-07 03:03:42 UTC) #7
yosin_UTC9
It seems we need to study for didUpdateCharacterData() with calls removeMarkers() with |DoNotRemovePartiallyOverlappingMarker|. Other than ...
3 years, 8 months ago (2017-04-07 04:05:50 UTC) #10
rlanday
On 2017/04/07 at 04:05:50, yosin wrote: > For case #2, we should remove overlapped markers ...
3 years, 8 months ago (2017-04-07 17:45:07 UTC) #11
rlanday
I don't think the composition marker needs to be updated in response to text edits, ...
3 years, 8 months ago (2017-04-07 17:48:06 UTC) #12
Xiaocheng
On 2017/04/07 at 17:45:07, rlanday wrote: > On 2017/04/07 at 04:05:50, yosin wrote: > > ...
3 years, 8 months ago (2017-04-07 19:03:55 UTC) #13
rlanday
On 2017/04/07 at 19:03:55, xiaochengh wrote: > We should land crrev.com/2755013004 first, so that we ...
3 years, 8 months ago (2017-04-07 23:53:53 UTC) #14
Xiaocheng
On 2017/04/07 at 23:53:53, rlanday wrote: > On 2017/04/07 at 19:03:55, xiaochengh wrote: > > ...
3 years, 8 months ago (2017-04-08 00:03:33 UTC) #15
rlanday
On 2017/04/08 at 00:03:33, xiaochengh wrote: > On 2017/04/07 at 23:53:53, rlanday wrote: > > ...
3 years, 8 months ago (2017-04-08 00:13:28 UTC) #18
rlanday
I've updated the CL. Note that we only need to change one test case now ...
3 years, 8 months ago (2017-04-08 00:14:34 UTC) #19
Xiaocheng
https://codereview.chromium.org/2806683002/diff/20001/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp File third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp (left): https://codereview.chromium.org/2806683002/diff/20001/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp#oldcode832 third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp:832: // If we're doing a pure remove operation, remove ...
3 years, 8 months ago (2017-04-08 00:23:36 UTC) #20
rlanday
On 2017/04/08 at 00:23:36, xiaochengh wrote: > https://codereview.chromium.org/2806683002/diff/20001/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp > File third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp (left): > > https://codereview.chromium.org/2806683002/diff/20001/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp#oldcode832 ...
3 years, 8 months ago (2017-04-10 20:57:14 UTC) #23
Xiaocheng
lgtm with a nit. https://codereview.chromium.org/2806683002/diff/60001/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.h File third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.h (right): https://codereview.chromium.org/2806683002/diff/60001/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.h#newcode88 third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.h:88: enum RemovePartiallyOverlappingMarkerOrNot { Please also ...
3 years, 8 months ago (2017-04-10 21:22:10 UTC) #24
rlanday
On 2017/04/10 at 21:22:10, xiaochengh wrote: > lgtm with a nit. > > https://codereview.chromium.org/2806683002/diff/60001/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.h > ...
3 years, 8 months ago (2017-04-12 01:11:39 UTC) #29
yosin_UTC9
lgtm Thanks for simplification!
3 years, 8 months ago (2017-04-12 01:49:34 UTC) #30
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/2806683002/80001
3 years, 8 months ago (2017-04-13 01:53:52 UTC) #33
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_arm64_dbg_recipe/builds/247006) android_cronet on master.tryserver.chromium.android (JOB_FAILED, ...
3 years, 8 months ago (2017-04-13 01:59:42 UTC) #35
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/2806683002/100001
3 years, 8 months ago (2017-04-13 20:06:36 UTC) #42
commit-bot: I haz the power
3 years, 8 months ago (2017-04-13 20:23:20 UTC) #45
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://chromium.googlesource.com/chromium/src/+/98f1927737cd1c3fd5d471b74cc9...

Powered by Google App Engine
This is Rietveld 408576698