Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Side by Side Diff: third_party/WebKit/Source/core/editing/markers/CompositionMarkerListImpl.cpp

Issue 2820343004: [DMC #4] Add CompositionMarkerListImpl (Closed)
Patch Set: Use correct base commit Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698