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

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

Issue 2764743004: Add DocumentMarker::createGrammarMarker() and createSpellingMarker() (Closed)
Patch Set: Move test case changes into createTextMatchMarker() CL 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 5164fdab4a297a96e09d286fac62fa10ac686769..b4c8103e8db2313d1b42131f093c58d787db03c4 100644
--- a/third_party/WebKit/Source/core/editing/markers/DocumentMarker.cpp
+++ b/third_party/WebKit/Source/core/editing/markers/DocumentMarker.cpp
@@ -132,17 +132,6 @@ inline TextCompositionMarkerDetails* toTextCompositionMarkerDetails(
DocumentMarker::DocumentMarker(MarkerType type,
unsigned startOffset,
unsigned endOffset,
- const String& description)
- : m_type(type),
- m_startOffset(startOffset),
- m_endOffset(endOffset),
- m_details(description.isEmpty()
- ? nullptr
- : DocumentMarkerDescription::create(description)) {}
-
-DocumentMarker::DocumentMarker(MarkerType type,
- unsigned startOffset,
- unsigned endOffset,
DocumentMarkerDetails* details)
: m_type(type),
m_startOffset(startOffset),
@@ -159,6 +148,21 @@ DocumentMarker* DocumentMarker::createCompositionMarker(unsigned startOffset,
underlineColor, thick, backgroundColor));
}
+DocumentMarker* DocumentMarker::createGrammarMarker(unsigned startOffset,
+ unsigned endOffset,
+ const String& description) {
+ return new DocumentMarker(Grammar, startOffset, endOffset,
yosin_UTC9 2017/03/23 04:01:27 Could you add TODO that we should have DCHECK_LT(s
rlanday 2017/03/23 04:38:21 Just to clarify, why do you want me to add a TODO
+ DocumentMarkerDescription::create(description));
+}
+
+DocumentMarker* DocumentMarker::createSpellingMarker(
+ unsigned startOffset,
+ unsigned endOffset,
+ const String& description) {
+ return new DocumentMarker(Spelling, startOffset, endOffset,
yosin_UTC9 2017/03/23 04:01:27 Could you add TODO that we should have DCHECK_LT(s
+ DocumentMarkerDescription::create(description));
+}
+
DocumentMarker* DocumentMarker::createTextMatchMarker(unsigned startOffset,
unsigned endOffset,
bool activeMatch) {

Powered by Google App Engine
This is Rietveld 408576698