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::ShiftMarkers(unsigned offset, |
| 37 unsigned old_length, |
| 38 unsigned new_length) { |
| 39 return DocumentMarkerListEditor::ShiftMarkers(&markers_, offset, old_length, |
| 40 new_length); |
| 41 } |
| 42 |
| 43 DEFINE_TRACE(SpellCheckMarkerListImpl) { |
| 44 visitor->Trace(markers_); |
| 45 DocumentMarkerList::Trace(visitor); |
| 46 } |
| 47 |
| 48 } // namespace blink |
OLD | NEW |