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

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

Issue 2822963002: [DMC #1.3] Add DocumentMarkerController::ListForType() (Closed)
Patch Set: 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
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
7 * reserved. 7 * reserved.
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
9 * (http://www.torchmobile.com/) 9 * (http://www.torchmobile.com/)
10 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 unsigned old_length, 150 unsigned old_length,
151 unsigned new_length) final; 151 unsigned new_length) final;
152 152
153 private: 153 private:
154 void AddMarker(Node*, const DocumentMarker&); 154 void AddMarker(Node*, const DocumentMarker&);
155 155
156 using MarkerList = HeapVector<Member<RenderedDocumentMarker>>; 156 using MarkerList = HeapVector<Member<RenderedDocumentMarker>>;
157 using MarkerLists = 157 using MarkerLists =
158 HeapVector<Member<MarkerList>, DocumentMarker::kMarkerTypeIndexesCount>; 158 HeapVector<Member<MarkerList>, DocumentMarker::kMarkerTypeIndexesCount>;
159 using MarkerMap = HeapHashMap<WeakMember<const Node>, Member<MarkerLists>>; 159 using MarkerMap = HeapHashMap<WeakMember<const Node>, Member<MarkerLists>>;
160 static Member<MarkerList>& ListForType(MarkerLists*,
rlanday 2017/04/17 08:19:46 I added this as a static method instead of just pu
yosin_UTC9 2017/04/17 09:13:44 Maybe introduce |DocumentMarkerListSet| class?
161 DocumentMarker::MarkerType);
160 bool PossiblyHasMarkers(DocumentMarker::MarkerTypes); 162 bool PossiblyHasMarkers(DocumentMarker::MarkerTypes);
161 void RemoveMarkersFromList(MarkerMap::iterator, DocumentMarker::MarkerTypes); 163 void RemoveMarkersFromList(MarkerMap::iterator, DocumentMarker::MarkerTypes);
162 void RemoveMarkers(TextIterator&, DocumentMarker::MarkerTypes); 164 void RemoveMarkers(TextIterator&, DocumentMarker::MarkerTypes);
163 165
164 MarkerMap markers_; 166 MarkerMap markers_;
165 // Provide a quick way to determine whether a particular marker type is absent 167 // Provide a quick way to determine whether a particular marker type is absent
166 // without going through the map. 168 // without going through the map.
167 DocumentMarker::MarkerTypes possibly_existing_marker_types_; 169 DocumentMarker::MarkerTypes possibly_existing_marker_types_;
168 const Member<const Document> document_; 170 const Member<const Document> document_;
169 }; 171 };
170 172
171 } // namespace blink 173 } // namespace blink
172 174
173 #ifndef NDEBUG 175 #ifndef NDEBUG
174 void showDocumentMarkers(const blink::DocumentMarkerController*); 176 void showDocumentMarkers(const blink::DocumentMarkerController*);
175 #endif 177 #endif
176 178
177 #endif // DocumentMarkerController_h 179 #endif // DocumentMarkerController_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698