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 58a261674f0b5133cd2eef50d88548f40e2a7c16..f4ffd8a7a5584d8755bfcfbf3074e99aefc3d2b0 100644 |
--- a/third_party/WebKit/Source/core/style/BorderValue.h |
+++ b/third_party/WebKit/Source/core/style/BorderValue.h |
@@ -26,6 +26,7 @@ |
#define BorderValue_h |
#include "core/css/StyleColor.h" |
+#include "core/style/BorderColorAndStyle.h" |
#include "core/style/ComputedStyleConstants.h" |
#include "platform/graphics/Color.h" |
#include "platform/wtf/Allocator.h" |
@@ -43,7 +44,6 @@ static const int kBorderWidthDenominator = 1 << kBorderWidthFractionalBits; |
static const int kMaxForBorderWidth = ((1 << 26) - 1) / kBorderWidthDenominator; |
class BorderValue { |
- DISALLOW_NEW(); |
friend class ComputedStyle; |
public: |
@@ -55,6 +55,14 @@ class BorderValue { |
SetWidth(3); |
} |
+ BorderValue(const BorderColorAndStyle& data, const float width) { |
+ SetColor(data.GetColor()); |
+ SetColorIsCurrentColor(ColorIsCurrentColor()); |
+ SetStyle(data.Style()); |
+ SetIsAuto(data.IsAuto()); |
+ SetWidth(width); |
+ } |
+ |
bool NonZero() const { return Width() && (style_ != kBorderStyleNone); } |
bool IsTransparent() const { |
@@ -102,6 +110,14 @@ class BorderValue { |
EBorderStyle Style() const { return static_cast<EBorderStyle>(style_); } |
void SetStyle(EBorderStyle style) { style_ = style; } |
+ OutlineIsAuto IsAuto() const { return static_cast<OutlineIsAuto>(is_auto_); } |
+ void SetIsAuto(OutlineIsAuto is_auto) { is_auto_ = is_auto; } |
+ |
+ bool ColorIsCurrentColor() const { return color_is_current_color_; } |
+ void SetColorIsCurrentColor(bool color_is_current_color) { |
+ color_is_current_color_ = static_cast<unsigned>(color_is_current_color); |
+ } |
+ |
protected: |
static unsigned WidthToFixedPoint(float width) { |
DCHECK_GE(width, 0); |