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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutTableRowTest.cpp

Issue 2861373003: Let table row and section's self visual overflow cover whole collapsed borders (Closed)
Patch Set: rebaseline-cl Created 3 years, 7 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/layout/LayoutTableRowTest.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutTableRowTest.cpp b/third_party/WebKit/Source/core/layout/LayoutTableRowTest.cpp
index f5bf70daf33e666c39404666986a178a6eae441f..211e81784fe336a59b83e96088ae4015649b6882 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTableRowTest.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTableRowTest.cpp
@@ -153,6 +153,37 @@ TEST_F(LayoutTableRowTest, VisualOverflow) {
EXPECT_EQ(LayoutRect(0, 0, 450, 100), row3->SelfVisualOverflowRect());
}
+TEST_F(LayoutTableRowTest, VisualOverflowWithCollapsedBorders) {
+ SetBodyInnerHTML(
+ "<style>"
+ " table { border-collapse: collapse }"
+ " td { border: 0px solid blue; padding: 0 }"
+ " div { width: 100px; height: 100px }"
+ "</style>"
+ "<table>"
+ " <tr id='row'>"
+ " <td style='border-bottom-width: 10px;"
+ " outline: 3px solid blue'><div></div></td>"
+ " <td style='border-width: 3px 15px'><div></div></td>"
+ " </tr>"
+ "</table>");
+
+ auto* row = GetRowByElementId("row");
+
+ // The row's self visual overflow covers the collapsed borders.
+ LayoutRect expected_self_visual_overflow = row->BorderBoxRect();
+ expected_self_visual_overflow.ExpandEdges(LayoutUnit(1), LayoutUnit(8),
+ LayoutUnit(5), LayoutUnit(0));
+ EXPECT_EQ(expected_self_visual_overflow, row->SelfVisualOverflowRect());
+
+ // The row's visual overflow covers self visual overflow and visual overflows
+ // of all cells.
+ LayoutRect expected_visual_overflow = row->BorderBoxRect();
+ expected_visual_overflow.ExpandEdges(LayoutUnit(3), LayoutUnit(8),
+ LayoutUnit(5), LayoutUnit(3));
+ EXPECT_EQ(expected_visual_overflow, row->VisualOverflowRect());
+}
+
TEST_F(LayoutTableRowTest, LayoutOverflow) {
SetBodyInnerHTML(
"<table style='border-spacing: 0'>"
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTableRow.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutTableSection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698