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

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

Issue 2766003002: Add DocumentMarker::createCompositionMarker() (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 f9a8d5317f292c300d1ba36e2f1d27a5f209084b..23c7b7fb3a01305068fbddd6b4bd5d46a466f816 100644
--- a/third_party/WebKit/Source/core/editing/markers/DocumentMarker.cpp
+++ b/third_party/WebKit/Source/core/editing/markers/DocumentMarker.cpp
@@ -154,17 +154,24 @@ DocumentMarker::DocumentMarker(unsigned startOffset,
m_endOffset(endOffset),
m_details(DocumentMarkerTextMatch::create(activeMatch)) {}
-DocumentMarker::DocumentMarker(unsigned startOffset,
+DocumentMarker::DocumentMarker(MarkerType type,
+ unsigned startOffset,
unsigned endOffset,
- Color underlineColor,
- bool thick,
- Color backgroundColor)
- : m_type(DocumentMarker::Composition),
+ DocumentMarkerDetails* details)
+ : m_type(type),
m_startOffset(startOffset),
m_endOffset(endOffset),
- m_details(TextCompositionMarkerDetails::create(underlineColor,
- thick,
- backgroundColor)) {}
+ m_details(details) {}
+
+DocumentMarker* DocumentMarker::createCompositionMarker(unsigned startOffset,
+ unsigned endOffset,
+ Color underlineColor,
+ bool thick,
+ Color backgroundColor) {
+ return new DocumentMarker(Composition, startOffset, endOffset,
+ TextCompositionMarkerDetails::create(
+ underlineColor, thick, backgroundColor));
+}
DocumentMarker::DocumentMarker(const DocumentMarker& marker)
: m_type(marker.type()),

Powered by Google App Engine
This is Rietveld 408576698