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

Unified Diff: third_party/WebKit/Source/core/style/ComputedStyle.h

Issue 2949453002: Make EFlexDirection an enum class. (Closed)
Patch Set: Fix 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/style/ComputedStyle.h
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.h b/third_party/WebKit/Source/core/style/ComputedStyle.h
index e45f1b5e04ed6bbf165b0e5daa038f9ef8dd35fa..9d922eaabc046a5597b12b985245df558a211bf2 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.h
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.h
@@ -740,14 +740,14 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
}
// flex-direction (aka -webkit-flex-direction)
- static EFlexDirection InitialFlexDirection() { return kFlowRow; }
+ static EFlexDirection InitialFlexDirection() { return EFlexDirection::kRow; }
EFlexDirection FlexDirection() const {
return static_cast<EFlexDirection>(
rare_non_inherited_data_->flexible_box_data_->flex_direction_);
}
void SetFlexDirection(EFlexDirection direction) {
SET_NESTED_VAR(rare_non_inherited_data_, flexible_box_data_,
- flex_direction_, direction);
+ flex_direction_, static_cast<unsigned>(direction));
}
// flex-grow (aka -webkit-flex-grow)
@@ -2049,12 +2049,12 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
// Flex utility functions.
bool IsColumnFlexDirection() const {
- return FlexDirection() == kFlowColumn ||
- FlexDirection() == kFlowColumnReverse;
+ return FlexDirection() == EFlexDirection::kColumn ||
+ FlexDirection() == EFlexDirection::kColumnReverse;
}
bool IsReverseFlexDirection() const {
- return FlexDirection() == kFlowRowReverse ||
- FlexDirection() == kFlowColumnReverse;
+ return FlexDirection() == EFlexDirection::kRowReverse ||
+ FlexDirection() == EFlexDirection::kColumnReverse;
}
bool HasBoxReflect() const { return BoxReflect(); }
bool ReflectionDataEquivalent(const ComputedStyle& other) const {

Powered by Google App Engine
This is Rietveld 408576698