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 e1c9096c5b4aad0636e4b894d474edcfd4db26b6..9d22eb74d1707a33e9abaeee72db08537d4fe9ba 100644 |
--- a/third_party/WebKit/Source/core/editing/markers/DocumentMarker.h |
+++ b/third_party/WebKit/Source/core/editing/markers/DocumentMarker.h |
@@ -26,6 +26,7 @@ |
#include "core/CoreExport.h" |
#include "platform/graphics/Color.h" |
#include "platform/heap/Handle.h" |
+#include "wtf/Optional.h" |
#include "wtf/VectorTraits.h" |
#include "wtf/text/WTFString.h" |
@@ -164,6 +165,15 @@ class CORE_EXPORT DocumentMarker : public GarbageCollected<DocumentMarker> { |
void SetIsActiveMatch(bool); |
void ClearDetails() { details_.Clear(); } |
+ struct MarkerOffsets { |
+ unsigned start_offset; |
+ unsigned end_offset; |
+ }; |
+ |
+ Optional<MarkerOffsets> ComputeOffsetsAfterShift(unsigned offset, |
+ unsigned old_length, |
+ unsigned new_length) const; |
+ |
// Offset modifications are done by DocumentMarkerController. |
// Other classes should not call following setters. |
void SetStartOffset(unsigned offset) { start_offset_ = offset; } |