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

Unified Diff: third_party/WebKit/Source/core/layout/api/SelectionState.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/api/SelectionState.h
diff --git a/third_party/WebKit/Source/core/layout/api/SelectionState.h b/third_party/WebKit/Source/core/layout/api/SelectionState.h
index 30b6d3759e629d284a0313c9c861dc30c3d4c2f6..2beacf861de757c4fd191dbb49642927b282e080 100644
--- a/third_party/WebKit/Source/core/layout/api/SelectionState.h
+++ b/third_party/WebKit/Source/core/layout/api/SelectionState.h
@@ -10,25 +10,20 @@
namespace blink {
-#define FOR_EACH_SELECTION_STATE(V) \
- /* The object is not selected. */ \
- V(None) \
- /* The object either contains the start of a selection run or is the */ \
- /* start of a run. */ \
- V(Start) \
- /* The object is fully encompassed by a selection run. */ \
- V(Inside) \
- /* The object either contains the end of a selection run or is the */ \
- /* end of a run. */ \
- V(End) \
- /* The object contains an entire run or is the sole selected object */ \
- /* in that run. */ \
- V(Both)
-
-enum SelectionState {
-#define V(state) Selection##state,
- FOR_EACH_SELECTION_STATE(V)
-#undef V
+enum class SelectionState {
+ /* The object is not selected. */
+ kNone,
+ /* The object either contains the start of a selection run or is the */
+ /* start of a run. */
+ kStart,
+ /* The object is fully encompassed by a selection run. */
+ kInside,
+ /* The object either contains the end of a selection run or is the */
+ /* end of a run. */
+ kEnd,
+ /* The object contains an entire run or is the sole selected object */
+ /* in that run. */
+ kStartAndEnd
};
CORE_EXPORT std::ostream& operator<<(std::ostream&, const SelectionState);
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutText.cpp ('k') | third_party/WebKit/Source/core/layout/api/SelectionState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698