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

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

Issue 2905753002: [DMC #17] Make TextMatchMarkers constructible in single step (Closed)
Patch Set: Fix build error Created 3 years, 7 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/TextMatchMarker.h
diff --git a/third_party/WebKit/Source/core/editing/markers/TextMatchMarker.h b/third_party/WebKit/Source/core/editing/markers/TextMatchMarker.h
index 74c69dd4e88fed8f563b7fc6853c5eec320181e3..c6c87b1f0a804113d9acd0893b31a330a2f45dd6 100644
--- a/third_party/WebKit/Source/core/editing/markers/TextMatchMarker.h
+++ b/third_party/WebKit/Source/core/editing/markers/TextMatchMarker.h
@@ -37,9 +37,11 @@ class TextMatchMarker final : public DocumentMarker {
enum class State { kInvalid, kValidNull, kValidNotNull };
public:
- static TextMatchMarker* Create(const DocumentMarker& marker) {
- return new TextMatchMarker(marker);
- }
+ TextMatchMarker(unsigned start_offset,
+ unsigned end_offset,
+ MatchStatus status)
+ : DocumentMarker(start_offset, end_offset, status),
+ state_(State::kInvalid) {}
bool IsRendered() const { return state_ == State::kValidNotNull; }
bool Contains(const LayoutPoint& point) const {

Powered by Google App Engine
This is Rietveld 408576698