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

Side by Side Diff: third_party/WebKit/Source/core/editing/markers/TextMatchMarkerListImpl.cpp

Issue 2952953002: [MarkersIntersectingRange #1] Add DocumentMarkerList::MarkersIntersectingRange() (Closed)
Patch Set: Created 3 years, 6 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
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
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 HeapVector<Member<DocumentMarker>>
39 TextMatchMarkerListImpl::MarkersIntersectingRange(unsigned start_offset,
40 unsigned end_offset) const {
41 return DocumentMarkerListEditor::MarkersIntersectingRange(
42 markers_, start_offset, end_offset);
43 }
44
38 bool TextMatchMarkerListImpl::MoveMarkers(int length, 45 bool TextMatchMarkerListImpl::MoveMarkers(int length,
39 DocumentMarkerList* dst_list) { 46 DocumentMarkerList* dst_list) {
40 return DocumentMarkerListEditor::MoveMarkers(&markers_, length, dst_list); 47 return DocumentMarkerListEditor::MoveMarkers(&markers_, length, dst_list);
41 } 48 }
42 49
43 bool TextMatchMarkerListImpl::RemoveMarkers(unsigned start_offset, int length) { 50 bool TextMatchMarkerListImpl::RemoveMarkers(unsigned start_offset, int length) {
44 return DocumentMarkerListEditor::RemoveMarkers(&markers_, start_offset, 51 return DocumentMarkerListEditor::RemoveMarkers(&markers_, start_offset,
45 length); 52 length);
46 } 53 }
47 54
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 // range. 101 // range.
95 if (marker.StartOffset() >= end_offset) 102 if (marker.StartOffset() >= end_offset)
96 break; 103 break;
97 ToTextMatchMarker(marker).SetIsActiveMatch(active); 104 ToTextMatchMarker(marker).SetIsActiveMatch(active);
98 doc_dirty = true; 105 doc_dirty = true;
99 } 106 }
100 return doc_dirty; 107 return doc_dirty;
101 } 108 }
102 109
103 } // namespace blink 110 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698