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

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

Issue 2916463002: Refactor DocumentMarkerController::Add*Marker() methods (Closed)
Patch Set: Rebase Created 3 years, 6 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
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*, DocumentMarker*); 112 void AddMarkerInternal(
113 const EphemeralRange&,
114 std::function<DocumentMarker*(int, int)> create_marker_from_offsets);
115 void AddMarkerToNode(Node*, DocumentMarker*);
113 void AddSpellCheckMarker(const EphemeralRange&, 116 void AddSpellCheckMarker(const EphemeralRange&,
114 DocumentMarker::MarkerType, 117 DocumentMarker::MarkerType,
115 const String& description = g_empty_string); 118 const String& description = g_empty_string);
116 119
117 using MarkerLists = HeapVector<Member<DocumentMarkerList>, 120 using MarkerLists = HeapVector<Member<DocumentMarkerList>,
118 DocumentMarker::kMarkerTypeIndexesCount>; 121 DocumentMarker::kMarkerTypeIndexesCount>;
119 using MarkerMap = HeapHashMap<WeakMember<const Node>, Member<MarkerLists>>; 122 using MarkerMap = HeapHashMap<WeakMember<const Node>, Member<MarkerLists>>;
120 static Member<DocumentMarkerList>& ListForType(MarkerLists*, 123 static Member<DocumentMarkerList>& ListForType(MarkerLists*,
121 DocumentMarker::MarkerType); 124 DocumentMarker::MarkerType);
122 bool PossiblyHasMarkers(DocumentMarker::MarkerTypes); 125 bool PossiblyHasMarkers(DocumentMarker::MarkerTypes);
(...skipping 11 matching lines...) Expand all
134 const Member<const Document> document_; 137 const Member<const Document> document_;
135 }; 138 };
136 139
137 } // namespace blink 140 } // namespace blink
138 141
139 #ifndef NDEBUG 142 #ifndef NDEBUG
140 void showDocumentMarkers(const blink::DocumentMarkerController*); 143 void showDocumentMarkers(const blink::DocumentMarkerController*);
141 #endif 144 #endif
142 145
143 #endif // DocumentMarkerController_h 146 #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