OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef DocumentMarkerListEditor_h | 5 #ifndef DocumentMarkerListEditor_h |
6 #define DocumentMarkerListEditor_h | 6 #define DocumentMarkerListEditor_h |
7 | 7 |
8 #include "core/editing/markers/DocumentMarkerList.h" | 8 #include "core/editing/markers/DocumentMarkerList.h" |
9 #include "platform/heap/Handle.h" | 9 #include "platform/heap/Handle.h" |
10 | 10 |
(...skipping 28 matching lines...) Expand all Loading... |
39 unsigned offset, | 39 unsigned offset, |
40 unsigned old_length, | 40 unsigned old_length, |
41 unsigned new_length); | 41 unsigned new_length); |
42 | 42 |
43 // Returns true if a marker was shifted or removed, false otherwise. | 43 // Returns true if a marker was shifted or removed, false otherwise. |
44 static bool ShiftMarkersContentIndependent(MarkerList*, | 44 static bool ShiftMarkersContentIndependent(MarkerList*, |
45 unsigned offset, | 45 unsigned offset, |
46 unsigned old_length, | 46 unsigned old_length, |
47 unsigned new_length); | 47 unsigned new_length); |
48 | 48 |
| 49 // Returns the first marker in the specified MarkerList whose interior |
| 50 // overlaps overlap with the range [start_offset, end_offset], or null if |
| 51 // there is no such marker. |
| 52 static DocumentMarker* FirstMarkerIntersectingRange(const MarkerList&, |
| 53 unsigned start_offset, |
| 54 unsigned end_offset); |
| 55 |
49 static HeapVector<Member<DocumentMarker>> MarkersIntersectingRange( | 56 static HeapVector<Member<DocumentMarker>> MarkersIntersectingRange( |
50 const MarkerList&, | 57 const MarkerList&, |
51 unsigned start_offset, | 58 unsigned start_offset, |
52 unsigned end_offset); | 59 unsigned end_offset); |
53 }; | 60 }; |
54 | 61 |
55 } // namespace blink | 62 } // namespace blink |
56 | 63 |
57 #endif // DocumentMarkerListEditor_h | 64 #endif // DocumentMarkerListEditor_h |
OLD | NEW |