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

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

Issue 2805553003: DocumentMarkerList refactor as an interface (Closed)
Patch Set: 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 DocumentMarkerListUtils_h
6 #define DocumentMarkerListUtils_h
7
8 #include "core/editing/markers/DocumentMarkerList.h"
9
10 namespace blink {
11
12 class DocumentMarkerListUtils {
yosin_UTC9 2017/04/07 03:16:22 Please avoid to use abbrev name, it should call |U
13 using MarkerList = HeapVector<Member<DocumentMarker>>;
Xiaocheng 2017/04/07 00:06:33 This is the same as DocumentMarkerVector.
14
15 public:
16 static DocumentMarkerList::iterator
17 getPosOfFirstMarkerNotEndingBeforeInSortedList(MarkerList*,
18 size_t startOffset);
19
20 static void appendMarkersToInputList(const MarkerList*,
21 DocumentMarkerVector* inputList);
22
23 static DocumentMarkerList::DidCopyMarkerOrNot copyUnsortedMarkers(
24 MarkerList*,
25 unsigned startOffset,
26 int length,
27 DocumentMarkerList* dstList,
28 int delta);
29 static DocumentMarkerList::DidCopyMarkerOrNot copySortedMarkers(
30 MarkerList*,
31 unsigned startOffset,
32 int length,
33 DocumentMarkerList* dstList,
34 int delta);
35
36 static DocumentMarkerList::DidRemoveMarkerOrNot removeUnsortedMarkers(
37 MarkerList*,
38 unsigned startOffset,
39 int length,
40 bool shouldRemovePartiallyOverlappingMarkers);
41 static DocumentMarkerList::DidRemoveMarkerOrNot removeSortedMarkers(
42 MarkerList*,
43 unsigned startOffset,
44 int length,
45 bool shouldRemovePartiallyOverlappingMarkers);
46
47 static DocumentMarkerList::DidShiftMarkerOrNot shiftUnsortedMarkers(
48 MarkerList*,
49 unsigned offset,
50 unsigned oldLength,
51 unsigned newLength);
52 static DocumentMarkerList::DidShiftMarkerOrNot shiftSortedMarkers(
53 MarkerList*,
54 unsigned offset,
55 unsigned oldLength,
56 unsigned newLength);
57
58 private:
59 DocumentMarkerListUtils();
60 };
61
62 } // namespace blink
63
64 #endif // DocumentMarkerListUtils_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698