Index: third_party/WebKit/Source/core/style/BorderStyle.h |
diff --git a/third_party/WebKit/Source/core/style/BorderStyle.h b/third_party/WebKit/Source/core/style/BorderStyle.h |
index b243bca03615b4eb68983d57addb6ee5a88d4cff..184ef450ea547a55e7ac22c88267be44776f1eac 100644 |
--- a/third_party/WebKit/Source/core/style/BorderStyle.h |
+++ b/third_party/WebKit/Source/core/style/BorderStyle.h |
@@ -37,18 +37,24 @@ class BorderStyle { |
friend class ComputedStyle; |
public: |
- BorderStyle() : style_(kBorderStyleNone), is_auto_(kOutlineIsAutoOff) {} |
+ BorderStyle() |
+ : style_(static_cast<unsigned>(EBorderStyle::kNone)), |
+ is_auto_(kOutlineIsAutoOff) {} |
- bool NonZero() const { return (style_ != kBorderStyleNone); } |
+ bool NonZero() const { |
+ return (style_ != static_cast<unsigned>(EBorderStyle::kNone)); |
+ } |
bool operator==(const BorderStyle& o) const { return style_ == o.style_; } |
// The default width is 3px, but if the style is none we compute a value of 0 |
// (in ComputedStyle itself) |
bool VisuallyEqual(const BorderStyle& o) const { |
- if (style_ == kBorderStyleNone && o.style_ == kBorderStyleNone) |
+ if (style_ == static_cast<unsigned>(EBorderStyle::kNone) && |
+ o.style_ == static_cast<unsigned>(EBorderStyle::kNone)) |
return true; |
- if (style_ == kBorderStyleHidden && o.style_ == kBorderStyleHidden) |
+ if (style_ == static_cast<unsigned>(EBorderStyle::kHidden) && |
+ o.style_ == static_cast<unsigned>(EBorderStyle::kHidden)) |
return true; |
return *this == o; |
} |
@@ -56,7 +62,7 @@ class BorderStyle { |
bool operator!=(const BorderStyle& o) const { return !(*this == o); } |
EBorderStyle Style() const { return static_cast<EBorderStyle>(style_); } |
- void SetStyle(EBorderStyle style) { style_ = style; } |
+ void SetStyle(EBorderStyle style) { style_ = static_cast<unsigned>(style); } |
OutlineIsAuto IsAuto() const { return static_cast<OutlineIsAuto>(is_auto_); } |
void SetIsAuto(OutlineIsAuto is_auto) { is_auto_ = is_auto; } |