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

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

Issue 2883503004: [DMC #7] Only create RenderedDocumentMarkers for TextMatchMarkerListImpl (Closed)
Patch Set: Rebase on InvalidateRectsForAllMarkers() refactor 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
1 // Copyright 2017 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef TextMatchMarkerListImpl_h 5 #ifndef TextMatchMarkerListImpl_h
6 #define TextMatchMarkerListImpl_h 6 #define TextMatchMarkerListImpl_h
7 7
8 #include "core/editing/markers/DocumentMarkerList.h" 8 #include "core/editing/markers/DocumentMarkerList.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 // Implementation of DocumentMarkerList for TextMatch markers. 12 // Implementation of DocumentMarkerList for TextMatch markers.
13 // Markers are kept sorted by start offset, under the assumption that 13 // Markers are kept sorted by start offset, under the assumption that
14 // TextMatch markers are typically inserted in an order. 14 // TextMatch markers are typically inserted in an order.
15 class CORE_EXPORT TextMatchMarkerListImpl final : public DocumentMarkerList { 15 class CORE_EXPORT TextMatchMarkerListImpl final : public DocumentMarkerList {
16 public: 16 public:
17 TextMatchMarkerListImpl() = default; 17 TextMatchMarkerListImpl() = default;
18 18
19 // DocumentMarkerList implementations 19 // DocumentMarkerList implementations
20 DocumentMarker::MarkerType MarkerType() const final; 20 DocumentMarker::MarkerType MarkerType() const final;
21 21
22 bool IsEmpty() const final; 22 bool IsEmpty() const final;
23 23
24 void Add(DocumentMarker*) final; 24 void Add(DocumentMarker*) final;
25 void Clear() final; 25 void Clear() final;
26 26
27 const HeapVector<Member<RenderedDocumentMarker>>& GetMarkers() const final; 27 const HeapVector<Member<DocumentMarker>>& GetMarkers() const final;
28 28
29 bool MoveMarkers(int length, DocumentMarkerList* dst_list) final; 29 bool MoveMarkers(int length, DocumentMarkerList* dst_list) final;
30 bool RemoveMarkers(unsigned start_offset, int length) final; 30 bool RemoveMarkers(unsigned start_offset, int length) final;
31 bool ShiftMarkers(unsigned offset, 31 bool ShiftMarkers(unsigned offset,
32 unsigned old_length, 32 unsigned old_length,
33 unsigned new_length) final; 33 unsigned new_length) final;
34 DECLARE_VIRTUAL_TRACE(); 34 DECLARE_VIRTUAL_TRACE();
35 35
36 private: 36 private:
37 HeapVector<Member<RenderedDocumentMarker>> markers_; 37 HeapVector<Member<DocumentMarker>> markers_;
38 38
39 DISALLOW_COPY_AND_ASSIGN(TextMatchMarkerListImpl); 39 DISALLOW_COPY_AND_ASSIGN(TextMatchMarkerListImpl);
40 }; 40 };
41 41
42 } // namespace blink 42 } // namespace blink
43 43
44 #endif // TextMatchMarkerListImpl_h 44 #endif // TextMatchMarkerListImpl_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698