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

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

Issue 2919603005: [DMC #27] Move TextMatchMarker method implementations to TextMatchMarker.cpp (Closed)
Patch Set: Update comment 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/markers/TextMatchMarker.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e4c9fc2f738e39c636aea2e529b5789dff70087d..dd9908cfe892c85e8d05ef4b72ce10dc2b3c705d 100644
--- a/third_party/WebKit/Source/core/editing/markers/TextMatchMarker.h
+++ b/third_party/WebKit/Source/core/editing/markers/TextMatchMarker.h
@@ -43,52 +43,27 @@ class CORE_EXPORT TextMatchMarker final : public DocumentMarker {
public:
enum class MatchStatus { kInactive, kActive };
- TextMatchMarker(unsigned start_offset,
- unsigned end_offset,
- MatchStatus status)
- : DocumentMarker(start_offset, end_offset), match_status_(status) {
- layout_state_ = State::kInvalid;
- }
+ TextMatchMarker(unsigned start_offset, unsigned end_offset, MatchStatus);
// 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;
- }
+ bool IsActiveMatch() const;
+ void SetIsActiveMatch(bool active);
- bool IsRendered() const { return layout_state_ == State::kValidNotNull; }
- bool Contains(const LayoutPoint& point) const {
- DCHECK_EQ(layout_state_, State::kValidNotNull);
- return rendered_rect_.Contains(point);
- }
- void SetRenderedRect(const LayoutRect& rect) {
- if (layout_state_ == State::kValidNotNull && rect == rendered_rect_)
- return;
- layout_state_ = State::kValidNotNull;
- rendered_rect_ = rect;
- }
-
- const LayoutRect& RenderedRect() const {
- DCHECK_EQ(layout_state_, State::kValidNotNull);
- return rendered_rect_;
- }
-
- void NullifyRenderedRect() {
- layout_state_ = State::kValidNull;
- // Now |m_renderedRect| can not be accessed until |setRenderedRect| is
- // called.
- }
-
- void Invalidate() { layout_state_ = State::kInvalid; }
- bool IsValid() const { return layout_state_ != State::kInvalid; }
+ bool IsRendered() const;
+ bool Contains(const LayoutPoint&) const;
+ void SetRenderedRect(const LayoutRect&);
+ const LayoutRect& RenderedRect() const;
+ void NullifyRenderedRect();
+ void Invalidate();
+ bool IsValid() const;
private:
MatchStatus match_status_;
LayoutRect rendered_rect_;
- State layout_state_;
+ State layout_state_ = State::kInvalid;
DISALLOW_COPY_AND_ASSIGN(TextMatchMarker);
};
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/markers/TextMatchMarker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698