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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutObject.h

Issue 2916493002: Make SelectionState enum class (Closed)
Patch Set: 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/layout/LayoutObject.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.h b/third_party/WebKit/Source/core/layout/LayoutObject.h
index 34ccc620332c223c39b2fb6588bc72c62359c249..c881d97b392851465c2de9176d2d5daf89cd49cf 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.h
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.h
@@ -1485,7 +1485,7 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
virtual bool CanBeSelectionLeaf() const { return false; }
bool HasSelectedChildren() const {
- return GetSelectionState() != SelectionNone;
+ return GetSelectionState() != SelectionState::kNone;
}
bool IsSelectable() const;
@@ -2303,7 +2303,7 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
outline_may_be_affected_by_descendants_(false),
previous_outline_may_be_affected_by_descendants_(false),
positioned_state_(kIsStaticallyPositioned),
- selection_state_(SelectionNone),
+ selection_state_(static_cast<unsigned>(SelectionState::kNone)),
background_obscuration_state_(kBackgroundObscurationStatusInvalid),
full_paint_invalidation_reason_(
static_cast<unsigned>(PaintInvalidationReason::kNone)) {}
@@ -2567,7 +2567,7 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
return static_cast<SelectionState>(selection_state_);
}
ALWAYS_INLINE void SetSelectionState(SelectionState selection_state) {
- selection_state_ = selection_state;
+ selection_state_ = static_cast<unsigned>(selection_state);
}
ALWAYS_INLINE BackgroundObscurationState
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutListMarker.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698