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

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

Issue 2785023002: Remove unused DocumentMarker comparison operators (Closed)
Patch Set: Rebase 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 | no next file » | 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 Optional<MarkerOffsets> ComputeOffsetsAfterShift(unsigned offset, 173 Optional<MarkerOffsets> ComputeOffsetsAfterShift(unsigned offset,
174 unsigned old_length, 174 unsigned old_length,
175 unsigned new_length) const; 175 unsigned new_length) const;
176 176
177 // Offset modifications are done by DocumentMarkerController. 177 // Offset modifications are done by DocumentMarkerController.
178 // Other classes should not call following setters. 178 // Other classes should not call following setters.
179 void SetStartOffset(unsigned offset) { start_offset_ = offset; } 179 void SetStartOffset(unsigned offset) { start_offset_ = offset; }
180 void SetEndOffset(unsigned offset) { end_offset_ = offset; } 180 void SetEndOffset(unsigned offset) { end_offset_ = offset; }
181 void ShiftOffsets(int delta); 181 void ShiftOffsets(int delta);
182 182
183 bool operator==(const DocumentMarker& o) const {
184 return GetType() == o.GetType() && StartOffset() == o.StartOffset() &&
185 EndOffset() == o.EndOffset();
186 }
187
188 bool operator!=(const DocumentMarker& o) const { return !(*this == o); }
189
190 DECLARE_TRACE(); 183 DECLARE_TRACE();
191 184
192 private: 185 private:
193 MarkerType type_; 186 MarkerType type_;
194 unsigned start_offset_; 187 unsigned start_offset_;
195 unsigned end_offset_; 188 unsigned end_offset_;
196 Member<DocumentMarkerDetails> details_; 189 Member<DocumentMarkerDetails> details_;
197 }; 190 };
198 191
199 using DocumentMarkerVector = HeapVector<Member<DocumentMarker>>; 192 using DocumentMarkerVector = HeapVector<Member<DocumentMarker>>;
(...skipping 10 matching lines...) Expand all
210 virtual bool IsDescription() const { return false; } 203 virtual bool IsDescription() const { return false; }
211 virtual bool IsTextMatch() const { return false; } 204 virtual bool IsTextMatch() const { return false; }
212 virtual bool IsComposition() const { return false; } 205 virtual bool IsComposition() const { return false; }
213 206
214 DEFINE_INLINE_VIRTUAL_TRACE() {} 207 DEFINE_INLINE_VIRTUAL_TRACE() {}
215 }; 208 };
216 209
217 } // namespace blink 210 } // namespace blink
218 211
219 #endif // DocumentMarker_h 212 #endif // DocumentMarker_h
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698