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 | 164 |
165 struct MarkerOffsets { | 165 struct MarkerOffsets { |
166 unsigned startOffset; | 166 unsigned startOffset; |
167 unsigned endOffset; | 167 unsigned endOffset; |
168 }; | 168 }; |
169 | 169 |
170 Optional<MarkerOffsets> computeOffsetsAfterShift(unsigned offset, | 170 Optional<MarkerOffsets> computeOffsetsAfterShift(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 DECLARE_TRACE(); | 180 DECLARE_TRACE(); |
181 | 181 |
182 protected: | 182 protected: |
183 DocumentMarker(const DocumentMarker&); | 183 DocumentMarker(const DocumentMarker&); |
184 | 184 |
185 private: | 185 private: |
(...skipping 17 matching lines...) Expand all Loading... |
203 virtual bool isDescription() const { return false; } | 203 virtual bool isDescription() const { return false; } |
204 virtual bool isTextMatch() const { return false; } | 204 virtual bool isTextMatch() const { return false; } |
205 virtual bool isComposition() const { return false; } | 205 virtual bool isComposition() const { return false; } |
206 | 206 |
207 DEFINE_INLINE_VIRTUAL_TRACE() {} | 207 DEFINE_INLINE_VIRTUAL_TRACE() {} |
208 }; | 208 }; |
209 | 209 |
210 } // namespace blink | 210 } // namespace blink |
211 | 211 |
212 #endif // DocumentMarker_h | 212 #endif // DocumentMarker_h |
OLD | NEW |