Refactor DocumentMarkerListEditor::ShiftMarkersContent{Ind,D}ependent

The current implementations of
DocumentMarkerListEditor::ShiftMarkersContentDependent() and
ShiftMarkersContentIndependent() can potentially take quadratic time in the
number of markers if we have to remove them all, since we call Vector::erase()
on them one-by-one. We can avoid this by creating a new MarkerList and swapping
afterward. The best-case runtime should still be linear for both the old and new
implementations.

BUG=707867

Review-Url: https://codereview.chromium.org/2917963003
Cr-Commit-Position: refs/heads/master@{#477055}
1 file changed