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