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

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

Issue 2820343004: [DMC #4] Add CompositionMarkerListImpl (Closed)
Patch Set: Add comments 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 #ifndef CompositionMarkerListImpl_h
6 #define CompositionMarkerListImpl_h
7
8 #include "core/editing/markers/DocumentMarkerList.h"
9
10 namespace blink {
11
12 // Implementation of DocumentMarkerList for Composition markers.
13 // Markers are kept sorted by start offset, under the assumption that
14 // Composition markers are typically inserted in an order.
Xiaocheng 2017/04/26 14:17:53 Is MoveMarkers() the only site making out-of-order
rlanday 2017/04/26 20:33:24 The implication is supposed to be that we can keep
15 class CORE_EXPORT CompositionMarkerListImpl : public DocumentMarkerList {
Xiaocheng 2017/04/26 14:17:53 nit: final
16 public:
17 CompositionMarkerListImpl() = default;
18
19 // DocumentMarkerList implementations
20 bool IsEmpty() const final;
21
22 void Add(DocumentMarker*) final;
23 void Clear() final;
24
25 const HeapVector<Member<RenderedDocumentMarker>>& GetMarkers() const final;
26
27 bool MoveMarkers(int length, DocumentMarkerList* dst_list) final;
28 bool RemoveMarkers(unsigned start_offset, int length) final;
29 bool ShiftMarkers(unsigned offset,
30 unsigned old_length,
31 unsigned new_length) final;
32 DECLARE_TRACE();
33
34 private:
35 HeapVector<Member<RenderedDocumentMarker>> markers_;
36
37 DISALLOW_COPY_AND_ASSIGN(CompositionMarkerListImpl);
38 };
39
40 } // namespace blink
41
42 #endif // CompositionMarkerListImpl_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698