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

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

Issue 2819173002: [DMC #1.1] Refactor DocumentMarkerController::MoveMarkers() (Closed)
Patch Set: Refactor without adding a helper method yet 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 unsigned old_length, 142 unsigned old_length,
143 unsigned new_length) final; 143 unsigned new_length) final;
144 144
145 private: 145 private:
146 void AddMarker(Node*, const DocumentMarker&); 146 void AddMarker(Node*, const DocumentMarker&);
147 147
148 using MarkerList = HeapVector<Member<RenderedDocumentMarker>>; 148 using MarkerList = HeapVector<Member<RenderedDocumentMarker>>;
149 using MarkerLists = 149 using MarkerLists =
150 HeapVector<Member<MarkerList>, DocumentMarker::kMarkerTypeIndexesCount>; 150 HeapVector<Member<MarkerList>, DocumentMarker::kMarkerTypeIndexesCount>;
151 using MarkerMap = HeapHashMap<WeakMember<const Node>, Member<MarkerLists>>; 151 using MarkerMap = HeapHashMap<WeakMember<const Node>, Member<MarkerLists>>;
152 bool MoveMarkersToList(MarkerList* src_list,
Xiaocheng 2017/04/17 06:37:29 Please get rid of this.
153 int length,
154 MarkerList* dst_list);
152 bool PossiblyHasMarkers(DocumentMarker::MarkerTypes); 155 bool PossiblyHasMarkers(DocumentMarker::MarkerTypes);
153 void RemoveMarkersFromList(MarkerMap::iterator, DocumentMarker::MarkerTypes); 156 void RemoveMarkersFromList(MarkerMap::iterator, DocumentMarker::MarkerTypes);
154 void RemoveMarkers(TextIterator&, DocumentMarker::MarkerTypes); 157 void RemoveMarkers(TextIterator&, DocumentMarker::MarkerTypes);
155 158
156 MarkerMap markers_; 159 MarkerMap markers_;
157 // Provide a quick way to determine whether a particular marker type is absent 160 // Provide a quick way to determine whether a particular marker type is absent
158 // without going through the map. 161 // without going through the map.
159 DocumentMarker::MarkerTypes possibly_existing_marker_types_; 162 DocumentMarker::MarkerTypes possibly_existing_marker_types_;
160 const Member<const Document> document_; 163 const Member<const Document> document_;
161 }; 164 };
162 165
163 } // namespace blink 166 } // namespace blink
164 167
165 #ifndef NDEBUG 168 #ifndef NDEBUG
166 void showDocumentMarkers(const blink::DocumentMarkerController*); 169 void showDocumentMarkers(const blink::DocumentMarkerController*);
167 #endif 170 #endif
168 171
169 #endif // DocumentMarkerController_h 172 #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