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 DocumentMarker* SpellCheckMarkerListImpl::FirstMarkerIntersectingRange( |
| 70 unsigned start_offset, |
| 71 unsigned end_offset) const { |
| 72 return DocumentMarkerListEditor::FirstMarkerIntersectingRange( |
| 73 markers_, start_offset, end_offset); |
| 74 } |
| 75 |
69 HeapVector<Member<DocumentMarker>> | 76 HeapVector<Member<DocumentMarker>> |
70 SpellCheckMarkerListImpl::MarkersIntersectingRange(unsigned start_offset, | 77 SpellCheckMarkerListImpl::MarkersIntersectingRange(unsigned start_offset, |
71 unsigned end_offset) const { | 78 unsigned end_offset) const { |
72 return DocumentMarkerListEditor::MarkersIntersectingRange( | 79 return DocumentMarkerListEditor::MarkersIntersectingRange( |
73 markers_, start_offset, end_offset); | 80 markers_, start_offset, end_offset); |
74 } | 81 } |
75 | 82 |
76 bool SpellCheckMarkerListImpl::MoveMarkers(int length, | 83 bool SpellCheckMarkerListImpl::MoveMarkers(int length, |
77 DocumentMarkerList* dst_list) { | 84 DocumentMarkerList* dst_list) { |
78 return DocumentMarkerListEditor::MoveMarkers(&markers_, length, dst_list); | 85 return DocumentMarkerListEditor::MoveMarkers(&markers_, length, dst_list); |
(...skipping 28 matching lines...) Expand all Loading... |
107 const String& marker_text = node_text.Substring(start, length); | 114 const String& marker_text = node_text.Substring(start, length); |
108 if (words.Contains(marker_text)) { | 115 if (words.Contains(marker_text)) { |
109 markers_.erase(j - 1); | 116 markers_.erase(j - 1); |
110 removed_markers = true; | 117 removed_markers = true; |
111 } | 118 } |
112 } | 119 } |
113 return removed_markers; | 120 return removed_markers; |
114 } | 121 } |
115 | 122 |
116 } // namespace blink | 123 } // namespace blink |
OLD | NEW |