Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(791)

Unified Diff: third_party/WebKit/Source/core/editing/markers/DocumentMarker.h

Issue 2723663002: Refactor DocumentMarkerController (Closed)
Patch Set: Use correct base commit Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();

Powered by Google App Engine
This is Rietveld 408576698