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

Side by Side Diff: third_party/WebKit/Source/core/editing/markers/DocumentMarkerListEditor.h

Issue 2805553003: DocumentMarkerList refactor as an interface (Closed)
Patch Set: Rebase on renaming patch, respond to comments Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef DocumentMarkerListEditor_h
6 #define DocumentMarkerListEditor_h
7
8 #include "core/editing/markers/DocumentMarkerList.h"
9
10 namespace blink {
11
12 class DocumentMarkerListEditor {
13 public:
14 static DocumentMarkerVector::iterator
15 GetPosOfFirstMarkerNotEndingBeforeInSortedList(
16 DocumentMarkerVector* marker_list,
17 size_t start_offset);
18
19 static DocumentMarkerList::DidMoveMarkerOrNot MoveUnsortedMarkers(
20 DocumentMarkerVector* marker_list,
21 int length,
22 DocumentMarkerList* dst_list);
23 static DocumentMarkerList::DidMoveMarkerOrNot MoveSortedMarkers(
24 DocumentMarkerVector* marker_list,
25 int length,
26 DocumentMarkerList* dst_list);
27
28 static DocumentMarkerList::DidRemoveMarkerOrNot RemoveUnsortedMarkers(
29 DocumentMarkerVector* marker_list,
30 unsigned start_offset,
31 int length);
32 static DocumentMarkerList::DidRemoveMarkerOrNot RemoveSortedMarkers(
33 DocumentMarkerVector* marker_list,
34 unsigned start_offset,
35 int length);
36
37 static DocumentMarkerList::DidShiftMarkerOrNot ShiftUnsortedMarkers(
38 DocumentMarkerVector* marker_list,
39 unsigned offset,
40 unsigned old_length,
41 unsigned new_length);
42 static DocumentMarkerList::DidShiftMarkerOrNot ShiftSortedMarkers(
43 DocumentMarkerVector* marker_list,
44 unsigned offset,
45 unsigned old_length,
46 unsigned new_length);
47
48 private:
49 DocumentMarkerListEditor();
50
51 static DocumentMarkerList::DidMoveMarkerOrNot MoveMarkersHelper(
52 DocumentMarkerVector* marker_list,
53 int length,
54 DocumentMarkerList* dst_list,
55 bool is_sorted);
56 };
57
58 } // namespace blink
59
60 #endif // DocumentMarkerListEditor_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698