Chromium Code Reviews| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 72 const Position& end, | 72 const Position& end, |
| 73 Color underline_color, | 73 Color underline_color, |
| 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 RemoveMarkersInRange(const EphemeralRange&, DocumentMarker::MarkerTypes); | 80 void RemoveMarkersInRange(const EphemeralRange&, DocumentMarker::MarkerTypes); |
| 81 void RemoveMarkers( | 81 void RemoveMarkers( |
| 82 Node*, | |
| 83 unsigned start_offset, | |
| 84 int length, | |
| 85 DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers()); | |
| 86 void RemoveMarkers( | |
| 87 DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers()); | 82 DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers()); |
| 88 void RemoveMarkers( | 83 void RemoveMarkers( |
| 89 Node*, | 84 Node*, |
| 90 DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers()); | 85 DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers()); |
| 91 void RemoveMarkers(const MarkerRemoverPredicate& should_remove_marker); | 86 void RemoveMarkers(const MarkerRemoverPredicate& should_remove_marker); |
| 92 void RepaintMarkers( | 87 void RepaintMarkers( |
| 93 DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers()); | 88 DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers()); |
| 94 // Returns true if markers within a range are found. | 89 // Returns true if markers within a range are found. |
| 95 bool SetMarkersActive(const EphemeralRange&, bool); | 90 bool SetMarkersActive(const EphemeralRange&, bool); |
| 96 // Returns true if markers within a range defined by a node, |startOffset| and | 91 // Returns true if markers within a range defined by a node, |startOffset| and |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 128 void AddMarker(Node*, const DocumentMarker&); | 123 void AddMarker(Node*, const DocumentMarker&); |
| 129 | 124 |
| 130 using MarkerList = HeapVector<Member<RenderedDocumentMarker>>; | 125 using MarkerList = HeapVector<Member<RenderedDocumentMarker>>; |
| 131 using MarkerLists = | 126 using MarkerLists = |
| 132 HeapVector<Member<MarkerList>, DocumentMarker::kMarkerTypeIndexesCount>; | 127 HeapVector<Member<MarkerList>, DocumentMarker::kMarkerTypeIndexesCount>; |
| 133 using MarkerMap = HeapHashMap<WeakMember<const Node>, Member<MarkerLists>>; | 128 using MarkerMap = HeapHashMap<WeakMember<const Node>, Member<MarkerLists>>; |
| 134 static Member<MarkerList>& ListForType(MarkerLists*, | 129 static Member<MarkerList>& ListForType(MarkerLists*, |
| 135 DocumentMarker::MarkerType); | 130 DocumentMarker::MarkerType); |
| 136 bool PossiblyHasMarkers(DocumentMarker::MarkerTypes); | 131 bool PossiblyHasMarkers(DocumentMarker::MarkerTypes); |
| 137 void RemoveMarkersFromList(MarkerMap::iterator, DocumentMarker::MarkerTypes); | 132 void RemoveMarkersFromList(MarkerMap::iterator, DocumentMarker::MarkerTypes); |
| 138 void RemoveMarkers(TextIterator&, DocumentMarker::MarkerTypes); | 133 void RemoveMarkers(TextIterator&, DocumentMarker::MarkerTypes); |
|
rlanday
2017/04/21 03:51:13
We already have another private RemoveMarkers() me
Xiaocheng
2017/04/21 05:22:46
If this function is the sink called by all other f
rlanday
2017/04/21 05:28:15
I decided to just remove the default param in this
| |
| 134 void RemoveMarkersInternal( | |
| 135 Node*, | |
| 136 unsigned start_offset, | |
| 137 int length, | |
| 138 DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers()); | |
| 139 | 139 |
| 140 MarkerMap markers_; | 140 MarkerMap markers_; |
| 141 // Provide a quick way to determine whether a particular marker type is absent | 141 // Provide a quick way to determine whether a particular marker type is absent |
| 142 // without going through the map. | 142 // without going through the map. |
| 143 DocumentMarker::MarkerTypes possibly_existing_marker_types_; | 143 DocumentMarker::MarkerTypes possibly_existing_marker_types_; |
| 144 const Member<const Document> document_; | 144 const Member<const Document> document_; |
| 145 }; | 145 }; |
| 146 | 146 |
| 147 } // namespace blink | 147 } // namespace blink |
| 148 | 148 |
| 149 #ifndef NDEBUG | 149 #ifndef NDEBUG |
| 150 void showDocumentMarkers(const blink::DocumentMarkerController*); | 150 void showDocumentMarkers(const blink::DocumentMarkerController*); |
| 151 #endif | 151 #endif |
| 152 | 152 |
| 153 #endif // DocumentMarkerController_h | 153 #endif // DocumentMarkerController_h |
| OLD | NEW |