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

Issue 2842263002: [DMC #3.5] Split up DocumentMarkerListEditor::AddMarker() into two methods (Closed)

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

Description

Split up DocumentMarkerListEditor::AddMarker() into two methods This change helps us avoid duplication in the MarkerType-specific list implementations I'm going to add. Instead of having one DocumentMarkerListEditor::AddMarker() method that works for GenericDocumentMarkerListImpl, but then requires each of the other list implementations to implement the method separately, we'll have one method, AddAndMergeOverlapping(), that works for Spelling/Grammar markers (and can be moved into SpellCheckMarkerList once we eliminate GenericDocumentMarkerListImpl), and another method AddWithoutMergingOverlapping(), that can be used for the other marker types. GenericDocumentMarkerListImpl will choose which to use based on the type of the inserted marker. Right now both of these methods create a RenderedDocumentMarker from the passed-in DocumentMarker. I will move this piece out of the method once not all marker list implementations are still creating RenderedDocumentMarkers. BUG=707867 Review-Url: https://codereview.chromium.org/2842263002 Cr-Commit-Position: refs/heads/master@{#467884} Committed: https://chromium.googlesource.com/chromium/src/+/db5d3c0b9ba46e665c77be59be3695df59f4e139

Patch Set 1 #

Total comments: 4

Patch Set 2 : Fix accidental renaming, move method implementation to make patch smaller #

Total comments: 3

Patch Set 3 : Fix nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+44 lines, -29 lines) Patch
M third_party/WebKit/Source/core/editing/markers/DocumentMarkerListEditor.h View 2 chunks +3 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/editing/markers/DocumentMarkerListEditor.cpp View 1 2 2 chunks +27 lines, -24 lines 0 comments Download
M third_party/WebKit/Source/core/editing/markers/GenericDocumentMarkerListImpl.cpp View 1 2 1 chunk +14 lines, -1 line 0 comments Download

Messages

Total messages: 22 (14 generated)
rlanday
3 years, 8 months ago (2017-04-26 21:12:52 UTC) #4
Xiaocheng
https://codereview.chromium.org/2842263002/diff/1/third_party/WebKit/Source/core/editing/markers/DocumentMarkerListEditor.cpp File third_party/WebKit/Source/core/editing/markers/DocumentMarkerListEditor.cpp (left): https://codereview.chromium.org/2842263002/diff/1/third_party/WebKit/Source/core/editing/markers/DocumentMarkerListEditor.cpp#oldcode137 third_party/WebKit/Source/core/editing/markers/DocumentMarkerListEditor.cpp:137: void DocumentMarkerListEditor::MergeOverlapping( Could you put DocumentMarkerListEditor::AddMarkerAndMergeOverlapping here to minimize ...
3 years, 8 months ago (2017-04-26 22:12:08 UTC) #5
rlanday
https://codereview.chromium.org/2842263002/diff/1/third_party/WebKit/Source/core/editing/markers/DocumentMarkerListEditor.cpp File third_party/WebKit/Source/core/editing/markers/DocumentMarkerListEditor.cpp (right): https://codereview.chromium.org/2842263002/diff/1/third_party/WebKit/Source/core/editing/markers/DocumentMarkerListEditor.cpp#newcode24 third_party/WebKit/Source/core/editing/markers/DocumentMarkerListEditor.cpp:24: const DocumentMarker* marker_rendered_marker) { On 2017/04/26 at 22:12:07, Xiaocheng ...
3 years, 8 months ago (2017-04-26 22:14:46 UTC) #6
rlanday
Updated
3 years, 8 months ago (2017-04-26 22:21:06 UTC) #9
Xiaocheng
lgtm
3 years, 8 months ago (2017-04-26 22:30:37 UTC) #10
yosin_UTC9
lgtm w/ nits https://codereview.chromium.org/2842263002/diff/20001/third_party/WebKit/Source/core/editing/markers/DocumentMarkerListEditor.cpp File third_party/WebKit/Source/core/editing/markers/DocumentMarkerListEditor.cpp (right): https://codereview.chromium.org/2842263002/diff/20001/third_party/WebKit/Source/core/editing/markers/DocumentMarkerListEditor.cpp#newcode21 third_party/WebKit/Source/core/editing/markers/DocumentMarkerListEditor.cpp:21: MarkerList::iterator pos = std::lower_bound( nit: s/MakerList::iterator/const ...
3 years, 7 months ago (2017-04-28 01:01:28 UTC) #13
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/2842263002/40001
3 years, 7 months ago (2017-04-28 01:59:13 UTC) #19
commit-bot: I haz the power
3 years, 7 months ago (2017-04-28 04:06:18 UTC) #22
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/db5d3c0b9ba46e665c77be59be36...

Powered by Google App Engine
This is Rietveld 408576698