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

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

Issue 2902393003: [DMC #17.5] Eliminate DocumentMarker and TextMatchMarker copy constructors (Closed)
Patch Set: Rebase Created 3 years, 6 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
« no previous file with comments | « third_party/WebKit/Source/core/editing/markers/DocumentMarkerListEditor.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Neither the name of Google Inc. nor the names of its 10 * * Neither the name of Google Inc. nor the names of its
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 void NullifyRenderedRect() { 63 void NullifyRenderedRect() {
64 state_ = State::kValidNull; 64 state_ = State::kValidNull;
65 // Now |m_renderedRect| can not be accessed until |setRenderedRect| is 65 // Now |m_renderedRect| can not be accessed until |setRenderedRect| is
66 // called. 66 // called.
67 } 67 }
68 68
69 void Invalidate() { state_ = State::kInvalid; } 69 void Invalidate() { state_ = State::kInvalid; }
70 bool IsValid() const { return state_ != State::kInvalid; } 70 bool IsValid() const { return state_ != State::kInvalid; }
71 71
72 private: 72 private:
73 explicit TextMatchMarker(const DocumentMarker& marker)
74 : DocumentMarker(marker), state_(State::kInvalid) {}
75
76 LayoutRect rendered_rect_; 73 LayoutRect rendered_rect_;
77 State state_; 74 State state_;
78 }; 75 };
79 76
80 DEFINE_TYPE_CASTS(TextMatchMarker, 77 DEFINE_TYPE_CASTS(TextMatchMarker,
81 DocumentMarker, 78 DocumentMarker,
82 marker, 79 marker,
83 marker->GetType() == DocumentMarker::kTextMatch, 80 marker->GetType() == DocumentMarker::kTextMatch,
84 marker.GetType() == DocumentMarker::kTextMatch); 81 marker.GetType() == DocumentMarker::kTextMatch);
85 82
86 } // namespace blink 83 } // namespace blink
87 84
88 #endif 85 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/markers/DocumentMarkerListEditor.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698