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

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

Issue 2181953004: Changed ComputedStyle's EVisibility to be an enum class and fixed naming (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_move_computedstyle_around
Patch Set: Added underlying type notes Created 4 years, 5 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/ComputedStyleConstants.h
diff --git a/third_party/WebKit/Source/core/style/ComputedStyleConstants.h b/third_party/WebKit/Source/core/style/ComputedStyleConstants.h
index f9b57ee99066caf889ba7235ec1d5ffe5917b305..31d3040d7c9bb1c30f0ffb80e56d559a2511c1b9 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,7 @@ enum ECaptionSide {
enum EListStylePosition { ListStylePositionOutside, ListStylePositionInside };
-enum EVisibility { VISIBLE, HIDDEN, COLLAPSE };
+enum class EVisibility : unsigned { Visible, Hidden, Collapse };
esprehn 2016/08/02 02:37:44 Do the static_asserts for size fail if you leave o
sashab 2016/08/02 06:02:39 No, ComputedStyle does have a style check but from
enum ECursor {
// The following must match the order in CSSValueKeywords.in.
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.cpp ('k') | third_party/WebKit/Source/core/svg/SVGUseElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698