Chromium Code Reviews

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, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « third_party/WebKit/Source/core/paint/TableCellPainter.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
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);
}
private:
« no previous file with comments | « third_party/WebKit/Source/core/paint/TableCellPainter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine