| 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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 | 169 |
| 170 // Offset modifications are done by DocumentMarkerController. | 170 // Offset modifications are done by DocumentMarkerController. |
| 171 // Other classes should not call following setters. | 171 // Other classes should not call following setters. |
| 172 void SetStartOffset(unsigned offset) { start_offset_ = offset; } | 172 void SetStartOffset(unsigned offset) { start_offset_ = offset; } |
| 173 void SetEndOffset(unsigned offset) { end_offset_ = offset; } | 173 void SetEndOffset(unsigned offset) { end_offset_ = offset; } |
| 174 void ShiftOffsets(int delta); | 174 void ShiftOffsets(int delta); |
| 175 | 175 |
| 176 DECLARE_TRACE(); | 176 DECLARE_TRACE(); |
| 177 | 177 |
| 178 protected: | 178 protected: |
| 179 DocumentMarker(unsigned start_offset, unsigned end_offset, MatchStatus); | 179 DocumentMarker(MarkerType, unsigned start_offset, unsigned end_offset); |
| 180 | 180 |
| 181 private: | 181 private: |
| 182 MarkerType type_; | 182 MarkerType type_; |
| 183 unsigned start_offset_; | 183 unsigned start_offset_; |
| 184 unsigned end_offset_; | 184 unsigned end_offset_; |
| 185 Member<DocumentMarkerDetails> details_; | 185 Member<DocumentMarkerDetails> details_; |
| 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 |