| Index: third_party/WebKit/Source/core/style/BorderValue.h
|
| diff --git a/third_party/WebKit/Source/core/style/BorderValue.h b/third_party/WebKit/Source/core/style/BorderValue.h
|
| index 2682ced9a910bee2f59f82dd628266644aee489c..6e49aca962fa6a62c3f177208ce6747f57d34271 100644
|
| --- a/third_party/WebKit/Source/core/style/BorderValue.h
|
| +++ b/third_party/WebKit/Source/core/style/BorderValue.h
|
| @@ -26,7 +26,6 @@
|
| #define BorderValue_h
|
|
|
| #include "core/css/StyleColor.h"
|
| -#include "core/style/BorderStyle.h"
|
| #include "core/style/ComputedStyleConstants.h"
|
| #include "platform/graphics/Color.h"
|
| #include "platform/wtf/Allocator.h"
|
| @@ -41,19 +40,20 @@ class BorderValue {
|
| BorderValue()
|
| : color_(0),
|
| color_is_current_color_(true),
|
| - style_(kBorderStyleNone),
|
| + style_(static_cast<unsigned>(EBorderStyle::kNone)),
|
| is_auto_(kOutlineIsAutoOff) {
|
| SetWidth(3);
|
| }
|
|
|
| - BorderValue(const BorderStyle& data, const StyleColor& color, float width) {
|
| + BorderValue(EBorderStyle style, const StyleColor& color, float width) {
|
| SetColor(color.Resolve(Color()));
|
| - SetStyle(data.Style());
|
| - SetIsAuto(data.IsAuto());
|
| + SetStyle(style);
|
| SetWidth(width);
|
| }
|
|
|
| - bool NonZero() const { return Width() && (style_ != kBorderStyleNone); }
|
| + bool NonZero() const {
|
| + return Width() && (style_ != static_cast<unsigned>(EBorderStyle::kNone));
|
| + }
|
|
|
| bool IsTransparent() const {
|
| return !color_is_current_color_ && !color_.Alpha();
|
| @@ -67,9 +67,11 @@ class BorderValue {
|
| // The default width is 3px, but if the style is none we compute a value of 0
|
| // (in ComputedStyle itself)
|
| bool VisuallyEqual(const BorderValue& 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;
|
| }
|
| @@ -98,7 +100,7 @@ class BorderValue {
|
| }
|
|
|
| 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; }
|
|
|