Chromium Code Reviews| Index: third_party/WebKit/Source/core/style/CollapsedBorderValue.h |
| diff --git a/third_party/WebKit/Source/core/style/CollapsedBorderValue.h b/third_party/WebKit/Source/core/style/CollapsedBorderValue.h |
| index f780d7d0756ba66f6b30ba189ae823c51ea7fa41..9abf8db6b2469bd6c013edeb9cbcc86d41f80783 100644 |
| --- a/third_party/WebKit/Source/core/style/CollapsedBorderValue.h |
| +++ b/third_party/WebKit/Source/core/style/CollapsedBorderValue.h |
| @@ -70,9 +70,21 @@ public: |
| return color() == o.color() && isTransparent() == o.isTransparent() && isSameIgnoringColor(o); |
| } |
| + bool isVisible() const |
| + { |
| + return style() > BHIDDEN && !isTransparent() && exists(); |
| + } |
| + |
| bool shouldPaint(const CollapsedBorderValue& tableCurrentBorderValue) const |
| { |
| - return style() > BHIDDEN && !isTransparent() && exists() && isSameIgnoringColor(tableCurrentBorderValue); |
| + return isVisible() && isSameIgnoringColor(tableCurrentBorderValue); |
|
Julien - ping for review
2016/01/08 14:18:15
Shouldn't this be ASSERT(isVisible()) as we don't
Xianzhu
2016/01/08 17:50:45
A cell may have e.g. 2 visible borders and 2 invis
Julien - ping for review
2016/01/11 18:11:36
OK!
|
| + } |
| + |
| + bool isEquivalentForPainting(const CollapsedBorderValue& o) const |
| + { |
| + if (!isVisible() && !o.isVisible()) |
| + return true; |
| + return equals(o); |
| } |
| private: |