OLD | NEW |
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 Loading... |
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 |
OLD | NEW |