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/SpellCheckMarkerListImpl.h" | 5 #include "core/editing/markers/SpellCheckMarkerListImpl.h" |
6 | 6 |
7 #include "core/editing/markers/DocumentMarkerListEditor.h" | 7 #include "core/editing/markers/DocumentMarkerListEditor.h" |
8 | 8 |
9 namespace blink { | 9 namespace blink { |
10 | 10 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 | 59 |
60 void SpellCheckMarkerListImpl::Clear() { | 60 void SpellCheckMarkerListImpl::Clear() { |
61 markers_.clear(); | 61 markers_.clear(); |
62 } | 62 } |
63 | 63 |
64 const HeapVector<Member<DocumentMarker>>& SpellCheckMarkerListImpl::GetMarkers() | 64 const HeapVector<Member<DocumentMarker>>& SpellCheckMarkerListImpl::GetMarkers() |
65 const { | 65 const { |
66 return markers_; | 66 return markers_; |
67 } | 67 } |
68 | 68 |
| 69 HeapVector<Member<DocumentMarker>> |
| 70 SpellCheckMarkerListImpl::MarkersIntersectingRange(unsigned start_offset, |
| 71 unsigned end_offset) const { |
| 72 return DocumentMarkerListEditor::MarkersIntersectingRange( |
| 73 markers_, start_offset, end_offset); |
| 74 } |
| 75 |
69 bool SpellCheckMarkerListImpl::MoveMarkers(int length, | 76 bool SpellCheckMarkerListImpl::MoveMarkers(int length, |
70 DocumentMarkerList* dst_list) { | 77 DocumentMarkerList* dst_list) { |
71 return DocumentMarkerListEditor::MoveMarkers(&markers_, length, dst_list); | 78 return DocumentMarkerListEditor::MoveMarkers(&markers_, length, dst_list); |
72 } | 79 } |
73 | 80 |
74 bool SpellCheckMarkerListImpl::RemoveMarkers(unsigned start_offset, | 81 bool SpellCheckMarkerListImpl::RemoveMarkers(unsigned start_offset, |
75 int length) { | 82 int length) { |
76 return DocumentMarkerListEditor::RemoveMarkers(&markers_, start_offset, | 83 return DocumentMarkerListEditor::RemoveMarkers(&markers_, start_offset, |
77 length); | 84 length); |
78 } | 85 } |
(...skipping 21 matching lines...) Expand all Loading... |
100 const String& marker_text = node_text.Substring(start, length); | 107 const String& marker_text = node_text.Substring(start, length); |
101 if (words.Contains(marker_text)) { | 108 if (words.Contains(marker_text)) { |
102 markers_.erase(j - 1); | 109 markers_.erase(j - 1); |
103 removed_markers = true; | 110 removed_markers = true; |
104 } | 111 } |
105 } | 112 } |
106 return removed_markers; | 113 return removed_markers; |
107 } | 114 } |
108 | 115 |
109 } // namespace blink | 116 } // namespace blink |
OLD | NEW |