| 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/CompositionMarkerListImpl.h" | 5 #include "core/editing/markers/CompositionMarkerListImpl.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 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 void CompositionMarkerListImpl::Clear() { | 24 void CompositionMarkerListImpl::Clear() { |
| 25 markers_.clear(); | 25 markers_.clear(); |
| 26 } | 26 } |
| 27 | 27 |
| 28 const HeapVector<Member<DocumentMarker>>& | 28 const HeapVector<Member<DocumentMarker>>& |
| 29 CompositionMarkerListImpl::GetMarkers() const { | 29 CompositionMarkerListImpl::GetMarkers() const { |
| 30 return markers_; | 30 return markers_; |
| 31 } | 31 } |
| 32 | 32 |
| 33 HeapVector<Member<DocumentMarker>> |
| 34 CompositionMarkerListImpl::MarkersIntersectingRange(unsigned start_offset, |
| 35 unsigned end_offset) const { |
| 36 return DocumentMarkerListEditor::MarkersIntersectingRange( |
| 37 markers_, start_offset, end_offset); |
| 38 } |
| 39 |
| 33 bool CompositionMarkerListImpl::MoveMarkers(int length, | 40 bool CompositionMarkerListImpl::MoveMarkers(int length, |
| 34 DocumentMarkerList* dst_markers_) { | 41 DocumentMarkerList* dst_markers_) { |
| 35 return DocumentMarkerListEditor::MoveMarkers(&markers_, length, dst_markers_); | 42 return DocumentMarkerListEditor::MoveMarkers(&markers_, length, dst_markers_); |
| 36 } | 43 } |
| 37 | 44 |
| 38 bool CompositionMarkerListImpl::RemoveMarkers(unsigned start_offset, | 45 bool CompositionMarkerListImpl::RemoveMarkers(unsigned start_offset, |
| 39 int length) { | 46 int length) { |
| 40 return DocumentMarkerListEditor::RemoveMarkers(&markers_, start_offset, | 47 return DocumentMarkerListEditor::RemoveMarkers(&markers_, start_offset, |
| 41 length); | 48 length); |
| 42 } | 49 } |
| 43 | 50 |
| 44 bool CompositionMarkerListImpl::ShiftMarkers(unsigned offset, | 51 bool CompositionMarkerListImpl::ShiftMarkers(unsigned offset, |
| 45 unsigned old_length, | 52 unsigned old_length, |
| 46 unsigned new_length) { | 53 unsigned new_length) { |
| 47 return DocumentMarkerListEditor::ShiftMarkersContentIndependent( | 54 return DocumentMarkerListEditor::ShiftMarkersContentIndependent( |
| 48 &markers_, offset, old_length, new_length); | 55 &markers_, offset, old_length, new_length); |
| 49 } | 56 } |
| 50 | 57 |
| 51 DEFINE_TRACE(CompositionMarkerListImpl) { | 58 DEFINE_TRACE(CompositionMarkerListImpl) { |
| 52 visitor->Trace(markers_); | 59 visitor->Trace(markers_); |
| 53 DocumentMarkerList::Trace(visitor); | 60 DocumentMarkerList::Trace(visitor); |
| 54 } | 61 } |
| 55 | 62 |
| 56 } // namespace blink | 63 } // namespace blink |
| OLD | NEW |