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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 const String& description() const; | 111 const String& description() const; |
112 bool activeMatch() const; | 112 bool activeMatch() const; |
113 Color underlineColor() const; | 113 Color underlineColor() const; |
114 bool thick() const; | 114 bool thick() const; |
115 Color backgroundColor() const; | 115 Color backgroundColor() const; |
116 DocumentMarkerDetails* details() const; | 116 DocumentMarkerDetails* details() const; |
117 | 117 |
118 void setActiveMatch(bool); | 118 void setActiveMatch(bool); |
119 void clearDetails() { m_details.clear(); } | 119 void clearDetails() { m_details.clear(); } |
120 | 120 |
121 // Offset modifications are done by DocumentMarkerController. | 121 struct ShiftMarkerResult { |
122 // Other classes should not call following setters. | 122 unsigned newStartOffset; |
| 123 unsigned newEndOffset; |
| 124 bool shouldRemoveMarker; |
| 125 }; |
| 126 |
| 127 ShiftMarkerResult getShiftedMarkerPosition(unsigned offset, |
| 128 unsigned oldLength, |
| 129 unsigned newLength) const; |
| 130 |
| 131 // Offset modifications are done by DocumentMarkerController and the classes |
| 132 // that implement the marker lists. Other classes should not call following |
| 133 // setters. |
123 void setStartOffset(unsigned offset) { m_startOffset = offset; } | 134 void setStartOffset(unsigned offset) { m_startOffset = offset; } |
124 void setEndOffset(unsigned offset) { m_endOffset = offset; } | 135 void setEndOffset(unsigned offset) { m_endOffset = offset; } |
125 void shiftOffsets(int delta); | 136 void shiftOffsets(int delta); |
126 | 137 |
127 bool operator==(const DocumentMarker& o) const { | 138 bool operator==(const DocumentMarker& o) const { |
128 return type() == o.type() && startOffset() == o.startOffset() && | 139 return type() == o.type() && startOffset() == o.startOffset() && |
129 endOffset() == o.endOffset(); | 140 endOffset() == o.endOffset(); |
130 } | 141 } |
131 | 142 |
132 bool operator!=(const DocumentMarker& o) const { return !(*this == o); } | 143 bool operator!=(const DocumentMarker& o) const { return !(*this == o); } |
(...skipping 21 matching lines...) Expand all Loading... |
154 virtual bool isDescription() const { return false; } | 165 virtual bool isDescription() const { return false; } |
155 virtual bool isTextMatch() const { return false; } | 166 virtual bool isTextMatch() const { return false; } |
156 virtual bool isComposition() const { return false; } | 167 virtual bool isComposition() const { return false; } |
157 | 168 |
158 DEFINE_INLINE_VIRTUAL_TRACE() {} | 169 DEFINE_INLINE_VIRTUAL_TRACE() {} |
159 }; | 170 }; |
160 | 171 |
161 } // namespace blink | 172 } // namespace blink |
162 | 173 |
163 #endif // DocumentMarker_h | 174 #endif // DocumentMarker_h |
OLD | NEW |