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

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: Make requested changes 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 explicit TextMatchMarkerList();
21
22 // DocumentMarkerList implementations
23 DocumentMarker::MarkerType allowedMarkerType() const final;
24 void add(DocumentMarker*) final;
25
26 // TextMatchMarkerList-specific methods
27 void appendRenderedRectsToInputList(const Node&,
28 Vector<IntRect>* result) const;
29 void invalidateRects();
30 bool setTextMatchMarkersActive(unsigned startOffset,
Xiaocheng 2017/03/30 21:12:07 nit: please use |enum class| return type for bette
31 unsigned endOffset,
32 bool active);
33
34 protected:
35 bool markerListIsSorted() const final;
36
37 DECLARE_VIRTUAL_TRACE();
38 DISALLOW_COPY_AND_ASSIGN(TextMatchMarkerList);
39 };
40
41 DEFINE_TYPE_CASTS(TextMatchMarkerList,
42 DocumentMarkerList,
43 list,
44 list->allowedMarkerType() == DocumentMarker::TextMatch,
45 list.allowedMarkerType() == DocumentMarker::TextMatch);
46
47 } // namespace blink
48
49 #endif // TextMatchMarkerList_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698