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