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

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

Issue 2723663002: Refactor DocumentMarkerController (Closed)
Patch Set: Created 3 years, 10 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..82fc3aa6b3280929309c919910e3ed57247ee66c 100644
--- a/third_party/WebKit/Source/core/editing/markers/DocumentMarker.h
+++ b/third_party/WebKit/Source/core/editing/markers/DocumentMarker.h
@@ -32,6 +32,7 @@
namespace blink {
class DocumentMarkerDetails;
+class RenderedTextMatchMarker;
// A range of a node within a document that is "marked", such as the range of a
// misspelled word. It optionally includes a description that could be displayed
@@ -118,12 +119,17 @@ 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.
+ // 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;
+
+ RenderedTextMatchMarker* asRenderedTextMatchMarker();
Xiaocheng 2017/03/01 22:24:48 Please use the DEFINE_TYPE_CASTS macro to define t
+
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