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

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

Issue 2723663002: Refactor DocumentMarkerController (Closed)
Patch Set: Fix bugs in didUpdateCharacterData 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 TextMatchMarkerList_h
6 #define TextMatchMarkerList_h
7
8 #include "core/editing/markers/DocumentMarkerList.h"
9
10 #include "core/editing/markers/RenderedTextMatchMarker.h"
11 #include "core/editing/markers/TextMatchMarker.h"
12
13 namespace blink {
14
15 class DocumentMarker;
16 class TextMatchMarker;
17
18 class TextMatchMarkerList : public DocumentMarkerList {
19 WTF_MAKE_NONCOPYABLE(TextMatchMarkerList);
20
21 public:
22 explicit TextMatchMarkerList(DocumentMarkerController*);
23
24 // DocumentMarkerList implementations
25 DocumentMarker::MarkerType allowedMarkerType() const final;
26
27 size_t size() const final;
28 bool empty() const final;
29 RenderedTextMatchMarker* at(size_t index) override;
30
31 void clear() final;
32
33 iterator begin() override;
34 iterator end() override;
35 const_iterator begin() const override;
36 const_iterator end() const override;
37
38 void appendMarkersToInputList(DocumentMarkerVector* list) const final;
39 bool copyMarkers(unsigned startOffset,
40 int length,
41 Node* dstNode,
42 int delta) const;
43 void removeMarkers(unsigned startOffset,
44 int length,
45 bool shouldRemovePartiallyOverlappingMarkers,
46 bool* didRemoveMarker) final;
47 bool shiftMarkers(unsigned startOffset,
48 unsigned oldLength,
49 unsigned newLength) final;
50
51 // TextMatchMarkerList-specific methods
52 void push_back(TextMatchMarker*);
53
54 bool setTextMatchMarkersActive(unsigned startOffset,
55 unsigned endOffset,
56 bool active);
57
58 DECLARE_VIRTUAL_TRACE();
59
60 private:
61 HeapVector<Member<DocumentMarker>> m_markers;
62 };
63
64 } // namespace blink
65
66 #endif // TextMatchMarkerList_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698