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

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

Issue 2773883003: Add CompositionMarkerList in preparation for DocumentMarkerController refactor (Closed)
Patch Set: Fix code that doesn't compile...what am I doing... Created 3 years, 9 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
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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 const String& description() const; 154 const String& description() const;
155 bool activeMatch() const; 155 bool activeMatch() const;
156 Color underlineColor() const; 156 Color underlineColor() const;
157 bool thick() const; 157 bool thick() const;
158 Color backgroundColor() const; 158 Color backgroundColor() const;
159 DocumentMarkerDetails* details() const; 159 DocumentMarkerDetails* details() const;
160 160
161 void setActiveMatch(bool); 161 void setActiveMatch(bool);
162 void clearDetails() { m_details.clear(); } 162 void clearDetails() { m_details.clear(); }
163 163
164 struct ShiftMarkerResult {
165 // Other classes should not call following setters.
Xiaocheng 2017/03/24 03:57:47 Irrelevant change?
rlanday 2017/03/24 17:45:48 oops, rebase mistake I think
166 unsigned newStartOffset;
167 unsigned newEndOffset;
168 bool shouldRemoveMarker;
169 };
170
171 ShiftMarkerResult getShiftedMarkerPosition(unsigned offset,
172 unsigned oldLength,
173 unsigned newLength) const;
174
164 // Offset modifications are done by DocumentMarkerController. 175 // Offset modifications are done by DocumentMarkerController.
Xiaocheng 2017/03/24 03:57:47 DocumentMarkerList also calls them.
rlanday 2017/03/24 17:45:48 Yeah, I have the comment updated in my big patch f
Xiaocheng 2017/03/24 19:43:49 Please modify the comment in this patch. Otherwise
165 // Other classes should not call following setters. 176 // Other classes should not call following setters.
166 void setStartOffset(unsigned offset) { m_startOffset = offset; } 177 void setStartOffset(unsigned offset) { m_startOffset = offset; }
167 void setEndOffset(unsigned offset) { m_endOffset = offset; } 178 void setEndOffset(unsigned offset) { m_endOffset = offset; }
168 void shiftOffsets(int delta); 179 void shiftOffsets(int delta);
169 180
170 bool operator==(const DocumentMarker& o) const { 181 bool operator==(const DocumentMarker& o) const {
171 return type() == o.type() && startOffset() == o.startOffset() && 182 return type() == o.type() && startOffset() == o.startOffset() &&
172 endOffset() == o.endOffset(); 183 endOffset() == o.endOffset();
173 } 184 }
174 185
(...skipping 22 matching lines...) Expand all
197 virtual bool isDescription() const { return false; } 208 virtual bool isDescription() const { return false; }
198 virtual bool isTextMatch() const { return false; } 209 virtual bool isTextMatch() const { return false; }
199 virtual bool isComposition() const { return false; } 210 virtual bool isComposition() const { return false; }
200 211
201 DEFINE_INLINE_VIRTUAL_TRACE() {} 212 DEFINE_INLINE_VIRTUAL_TRACE() {}
202 }; 213 };
203 214
204 } // namespace blink 215 } // namespace blink
205 216
206 #endif // DocumentMarker_h 217 #endif // DocumentMarker_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698