Chromium Code Reviews| Index: third_party/WebKit/Source/core/editing/markers/DocumentMarker.h |
| diff --git a/third_party/WebKit/Source/core/editing/markers/DocumentMarker.h b/third_party/WebKit/Source/core/editing/markers/DocumentMarker.h |
| index 7db49d1a45320fa4724c6a664cb6a6d88e08a618..4c8a32463688898f4c4ff4c683d647a879371295 100644 |
| --- a/third_party/WebKit/Source/core/editing/markers/DocumentMarker.h |
| +++ b/third_party/WebKit/Source/core/editing/markers/DocumentMarker.h |
| @@ -118,12 +118,25 @@ class CORE_EXPORT DocumentMarker : public GarbageCollected<DocumentMarker> { |
| void setActiveMatch(bool); |
| void clearDetails() { m_details.clear(); } |
| - // Offset modifications are done by DocumentMarkerController. |
| - // Other classes should not call following setters. |
| + struct ShiftMarkerResult { |
| + unsigned newStartOffset; |
| + unsigned newEndOffset; |
| + bool shouldRemoveMarker; |
| + }; |
| + |
| + ShiftMarkerResult getShiftedMarkerPosition(unsigned offset, |
|
Xiaocheng
2017/03/21 19:12:11
nit: add |const|
|
| + unsigned oldLength, |
| + unsigned newLength); |
| + |
| + // Offset modifications are done by DocumentMarkerController and the classes |
| + // that implement the marker lists. Other classes should not call following |
| + // setters. |
| void setStartOffset(unsigned offset) { m_startOffset = offset; } |
| void setEndOffset(unsigned offset) { m_endOffset = offset; } |
| void shiftOffsets(int delta); |
| + virtual bool isRenderedTextMatch() const; |
| + |
| bool operator==(const DocumentMarker& o) const { |
| return type() == o.type() && startOffset() == o.startOffset() && |
| endOffset() == o.endOffset(); |