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

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

Issue 2905753002: [DMC #17] Make TextMatchMarkers constructible in single step (Closed)
Patch Set: Rebase 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 b7025f55875c58fbd3e84aa20bf0c5eff44d21aa..90422364f8f08295e7adfd64a3e4d6ed0e1b6ea1 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