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

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

Issue 2723663002: Refactor DocumentMarkerController (Closed)
Patch Set: Rebase on https://codereview.chromium.org/2755013004 Created 3 years, 9 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 EditingMarkerList_h
6 #define EditingMarkerList_h
7
8 #include "core/editing/markers/DocumentMarkerList.h"
9
10 namespace blink {
11
12 class DocumentMarker;
13
14 class EditingMarkerList : public DocumentMarkerList {
15 WTF_MAKE_NONCOPYABLE(EditingMarkerList);
16
17 public:
18 explicit EditingMarkerList(DocumentMarkerController*);
19
20 // DocumentMarkerList implementations
21 size_t size() const final;
22 bool empty() const final;
23 DocumentMarker* at(size_t index) final;
24
25 void clear() final;
26
27 iterator begin() final;
28 iterator end() final;
29 const_iterator begin() const final;
30 const_iterator end() const final;
31
32 void appendMarkersToInputList(DocumentMarkerVector* list) const final;
33 bool copyMarkers(unsigned startOffset,
34 int length,
35 Node* dstNode,
36 int delta) const final;
37 void removeMarkers(unsigned startOffset,
38 int length,
39 bool shouldRemovePartiallyOverlappingMarkers,
40 bool* didRemoveMarker) final;
41 bool shiftMarkers(unsigned offset,
42 unsigned oldLength,
43 unsigned newLength) final;
44
45 // EditingMarkerList-specific
46 virtual void insert(DocumentMarker*);
47
48 DECLARE_VIRTUAL_TRACE();
49
50 protected:
51 void sortMarkerList();
52
53 bool m_markersAreSorted;
54 HeapVector<Member<DocumentMarker>> m_markers;
55 };
56
57 } // namespace blink
58
59 #endif // EditingMarkerList_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698