Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(267)

Unified Diff: third_party/WebKit/Source/core/style/CollapsedBorderValue.h

Issue 1549693002: Optimize collapsed border painting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 b184ce2aded2c1080de34b85e0e9f661c794b8e4..e28fc6cb8532c06ed35310ada569039ed28e2f89 100644
--- a/third_party/WebKit/Source/core/style/CollapsedBorderValue.h
+++ b/third_party/WebKit/Source/core/style/CollapsedBorderValue.h
@@ -65,8 +65,10 @@ public:
return width() == o.width() && style() == o.style() && precedence() == o.precedence();
}
- bool equals(const CollapsedBorderValue& o) const
+ bool visuallyEquals(const CollapsedBorderValue& o) const
{
+ if (!isVisible() && !o.isVisible())
+ return true;
Xianzhu 2016/05/03 19:03:27 Previously cell borders were cached in LayoutTable
return color() == o.color() && isTransparent() == o.isTransparent() && isSameIgnoringColor(o);
}
@@ -77,9 +79,7 @@ public:
bool shouldPaint(const CollapsedBorderValue& tableCurrentBorderValue) const
{
- // Invisible borders are not cached so painters see visible borders only.
- ASSERT(isVisible());
- return isSameIgnoringColor(tableCurrentBorderValue);
+ return isVisible() && isSameIgnoringColor(tableCurrentBorderValue);
Xianzhu 2016/05/03 19:03:27 The reason of this change is the same as the above
}
private:

Powered by Google App Engine
This is Rietveld 408576698