OLD | NEW |
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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 struct ShiftMarkerResult { | 164 struct ShiftMarkerResult { |
165 unsigned newStartOffset; | 165 unsigned newStartOffset; |
166 unsigned newEndOffset; | 166 unsigned newEndOffset; |
167 bool shouldRemoveMarker; | 167 bool shouldRemoveMarker; |
168 }; | 168 }; |
169 | 169 |
170 ShiftMarkerResult getShiftedMarkerPosition(unsigned offset, | 170 ShiftMarkerResult getShiftedMarkerPosition(unsigned offset, |
171 unsigned oldLength, | 171 unsigned oldLength, |
172 unsigned newLength) const; | 172 unsigned newLength) const; |
173 | 173 |
174 // Offset modifications are done by DocumentMarkerController. | 174 // Offset modifications are done by DocumentMarkerController and subclasses of |
175 // Other classes should not call following setters. | 175 // DocumentMarkerList. Other classes should not call following setters. |
176 void setStartOffset(unsigned offset) { m_startOffset = offset; } | 176 void setStartOffset(unsigned offset) { m_startOffset = offset; } |
177 void setEndOffset(unsigned offset) { m_endOffset = offset; } | 177 void setEndOffset(unsigned offset) { m_endOffset = offset; } |
178 void shiftOffsets(int delta); | 178 void shiftOffsets(int delta); |
179 | 179 |
180 bool operator==(const DocumentMarker& o) const { | 180 bool operator==(const DocumentMarker& o) const { |
181 return type() == o.type() && startOffset() == o.startOffset() && | 181 return type() == o.type() && startOffset() == o.startOffset() && |
182 endOffset() == o.endOffset(); | 182 endOffset() == o.endOffset(); |
183 } | 183 } |
184 | 184 |
185 bool operator!=(const DocumentMarker& o) const { return !(*this == o); } | 185 bool operator!=(const DocumentMarker& o) const { return !(*this == o); } |
(...skipping 21 matching lines...) Expand all Loading... |
207 virtual bool isDescription() const { return false; } | 207 virtual bool isDescription() const { return false; } |
208 virtual bool isTextMatch() const { return false; } | 208 virtual bool isTextMatch() const { return false; } |
209 virtual bool isComposition() const { return false; } | 209 virtual bool isComposition() const { return false; } |
210 | 210 |
211 DEFINE_INLINE_VIRTUAL_TRACE() {} | 211 DEFINE_INLINE_VIRTUAL_TRACE() {} |
212 }; | 212 }; |
213 | 213 |
214 } // namespace blink | 214 } // namespace blink |
215 | 215 |
216 #endif // DocumentMarker_h | 216 #endif // DocumentMarker_h |
OLD | NEW |