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

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

Issue 2822963002: [DMC #1.3] Add DocumentMarkerController::ListForType() (Closed)
Patch Set: Fix nits, remove a dependency 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 unsigned old_length, 145 unsigned old_length,
146 unsigned new_length) final; 146 unsigned new_length) final;
147 147
148 private: 148 private:
149 void AddMarker(Node*, const DocumentMarker&); 149 void AddMarker(Node*, const DocumentMarker&);
150 150
151 using MarkerList = HeapVector<Member<RenderedDocumentMarker>>; 151 using MarkerList = HeapVector<Member<RenderedDocumentMarker>>;
152 using MarkerLists = 152 using MarkerLists =
153 HeapVector<Member<MarkerList>, DocumentMarker::kMarkerTypeIndexesCount>; 153 HeapVector<Member<MarkerList>, DocumentMarker::kMarkerTypeIndexesCount>;
154 using MarkerMap = HeapHashMap<WeakMember<const Node>, Member<MarkerLists>>; 154 using MarkerMap = HeapHashMap<WeakMember<const Node>, Member<MarkerLists>>;
155 static Member<MarkerList>& ListForType(MarkerLists*,
156 DocumentMarker::MarkerType);
155 bool PossiblyHasMarkers(DocumentMarker::MarkerTypes); 157 bool PossiblyHasMarkers(DocumentMarker::MarkerTypes);
156 void RemoveMarkersFromList(MarkerMap::iterator, DocumentMarker::MarkerTypes); 158 void RemoveMarkersFromList(MarkerMap::iterator, DocumentMarker::MarkerTypes);
157 void RemoveMarkers(TextIterator&, DocumentMarker::MarkerTypes); 159 void RemoveMarkers(TextIterator&, DocumentMarker::MarkerTypes);
158 160
159 MarkerMap markers_; 161 MarkerMap markers_;
160 // Provide a quick way to determine whether a particular marker type is absent 162 // Provide a quick way to determine whether a particular marker type is absent
161 // without going through the map. 163 // without going through the map.
162 DocumentMarker::MarkerTypes possibly_existing_marker_types_; 164 DocumentMarker::MarkerTypes possibly_existing_marker_types_;
163 const Member<const Document> document_; 165 const Member<const Document> document_;
164 }; 166 };
165 167
166 } // namespace blink 168 } // namespace blink
167 169
168 #ifndef NDEBUG 170 #ifndef NDEBUG
169 void showDocumentMarkers(const blink::DocumentMarkerController*); 171 void showDocumentMarkers(const blink::DocumentMarkerController*);
170 #endif 172 #endif
171 173
172 #endif // DocumentMarkerController_h 174 #endif // DocumentMarkerController_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698