DescriptionSplit 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 #
Messages
Total messages: 22 (14 generated)
|