Index: third_party/WebKit/Source/core/style/ComputedStyleConstants.h |
diff --git a/third_party/WebKit/Source/core/style/ComputedStyleConstants.h b/third_party/WebKit/Source/core/style/ComputedStyleConstants.h |
index f9b57ee99066caf889ba7235ec1d5ffe5917b305..57a6689f7b3b1b5c61f96e982493218bdd35458e 100644 |
--- a/third_party/WebKit/Source/core/style/ComputedStyleConstants.h |
+++ b/third_party/WebKit/Source/core/style/ComputedStyleConstants.h |
@@ -30,6 +30,11 @@ |
namespace blink { |
+// TODO(sashab): Change these enums to enum classes with an unsigned underlying |
+// type. Enum classes provide better type safety, and forcing an unsigned |
+// underlying type prevents msvc from interpreting enums as negative numbers. |
+// See: crbug.com/628043 |
+ |
// Sides used when drawing borders and outlines. The values should run clockwise from top. |
enum BoxSide { |
BSTop, |
@@ -386,7 +391,9 @@ enum ECaptionSide { |
enum EListStylePosition { ListStylePositionOutside, ListStylePositionInside }; |
-enum EVisibility { VISIBLE, HIDDEN, COLLAPSE }; |
+// TODO(sashab): Add a static_assert when this is used in bitfields to ensure it |
+// uses unsigned as the underlying type. |
+enum class EVisibility : unsigned { Visible, Hidden, Collapse }; |
tkent
2016/08/10 01:11:33
Can you drop 'E' prefix from enum type names in yo
sashab
2016/08/10 01:14:51
Sure, so just to clarify:
enum class Visibility :
tkent
2016/08/10 01:18:43
Exactly!
|
enum ECursor { |
// The following must match the order in CSSValueKeywords.in. |