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

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

Issue 2911733002: [DMC #25] Make DocumentMarker::GetType() virtual (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 0b71278256d695d0d054dce3c6dd4e7bc88882e0..e4c9fc2f738e39c636aea2e529b5789dff70087d 100644
--- a/third_party/WebKit/Source/core/editing/markers/TextMatchMarker.h
+++ b/third_party/WebKit/Source/core/editing/markers/TextMatchMarker.h
@@ -36,7 +36,7 @@ namespace blink {
// markers. We store whether or not the match is active, a LayoutRect used for
// rendering the marker, and whether or not the LayoutRect is currently
// up-to-date.
-class TextMatchMarker final : public DocumentMarker {
+class CORE_EXPORT TextMatchMarker final : public DocumentMarker {
private:
enum class State { kInvalid, kValidNull, kValidNotNull };
@@ -46,11 +46,14 @@ class TextMatchMarker final : public DocumentMarker {
TextMatchMarker(unsigned start_offset,
unsigned end_offset,
MatchStatus status)
- : DocumentMarker(DocumentMarker::kTextMatch, start_offset, end_offset),
- match_status_(status) {
+ : DocumentMarker(start_offset, end_offset), match_status_(status) {
layout_state_ = State::kInvalid;
}
+ // DocumentMarker implementations
+ MarkerType GetType() const final;
+
+ // TextMatchMarker-specific
bool IsActiveMatch() const { return match_status_ == MatchStatus::kActive; }
void SetIsActiveMatch(bool active) {
match_status_ = active ? MatchStatus::kActive : MatchStatus::kInactive;

Powered by Google App Engine
This is Rietveld 408576698