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

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

Issue 2764783004: Add DocumentMarker::createTextMatchMarker() (Closed)
Patch Set: Rebase 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.cpp
diff --git a/third_party/WebKit/Source/core/editing/markers/DocumentMarker.cpp b/third_party/WebKit/Source/core/editing/markers/DocumentMarker.cpp
index 8a97a5b59b3d50e37459b2fb96ca89e11794c577..5164fdab4a297a96e09d286fac62fa10ac686769 100644
--- a/third_party/WebKit/Source/core/editing/markers/DocumentMarker.cpp
+++ b/third_party/WebKit/Source/core/editing/markers/DocumentMarker.cpp
@@ -140,14 +140,6 @@ DocumentMarker::DocumentMarker(MarkerType type,
? nullptr
: DocumentMarkerDescription::create(description)) {}
-DocumentMarker::DocumentMarker(unsigned startOffset,
- unsigned endOffset,
- bool activeMatch)
- : m_type(DocumentMarker::TextMatch),
- m_startOffset(startOffset),
- m_endOffset(endOffset),
- m_details(DocumentMarkerTextMatch::create(activeMatch)) {}
-
DocumentMarker::DocumentMarker(MarkerType type,
unsigned startOffset,
unsigned endOffset,
@@ -167,6 +159,13 @@ DocumentMarker* DocumentMarker::createCompositionMarker(unsigned startOffset,
underlineColor, thick, backgroundColor));
}
+DocumentMarker* DocumentMarker::createTextMatchMarker(unsigned startOffset,
+ unsigned endOffset,
+ bool activeMatch) {
+ return new DocumentMarker(TextMatch, startOffset, endOffset,
+ DocumentMarkerTextMatch::create(activeMatch));
+}
+
DocumentMarker::DocumentMarker(const DocumentMarker& marker)
: m_type(marker.type()),
m_startOffset(marker.startOffset()),

Powered by Google App Engine
This is Rietveld 408576698