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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 static bool EndsBefore(size_t start_offset, const DocumentMarker*); | |
Xiaocheng
2017/04/20 03:40:37
Please split...
| |
184 | |
183 DECLARE_TRACE(); | 185 DECLARE_TRACE(); |
184 | 186 |
185 private: | 187 private: |
186 MarkerType type_; | 188 MarkerType type_; |
187 unsigned start_offset_; | 189 unsigned start_offset_; |
188 unsigned end_offset_; | 190 unsigned end_offset_; |
189 Member<DocumentMarkerDetails> details_; | 191 Member<DocumentMarkerDetails> details_; |
190 }; | 192 }; |
191 | 193 |
192 using DocumentMarkerVector = HeapVector<Member<DocumentMarker>>; | 194 using DocumentMarkerVector = HeapVector<Member<DocumentMarker>>; |
(...skipping 10 matching lines...) Expand all Loading... | |
203 virtual bool IsDescription() const { return false; } | 205 virtual bool IsDescription() const { return false; } |
204 virtual bool IsTextMatch() const { return false; } | 206 virtual bool IsTextMatch() const { return false; } |
205 virtual bool IsComposition() const { return false; } | 207 virtual bool IsComposition() const { return false; } |
206 | 208 |
207 DEFINE_INLINE_VIRTUAL_TRACE() {} | 209 DEFINE_INLINE_VIRTUAL_TRACE() {} |
208 }; | 210 }; |
209 | 211 |
210 } // namespace blink | 212 } // namespace blink |
211 | 213 |
212 #endif // DocumentMarker_h | 214 #endif // DocumentMarker_h |
OLD | NEW |