OLD | NEW |
---|---|
(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 DocumentMarkerList::iterator | |
15 getPosOfFirstMarkerNotEndingBeforeInSortedList( | |
rlanday
2017/04/07 21:46:29
This method is only used once in this file and pro
Xiaocheng
2017/04/07 23:42:24
If it's used only once and internally, making it a
rlanday
2017/04/11 01:08:59
I stand corrected, it's also used in TextMatchMark
Xiaocheng
2017/04/11 01:26:01
In this case, I don't have a strong preference.
I
| |
16 DocumentMarkerVector* markerList, | |
17 size_t startOffset); | |
18 | |
19 static void appendMarkersToInputList(const DocumentMarkerVector& markerList, | |
rlanday
2017/04/07 21:46:29
This method isn't really an editing method...does
Xiaocheng
2017/04/07 23:42:24
I think this method doesn't do much. We should mak
| |
20 DocumentMarkerVector* inputList); | |
21 | |
22 static DocumentMarkerList::DidCopyMarkerOrNot copyUnsortedMarkers( | |
Xiaocheng
2017/04/07 23:42:24
It's better to use output to an empty DMV so that
| |
23 DocumentMarkerVector* markerList, | |
24 unsigned startOffset, | |
25 int length, | |
26 DocumentMarkerList* dstList, | |
27 int delta); | |
28 static DocumentMarkerList::DidCopyMarkerOrNot copySortedMarkers( | |
29 DocumentMarkerVector* markerList, | |
30 unsigned startOffset, | |
31 int length, | |
32 DocumentMarkerList* dstList, | |
33 int delta); | |
34 | |
35 static DocumentMarkerList::DidRemoveMarkerOrNot removeUnsortedMarkers( | |
36 DocumentMarkerVector* markerList, | |
37 unsigned startOffset, | |
38 int length, | |
39 bool shouldRemovePartiallyOverlappingMarkers); | |
40 static DocumentMarkerList::DidRemoveMarkerOrNot removeSortedMarkers( | |
41 DocumentMarkerVector* markerList, | |
42 unsigned startOffset, | |
43 int length, | |
44 bool shouldRemovePartiallyOverlappingMarkers); | |
45 | |
46 static DocumentMarkerList::DidShiftMarkerOrNot shiftUnsortedMarkers( | |
47 DocumentMarkerVector* markerList, | |
48 unsigned offset, | |
49 unsigned oldLength, | |
50 unsigned newLength); | |
51 static DocumentMarkerList::DidShiftMarkerOrNot shiftSortedMarkers( | |
52 DocumentMarkerVector* markerList, | |
53 unsigned offset, | |
54 unsigned oldLength, | |
55 unsigned newLength); | |
56 | |
57 private: | |
58 DocumentMarkerListEditor(); | |
59 | |
60 static DocumentMarkerList::DidCopyMarkerOrNot copyMarkersHelper( | |
Xiaocheng
2017/04/07 23:42:24
It doesn't make too much sense to introduce a stat
| |
61 DocumentMarkerVector* markerList, | |
62 DocumentMarkerList::iterator beginIt, | |
63 DocumentMarkerList::iterator endIt, | |
64 unsigned startOffset, | |
65 int length, | |
66 DocumentMarkerList* dstList, | |
67 int delta); | |
68 }; | |
69 | |
70 } // namespace blink | |
71 | |
72 #endif // DocumentMarkerListEditor_h | |
OLD | NEW |