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

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

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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * This file is part of the DOM implementation for WebCore. 2 * This file is part of the DOM implementation for WebCore.
3 * 3 *
4 * Copyright (C) 2006 Apple Computer, Inc. 4 * Copyright (C) 2006 Apple Computer, Inc.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 class SpellCheckClientMarkers : public MarkerTypes { 132 class SpellCheckClientMarkers : public MarkerTypes {
133 public: 133 public:
134 SpellCheckClientMarkers() : MarkerTypes(Spelling | Grammar) {} 134 SpellCheckClientMarkers() : MarkerTypes(Spelling | Grammar) {}
135 }; 135 };
136 136
137 static DocumentMarker* createCompositionMarker(unsigned startOffset, 137 static DocumentMarker* createCompositionMarker(unsigned startOffset,
138 unsigned endOffset, 138 unsigned endOffset,
139 Color underlineColor, 139 Color underlineColor,
140 bool thick, 140 bool thick,
141 Color backgroundColor); 141 Color backgroundColor);
142 static DocumentMarker* createGrammarMarker(
rlanday 2017/03/22 21:07:00 I think we should pick whether we want to order th
yosin_UTC9 2017/03/23 04:01:27 My personal preference is alphabetical order, sinc
143 unsigned startOffset,
144 unsigned endOffset,
145 const String& description = emptyString);
146 static DocumentMarker* createSpellingMarker(
147 unsigned startOffset,
148 unsigned endOffset,
149 const String& description = emptyString);
142 static DocumentMarker* createTextMatchMarker(unsigned startOffset, 150 static DocumentMarker* createTextMatchMarker(unsigned startOffset,
143 unsigned endOffset, 151 unsigned endOffset,
144 bool activeMatch); 152 bool activeMatch);
145 153
146 DocumentMarker(MarkerType,
147 unsigned startOffset,
148 unsigned endOffset,
149 const String& description);
150
151 DocumentMarker(const DocumentMarker&); 154 DocumentMarker(const DocumentMarker&);
152 155
153 MarkerType type() const { return m_type; } 156 MarkerType type() const { return m_type; }
154 unsigned startOffset() const { return m_startOffset; } 157 unsigned startOffset() const { return m_startOffset; }
155 unsigned endOffset() const { return m_endOffset; } 158 unsigned endOffset() const { return m_endOffset; }
156 159
157 const String& description() const; 160 const String& description() const;
158 bool activeMatch() const; 161 bool activeMatch() const;
159 Color underlineColor() const; 162 Color underlineColor() const;
160 bool thick() const; 163 bool thick() const;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 virtual bool isDescription() const { return false; } 219 virtual bool isDescription() const { return false; }
217 virtual bool isTextMatch() const { return false; } 220 virtual bool isTextMatch() const { return false; }
218 virtual bool isComposition() const { return false; } 221 virtual bool isComposition() const { return false; }
219 222
220 DEFINE_INLINE_VIRTUAL_TRACE() {} 223 DEFINE_INLINE_VIRTUAL_TRACE() {}
221 }; 224 };
222 225
223 } // namespace blink 226 } // namespace blink
224 227
225 #endif // DocumentMarker_h 228 #endif // DocumentMarker_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698