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

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

Issue 2784753002: Add TextMatchMarkerList in preparation for DocumentMarkerController refactor (Closed)
Patch Set: Remove "explicit" Created 3 years, 8 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/TextMatchMarker.h"
11
12 namespace blink {
13
14 class DocumentMarker;
15
16 // TextMatchMarkerList only supports adding TextMatch markers in sorted order,
17 // and adds some functionality specific to TextMatch markers.
18 class CORE_EXPORT TextMatchMarkerList : public DocumentMarkerList {
19 public:
20 TextMatchMarkerList();
21
22 // DocumentMarkerList implementations
23 DocumentMarker::MarkerType allowedMarkerType() const final;
24 TextMatchMarker* at(size_t index) final;
25 void add(DocumentMarker*) final;
26
27 // TextMatchMarkerList-specific methods
28 void appendRenderedRectsToInputList(const Node&,
29 Vector<IntRect>* result) const;
30 void invalidateRects();
31 bool setTextMatchMarkersActive(unsigned startOffset,
32 unsigned endOffset,
33 bool active);
34
35 protected:
36 bool markerListIsSorted() const final;
37
38 DECLARE_VIRTUAL_TRACE();
39 DISALLOW_COPY_AND_ASSIGN(TextMatchMarkerList);
40 };
41
42 DEFINE_TYPE_CASTS(TextMatchMarkerList,
43 DocumentMarkerList,
44 list,
45 list->allowedMarkerType() == DocumentMarker::TextMatch,
46 list.allowedMarkerType() == DocumentMarker::TextMatch);
47
48 } // namespace blink
49
50 #endif // TextMatchMarkerList_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698