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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 void ShowMarkers() const; | 102 void ShowMarkers() const; |
103 #endif | 103 #endif |
104 | 104 |
105 // SynchronousMutationObserver | 105 // SynchronousMutationObserver |
106 void DidUpdateCharacterData(CharacterData*, | 106 void DidUpdateCharacterData(CharacterData*, |
107 unsigned offset, | 107 unsigned offset, |
108 unsigned old_length, | 108 unsigned old_length, |
109 unsigned new_length) final; | 109 unsigned new_length) final; |
110 | 110 |
111 private: | 111 private: |
112 void AddMarker(Node*, const DocumentMarker&); | 112 void AddMarker(Node*, DocumentMarker*); |
113 | 113 |
114 using MarkerList = HeapVector<Member<RenderedDocumentMarker>>; | 114 using MarkerList = HeapVector<Member<RenderedDocumentMarker>>; |
115 using MarkerLists = | 115 using MarkerLists = |
116 HeapVector<Member<MarkerList>, DocumentMarker::kMarkerTypeIndexesCount>; | 116 HeapVector<Member<MarkerList>, DocumentMarker::kMarkerTypeIndexesCount>; |
117 using MarkerMap = HeapHashMap<WeakMember<const Node>, Member<MarkerLists>>; | 117 using MarkerMap = HeapHashMap<WeakMember<const Node>, Member<MarkerLists>>; |
118 static Member<MarkerList>& ListForType(MarkerLists*, | 118 static Member<MarkerList>& ListForType(MarkerLists*, |
119 DocumentMarker::MarkerType); | 119 DocumentMarker::MarkerType); |
120 bool PossiblyHasMarkers(DocumentMarker::MarkerTypes); | 120 bool PossiblyHasMarkers(DocumentMarker::MarkerTypes); |
121 void RemoveMarkersFromList(MarkerMap::iterator, DocumentMarker::MarkerTypes); | 121 void RemoveMarkersFromList(MarkerMap::iterator, DocumentMarker::MarkerTypes); |
122 void RemoveMarkers(TextIterator&, DocumentMarker::MarkerTypes); | 122 void RemoveMarkers(TextIterator&, DocumentMarker::MarkerTypes); |
123 void RemoveMarkersInternal(Node*, | 123 void RemoveMarkersInternal(Node*, |
124 unsigned start_offset, | 124 unsigned start_offset, |
125 int length, | 125 int length, |
126 DocumentMarker::MarkerTypes); | 126 DocumentMarker::MarkerTypes); |
127 | 127 |
128 MarkerMap markers_; | 128 MarkerMap markers_; |
129 // Provide a quick way to determine whether a particular marker type is absent | 129 // Provide a quick way to determine whether a particular marker type is absent |
130 // without going through the map. | 130 // without going through the map. |
131 DocumentMarker::MarkerTypes possibly_existing_marker_types_; | 131 DocumentMarker::MarkerTypes possibly_existing_marker_types_; |
132 const Member<const Document> document_; | 132 const Member<const Document> document_; |
133 }; | 133 }; |
134 | 134 |
135 } // namespace blink | 135 } // namespace blink |
136 | 136 |
137 #ifndef NDEBUG | 137 #ifndef NDEBUG |
138 void showDocumentMarkers(const blink::DocumentMarkerController*); | 138 void showDocumentMarkers(const blink::DocumentMarkerController*); |
139 #endif | 139 #endif |
140 | 140 |
141 #endif // DocumentMarkerController_h | 141 #endif // DocumentMarkerController_h |
OLD | NEW |