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

Unified Diff: third_party/WebKit/Source/core/paint/PartPainter.cpp

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/paint/PartPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/PartPainter.cpp b/third_party/WebKit/Source/core/paint/PartPainter.cpp
index 1b5b2321f9e8a6fa19a4319902e7c907e1d512e9..9f056a8a0f798f52125b67883623f7854a2fe50a 100644
--- a/third_party/WebKit/Source/core/paint/PartPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/PartPainter.cpp
@@ -21,22 +21,22 @@ namespace blink {
bool PartPainter::IsSelected() const {
SelectionState s = layout_part_.GetSelectionState();
- if (s == SelectionNone)
+ if (s == SelectionState::kNone)
return false;
- if (s == SelectionInside)
+ if (s == SelectionState::kInside)
return true;
int selection_start, selection_end;
std::tie(selection_start, selection_end) = layout_part_.SelectionStartEnd();
- if (s == SelectionStart)
+ if (s == SelectionState::kStart)
return selection_start == 0;
int end = layout_part_.GetNode()->hasChildren()
? layout_part_.GetNode()->CountChildren()
: 1;
- if (s == SelectionEnd)
+ if (s == SelectionState::kEnd)
return selection_end == end;
- if (s == SelectionBoth)
+ if (s == SelectionState::kStartAndEnd)
return selection_start == 0 && selection_end == end;
DCHECK(0);
« no previous file with comments | « third_party/WebKit/Source/core/paint/ListMarkerPainter.cpp ('k') | third_party/WebKit/Source/core/paint/ReplacedPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698