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

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

Issue 2902393003: [DMC #17.5] Eliminate DocumentMarker and TextMatchMarker copy constructors (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/DocumentMarker.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 * This file is part of the DOM implementation for WebCore. 2 * This file is part of the DOM implementation for WebCore.
3 * 3 *
4 * Copyright (C) 2006 Apple Computer, Inc. 4 * Copyright (C) 2006 Apple Computer, Inc.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 DocumentMarker(MarkerType, 135 DocumentMarker(MarkerType,
136 unsigned start_offset, 136 unsigned start_offset,
137 unsigned end_offset, 137 unsigned end_offset,
138 const String& description); 138 const String& description);
139 DocumentMarker(unsigned start_offset, 139 DocumentMarker(unsigned start_offset,
140 unsigned end_offset, 140 unsigned end_offset,
141 Color underline_color, 141 Color underline_color,
142 bool thick, 142 bool thick,
143 Color background_color); 143 Color background_color);
144 144
145 DocumentMarker(const DocumentMarker&);
146
147 MarkerType GetType() const { return type_; } 145 MarkerType GetType() const { return type_; }
148 unsigned StartOffset() const { return start_offset_; } 146 unsigned StartOffset() const { return start_offset_; }
149 unsigned EndOffset() const { return end_offset_; } 147 unsigned EndOffset() const { return end_offset_; }
150 148
151 const String& Description() const; 149 const String& Description() const;
152 bool IsActiveMatch() const; 150 bool IsActiveMatch() const;
153 Color UnderlineColor() const; 151 Color UnderlineColor() const;
154 bool Thick() const; 152 bool Thick() const;
155 Color BackgroundColor() const; 153 Color BackgroundColor() const;
156 DocumentMarkerDetails* Details() const; 154 DocumentMarkerDetails* Details() const;
(...skipping 19 matching lines...) Expand all
176 DECLARE_TRACE(); 174 DECLARE_TRACE();
177 175
178 protected: 176 protected:
179 DocumentMarker(unsigned start_offset, unsigned end_offset, MatchStatus); 177 DocumentMarker(unsigned start_offset, unsigned end_offset, MatchStatus);
180 178
181 private: 179 private:
182 MarkerType type_; 180 MarkerType type_;
183 unsigned start_offset_; 181 unsigned start_offset_;
184 unsigned end_offset_; 182 unsigned end_offset_;
185 Member<DocumentMarkerDetails> details_; 183 Member<DocumentMarkerDetails> details_;
184
185 DISALLOW_COPY_AND_ASSIGN(DocumentMarker);
186 }; 186 };
187 187
188 using DocumentMarkerVector = HeapVector<Member<DocumentMarker>>; 188 using DocumentMarkerVector = HeapVector<Member<DocumentMarker>>;
189 189
190 inline DocumentMarkerDetails* DocumentMarker::Details() const { 190 inline DocumentMarkerDetails* DocumentMarker::Details() const {
191 return details_.Get(); 191 return details_.Get();
192 } 192 }
193 193
194 class DocumentMarkerDetails 194 class DocumentMarkerDetails
195 : public GarbageCollectedFinalized<DocumentMarkerDetails> { 195 : public GarbageCollectedFinalized<DocumentMarkerDetails> {
196 public: 196 public:
197 DocumentMarkerDetails() {} 197 DocumentMarkerDetails() {}
198 virtual ~DocumentMarkerDetails(); 198 virtual ~DocumentMarkerDetails();
199 virtual bool IsDescription() const { return false; } 199 virtual bool IsDescription() const { return false; }
200 virtual bool IsTextMatch() const { return false; } 200 virtual bool IsTextMatch() const { return false; }
201 virtual bool IsComposition() const { return false; } 201 virtual bool IsComposition() const { return false; }
202 202
203 DEFINE_INLINE_VIRTUAL_TRACE() {} 203 DEFINE_INLINE_VIRTUAL_TRACE() {}
204 }; 204 };
205 205
206 } // namespace blink 206 } // namespace blink
207 207
208 #endif // DocumentMarker_h 208 #endif // DocumentMarker_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/markers/DocumentMarker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698