Index: third_party/WebKit/Source/core/layout/CollapsedBorderValue.h |
diff --git a/third_party/WebKit/Source/core/layout/CollapsedBorderValue.h b/third_party/WebKit/Source/core/layout/CollapsedBorderValue.h |
index d555c97fd2f81c6c81e1ea07a76c5e68eb75edc0..8c5c5b628a96897259230d09fdb3bdae399be2af 100644 |
--- a/third_party/WebKit/Source/core/layout/CollapsedBorderValue.h |
+++ b/third_party/WebKit/Source/core/layout/CollapsedBorderValue.h |
@@ -56,14 +56,14 @@ class CollapsedBorderValue { |
const Color& color, |
EBorderPrecedence precedence) |
: color_(color), |
- width_(border.NonZero() ? border.Width() : 0), |
+ width_(border.Style() > kBorderStyleHidden ? border.Width() : 0), |
Xianzhu
2017/05/04 20:45:26
BorderValue::NonZero() is:
{ return Width() && (s
wkorman
2017/05/04 21:13:04
Seems like unit tests for these permutations could
Xianzhu
2017/05/04 22:23:35
Added tests.
|
style_(border.Style()), |
precedence_(precedence), |
transparent_(border.IsTransparent()) { |
DCHECK(precedence != kBorderPrecedenceOff); |
} |
- unsigned Width() const { return style_ > kBorderStyleHidden ? width_ : 0; } |
+ unsigned Width() const { return width_; } |
EBorderStyle Style() const { return static_cast<EBorderStyle>(style_); } |
bool Exists() const { return precedence_ != kBorderPrecedenceOff; } |
Color GetColor() const { return color_; } |