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 #include "core/editing/markers/TextMatchMarkerListImpl.h" | 5 #include "core/editing/markers/TextMatchMarkerListImpl.h" |
6 | 6 |
7 #include "core/dom/Node.h" | 7 #include "core/dom/Node.h" |
8 #include "core/dom/Range.h" | 8 #include "core/dom/Range.h" |
9 #include "core/editing/EphemeralRange.h" | 9 #include "core/editing/EphemeralRange.h" |
10 #include "core/editing/markers/DocumentMarkerListEditor.h" | 10 #include "core/editing/markers/DocumentMarkerListEditor.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 | 28 |
29 void TextMatchMarkerListImpl::Clear() { | 29 void TextMatchMarkerListImpl::Clear() { |
30 markers_.clear(); | 30 markers_.clear(); |
31 } | 31 } |
32 | 32 |
33 const HeapVector<Member<DocumentMarker>>& TextMatchMarkerListImpl::GetMarkers() | 33 const HeapVector<Member<DocumentMarker>>& TextMatchMarkerListImpl::GetMarkers() |
34 const { | 34 const { |
35 return markers_; | 35 return markers_; |
36 } | 36 } |
37 | 37 |
| 38 DocumentMarker* TextMatchMarkerListImpl::FirstMarkerIntersectingRange( |
| 39 unsigned start_offset, |
| 40 unsigned end_offset) const { |
| 41 return DocumentMarkerListEditor::FirstMarkerIntersectingRange( |
| 42 markers_, start_offset, end_offset); |
| 43 } |
| 44 |
38 HeapVector<Member<DocumentMarker>> | 45 HeapVector<Member<DocumentMarker>> |
39 TextMatchMarkerListImpl::MarkersIntersectingRange(unsigned start_offset, | 46 TextMatchMarkerListImpl::MarkersIntersectingRange(unsigned start_offset, |
40 unsigned end_offset) const { | 47 unsigned end_offset) const { |
41 return DocumentMarkerListEditor::MarkersIntersectingRange( | 48 return DocumentMarkerListEditor::MarkersIntersectingRange( |
42 markers_, start_offset, end_offset); | 49 markers_, start_offset, end_offset); |
43 } | 50 } |
44 | 51 |
45 bool TextMatchMarkerListImpl::MoveMarkers(int length, | 52 bool TextMatchMarkerListImpl::MoveMarkers(int length, |
46 DocumentMarkerList* dst_list) { | 53 DocumentMarkerList* dst_list) { |
47 return DocumentMarkerListEditor::MoveMarkers(&markers_, length, dst_list); | 54 return DocumentMarkerListEditor::MoveMarkers(&markers_, length, dst_list); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 // range. | 108 // range. |
102 if (marker.StartOffset() >= end_offset) | 109 if (marker.StartOffset() >= end_offset) |
103 break; | 110 break; |
104 ToTextMatchMarker(marker).SetIsActiveMatch(active); | 111 ToTextMatchMarker(marker).SetIsActiveMatch(active); |
105 doc_dirty = true; | 112 doc_dirty = true; |
106 } | 113 } |
107 return doc_dirty; | 114 return doc_dirty; |
108 } | 115 } |
109 | 116 |
110 } // namespace blink | 117 } // namespace blink |
OLD | NEW |