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