OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "core/editing/markers/SpellCheckMarkerListImpl.h" |
| 6 |
| 7 #include "core/editing/markers/DocumentMarkerListEditor.h" |
| 8 #include "core/editing/markers/RenderedDocumentMarker.h" |
| 9 |
| 10 namespace blink { |
| 11 |
| 12 bool SpellCheckMarkerListImpl::IsEmpty() const { |
| 13 return markers_.IsEmpty(); |
| 14 } |
| 15 |
| 16 void SpellCheckMarkerListImpl::Clear() { |
| 17 markers_.clear(); |
| 18 } |
| 19 |
| 20 const HeapVector<Member<RenderedDocumentMarker>>& |
| 21 SpellCheckMarkerListImpl::GetMarkers() const { |
| 22 return markers_; |
| 23 } |
| 24 |
| 25 bool SpellCheckMarkerListImpl::MoveMarkers(int length, |
| 26 DocumentMarkerList* dst_list) { |
| 27 return DocumentMarkerListEditor::MoveMarkers(&markers_, length, dst_list); |
| 28 } |
| 29 |
| 30 bool SpellCheckMarkerListImpl::RemoveMarkers(unsigned start_offset, |
| 31 int length) { |
| 32 return DocumentMarkerListEditor::RemoveMarkers(&markers_, start_offset, |
| 33 length); |
| 34 } |
| 35 |
| 36 bool SpellCheckMarkerListImpl::RemoveMarkersUnderWords( |
| 37 const String& node_text, |
| 38 const Vector<String>& words) { |
| 39 return DocumentMarkerListEditor::RemoveMarkersUnderWords(&markers_, node_text, |
| 40 words); |
| 41 } |
| 42 |
| 43 bool SpellCheckMarkerListImpl::ShiftMarkers(unsigned offset, |
| 44 unsigned old_length, |
| 45 unsigned new_length) { |
| 46 return DocumentMarkerListEditor::ShiftMarkers(&markers_, offset, old_length, |
| 47 new_length); |
| 48 } |
| 49 |
| 50 DEFINE_TRACE(SpellCheckMarkerListImpl) { |
| 51 visitor->Trace(markers_); |
| 52 DocumentMarkerList::Trace(visitor); |
| 53 } |
| 54 |
| 55 } // namespace blink |
OLD | NEW |