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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 bool thick, | 74 bool thick, |
75 Color background_color); | 75 Color background_color); |
76 | 76 |
77 void MoveMarkers(Node* src_node, int length, Node* dst_node); | 77 void MoveMarkers(Node* src_node, int length, Node* dst_node); |
78 | 78 |
79 void PrepareForDestruction(); | 79 void PrepareForDestruction(); |
80 void RemoveMarkers( | 80 void RemoveMarkers( |
81 const EphemeralRange&, | 81 const EphemeralRange&, |
82 DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers()); | 82 DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers()); |
83 void RemoveMarkers( | 83 void RemoveMarkers( |
84 Node*, | |
85 unsigned start_offset, | |
86 int length, | |
87 DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers()); | |
88 void RemoveMarkers( | |
89 DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers()); | 84 DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers()); |
90 void RemoveMarkers( | 85 void RemoveMarkers( |
91 Node*, | 86 Node*, |
92 DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers()); | 87 DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers()); |
93 void RemoveMarkers(const MarkerRemoverPredicate& should_remove_marker); | 88 void RemoveMarkers(const MarkerRemoverPredicate& should_remove_marker); |
94 void RepaintMarkers( | 89 void RepaintMarkers( |
95 DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers()); | 90 DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers()); |
96 // Returns true if markers within a range are found. | 91 // Returns true if markers within a range are found. |
97 bool SetMarkersActive(const EphemeralRange&, bool); | 92 bool SetMarkersActive(const EphemeralRange&, bool); |
98 // Returns true if markers within a range defined by a node, |startOffset| and | 93 // Returns true if markers within a range defined by a node, |startOffset| and |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 | 126 |
132 using MarkerList = HeapVector<Member<RenderedDocumentMarker>>; | 127 using MarkerList = HeapVector<Member<RenderedDocumentMarker>>; |
133 using MarkerLists = | 128 using MarkerLists = |
134 HeapVector<Member<MarkerList>, DocumentMarker::kMarkerTypeIndexesCount>; | 129 HeapVector<Member<MarkerList>, DocumentMarker::kMarkerTypeIndexesCount>; |
135 using MarkerMap = HeapHashMap<WeakMember<const Node>, Member<MarkerLists>>; | 130 using MarkerMap = HeapHashMap<WeakMember<const Node>, Member<MarkerLists>>; |
136 static Member<MarkerList>& ListForType(MarkerLists*, | 131 static Member<MarkerList>& ListForType(MarkerLists*, |
137 DocumentMarker::MarkerType); | 132 DocumentMarker::MarkerType); |
138 bool PossiblyHasMarkers(DocumentMarker::MarkerTypes); | 133 bool PossiblyHasMarkers(DocumentMarker::MarkerTypes); |
139 void RemoveMarkersFromList(MarkerMap::iterator, DocumentMarker::MarkerTypes); | 134 void RemoveMarkersFromList(MarkerMap::iterator, DocumentMarker::MarkerTypes); |
140 void RemoveMarkers(TextIterator&, DocumentMarker::MarkerTypes); | 135 void RemoveMarkers(TextIterator&, DocumentMarker::MarkerTypes); |
| 136 void RemoveMarkersInternal(Node*, |
| 137 unsigned start_offset, |
| 138 int length, |
| 139 DocumentMarker::MarkerTypes); |
141 | 140 |
142 MarkerMap markers_; | 141 MarkerMap markers_; |
143 // Provide a quick way to determine whether a particular marker type is absent | 142 // Provide a quick way to determine whether a particular marker type is absent |
144 // without going through the map. | 143 // without going through the map. |
145 DocumentMarker::MarkerTypes possibly_existing_marker_types_; | 144 DocumentMarker::MarkerTypes possibly_existing_marker_types_; |
146 const Member<const Document> document_; | 145 const Member<const Document> document_; |
147 }; | 146 }; |
148 | 147 |
149 } // namespace blink | 148 } // namespace blink |
150 | 149 |
151 #ifndef NDEBUG | 150 #ifndef NDEBUG |
152 void showDocumentMarkers(const blink::DocumentMarkerController*); | 151 void showDocumentMarkers(const blink::DocumentMarkerController*); |
153 #endif | 152 #endif |
154 | 153 |
155 #endif // DocumentMarkerController_h | 154 #endif // DocumentMarkerController_h |
OLD | NEW |