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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
167 | 167 |
168 // Offset modifications are done by DocumentMarkerController. | 168 // Offset modifications are done by DocumentMarkerController. |
169 // Other classes should not call following setters. | 169 // Other classes should not call following setters. |
170 void SetStartOffset(unsigned offset) { start_offset_ = offset; } | 170 void SetStartOffset(unsigned offset) { start_offset_ = offset; } |
171 void SetEndOffset(unsigned offset) { end_offset_ = offset; } | 171 void SetEndOffset(unsigned offset) { end_offset_ = offset; } |
172 void ShiftOffsets(int delta); | 172 void ShiftOffsets(int delta); |
173 | 173 |
174 DECLARE_TRACE(); | 174 DECLARE_TRACE(); |
175 | 175 |
176 protected: | 176 protected: |
177 DocumentMarker(unsigned start_offset, unsigned end_offset, MatchStatus); | 177 DocumentMarker(MarkerType, unsigned start_offset, unsigned end_offset); |
178 | 178 |
179 private: | 179 private: |
180 MarkerType type_; | 180 MarkerType type_; |
yosin_UTC9
2017/05/31 07:06:54
nit: s/MarkerType/const MarkerType/
| |
181 unsigned start_offset_; | 181 unsigned start_offset_; |
182 unsigned end_offset_; | 182 unsigned end_offset_; |
183 Member<DocumentMarkerDetails> details_; | 183 Member<DocumentMarkerDetails> details_; |
184 | 184 |
185 DISALLOW_COPY_AND_ASSIGN(DocumentMarker); | 185 DISALLOW_COPY_AND_ASSIGN(DocumentMarker); |
186 }; | 186 }; |
187 | 187 |
188 using DocumentMarkerVector = HeapVector<Member<DocumentMarker>>; | 188 using DocumentMarkerVector = HeapVector<Member<DocumentMarker>>; |
189 | 189 |
190 inline DocumentMarkerDetails* DocumentMarker::Details() const { | 190 inline DocumentMarkerDetails* DocumentMarker::Details() const { |
191 return details_.Get(); | 191 return details_.Get(); |
192 } | 192 } |
193 | 193 |
194 class DocumentMarkerDetails | 194 class DocumentMarkerDetails |
195 : public GarbageCollectedFinalized<DocumentMarkerDetails> { | 195 : public GarbageCollectedFinalized<DocumentMarkerDetails> { |
196 public: | 196 public: |
197 DocumentMarkerDetails() {} | 197 DocumentMarkerDetails() {} |
198 virtual ~DocumentMarkerDetails(); | 198 virtual ~DocumentMarkerDetails(); |
199 virtual bool IsDescription() const { return false; } | 199 virtual bool IsDescription() const { return false; } |
200 virtual bool IsTextMatch() const { return false; } | |
201 virtual bool IsComposition() const { return false; } | 200 virtual bool IsComposition() const { return false; } |
202 | 201 |
203 DEFINE_INLINE_VIRTUAL_TRACE() {} | 202 DEFINE_INLINE_VIRTUAL_TRACE() {} |
204 }; | 203 }; |
205 | 204 |
206 } // namespace blink | 205 } // namespace blink |
207 | 206 |
208 #endif // DocumentMarker_h | 207 #endif // DocumentMarker_h |
OLD | NEW |