Commit f835bd68 authored by Xianzhu Wang's avatar Xianzhu Wang Committed by Commit Bot

Remove out-dated code for LayoutTableSection visual overflow

The code was needed before we painted collapsed borders using table
row as the display item client.

Bug: 663208
Change-Id: I0ee5033da9405f7a1b4c94ca52b71c88578b3d1b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1566613Reviewed-by: default avatarChris Harrelson <chrishtr@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#650541}
parent 3bdd7fe1
......@@ -1394,19 +1394,6 @@ void LayoutTableSection::ComputeVisualOverflowFromDescendants() {
for (auto* cell = row->FirstCell(); cell; cell = cell->NextCell()) {
if (cell->HasSelfPaintingLayer())
continue;
// Let the section's self visual overflow cover the cell's whole collapsed
// borders. This ensures correct raster invalidation on section border
// style change.
// TODO(wangxianzhu): When implementing row as DisplayItemClient of
// collapsed borders, the following logic should be replaced by
// invalidation of rows on section border style change. crbug.com/663208.
if (const auto* collapsed_borders = cell->GetCollapsedBorderValues()) {
LayoutRect rect = cell->RectForOverflowPropagation(
collapsed_borders->LocalVisualRect());
rect.MoveBy(cell->Location());
AddSelfVisualOverflow(rect);
}
if (force_full_paint_ || !cell->HasVisualOverflow())
continue;
......
......@@ -301,11 +301,8 @@ TEST_F(LayoutTableSectionTest, VisualOverflowWithCollapsedBorders) {
auto* section = GetSectionByElementId("section");
// The section's self visual overflow covers the collapsed borders.
LayoutRect expected_self_visual_overflow = section->BorderBoxRect();
expected_self_visual_overflow.ExpandEdges(LayoutUnit(1), LayoutUnit(8),
LayoutUnit(0), LayoutUnit(0));
EXPECT_EQ(expected_self_visual_overflow, section->SelfVisualOverflowRect());
// The section's self visual overflow doesn't cover the collapsed borders.
EXPECT_EQ(section->BorderBoxRect(), section->SelfVisualOverflowRect());
// The section's visual overflow covers self visual overflow and visual
// overflows rows.
......
......@@ -8,7 +8,7 @@
"paintInvalidations": [
{
"object": "LayoutTableSection TBODY",
"rect": [8, 8, 200, 200],
"rect": [9, 9, 198, 198],
"reason": "style change"
}
]
......
......@@ -8,7 +8,7 @@
"paintInvalidations": [
{
"object": "LayoutTableSection TBODY id='tbody'",
"rect": [8, 8, 200, 200],
"rect": [9, 9, 198, 198],
"reason": "background"
}
]
......
......@@ -19,7 +19,7 @@
"paintInvalidations": [
{
"object": "LayoutTableSection TBODY",
"rect": [8, 8, 200, 200],
"rect": [9, 9, 198, 198],
"reason": "style change"
}
]
......
......@@ -19,7 +19,7 @@
"paintInvalidations": [
{
"object": "LayoutTableSection TBODY id='tbody'",
"rect": [8, 8, 200, 200],
"rect": [9, 9, 198, 198],
"reason": "background"
}
]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment