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 #include "core/editing/markers/RenderedDocumentMarker.h" | 8 #include "core/editing/markers/RenderedDocumentMarker.h" |
9 | 9 |
10 namespace blink { | 10 namespace blink { |
(...skipping 20 matching lines...) Expand all Loading... |
31 DocumentMarkerList* dst_markers_) { | 31 DocumentMarkerList* dst_markers_) { |
32 return DocumentMarkerListEditor::MoveMarkers(&markers_, length, dst_markers_); | 32 return DocumentMarkerListEditor::MoveMarkers(&markers_, length, dst_markers_); |
33 } | 33 } |
34 | 34 |
35 bool CompositionMarkerListImpl::RemoveMarkers(unsigned start_offset, | 35 bool CompositionMarkerListImpl::RemoveMarkers(unsigned start_offset, |
36 int length) { | 36 int length) { |
37 return DocumentMarkerListEditor::RemoveMarkers(&markers_, start_offset, | 37 return DocumentMarkerListEditor::RemoveMarkers(&markers_, start_offset, |
38 length); | 38 length); |
39 } | 39 } |
40 | 40 |
41 bool CompositionMarkerListImpl::RemoveMarkersUnderWords( | |
42 const String& node_text, | |
43 const Vector<String>& words) { | |
44 // This method will be removed from the DocumentMarkerList interface once | |
45 // TextMatchMarkerListImpl is added. DocumentMarkerController shouldn't try to | |
46 // call it on a list storing Composition markers. | |
47 NOTREACHED(); | |
48 return false; | |
49 } | |
50 | |
51 bool CompositionMarkerListImpl::ShiftMarkers(unsigned offset, | 41 bool CompositionMarkerListImpl::ShiftMarkers(unsigned offset, |
52 unsigned old_length, | 42 unsigned old_length, |
53 unsigned new_length) { | 43 unsigned new_length) { |
54 return DocumentMarkerListEditor::ShiftMarkers(&markers_, offset, old_length, | 44 return DocumentMarkerListEditor::ShiftMarkers(&markers_, offset, old_length, |
55 new_length); | 45 new_length); |
56 } | 46 } |
57 | 47 |
58 DEFINE_TRACE(CompositionMarkerListImpl) { | 48 DEFINE_TRACE(CompositionMarkerListImpl) { |
59 visitor->Trace(markers_); | 49 visitor->Trace(markers_); |
60 DocumentMarkerList::Trace(visitor); | 50 DocumentMarkerList::Trace(visitor); |
61 } | 51 } |
62 | 52 |
63 } // namespace blink | 53 } // namespace blink |
OLD | NEW |