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

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

Issue 2801483002: Add DocumentMarker::MatchStatus enum for text match markers (Closed)
Patch Set: Use string in JavaScript API Created 3 years, 8 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 dbcfdf2964555be13aa50b7551bf2305f37a6fd8..02d82e66c3e7acdd026105bd935acdb3b9a1a7cc 100644
--- a/third_party/WebKit/Source/core/editing/markers/DocumentMarker.h
+++ b/third_party/WebKit/Source/core/editing/markers/DocumentMarker.h
@@ -134,11 +134,15 @@ class CORE_EXPORT DocumentMarker : public GarbageCollected<DocumentMarker> {
SpellCheckClientMarkers() : MarkerTypes(Spelling | Grammar) {}
};
+ enum class MatchStatus { Inactive, Active };
+
DocumentMarker(MarkerType,
unsigned startOffset,
unsigned endOffset,
const String& description);
- DocumentMarker(unsigned startOffset, unsigned endOffset, bool activeMatch);
+ DocumentMarker(unsigned startOffset,
+ unsigned endOffset,
+ MatchStatus activeMatch);
DocumentMarker(unsigned startOffset,
unsigned endOffset,
Color underlineColor,
@@ -152,13 +156,13 @@ class CORE_EXPORT DocumentMarker : public GarbageCollected<DocumentMarker> {
unsigned endOffset() const { return m_endOffset; }
const String& description() const;
- bool activeMatch() const;
+ MatchStatus activeMatch() const;
Color underlineColor() const;
bool thick() const;
Color backgroundColor() const;
DocumentMarkerDetails* details() const;
- void setActiveMatch(bool);
+ void setActiveMatch(MatchStatus);
void clearDetails() { m_details.clear(); }
// Offset modifications are done by DocumentMarkerController.

Powered by Google App Engine
This is Rietveld 408576698