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() { ...@@ -1394,19 +1394,6 @@ void LayoutTableSection::ComputeVisualOverflowFromDescendants() {
for (auto* cell = row->FirstCell(); cell; cell = cell->NextCell()) { for (auto* cell = row->FirstCell(); cell; cell = cell->NextCell()) {
if (cell->HasSelfPaintingLayer()) if (cell->HasSelfPaintingLayer())
continue; 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()) if (force_full_paint_ || !cell->HasVisualOverflow())
continue; continue;
......
...@@ -301,11 +301,8 @@ TEST_F(LayoutTableSectionTest, VisualOverflowWithCollapsedBorders) { ...@@ -301,11 +301,8 @@ TEST_F(LayoutTableSectionTest, VisualOverflowWithCollapsedBorders) {
auto* section = GetSectionByElementId("section"); auto* section = GetSectionByElementId("section");
// The section's self visual overflow covers the collapsed borders. // The section's self visual overflow doesn't cover the collapsed borders.
LayoutRect expected_self_visual_overflow = section->BorderBoxRect(); EXPECT_EQ(section->BorderBoxRect(), section->SelfVisualOverflowRect());
expected_self_visual_overflow.ExpandEdges(LayoutUnit(1), LayoutUnit(8),
LayoutUnit(0), LayoutUnit(0));
EXPECT_EQ(expected_self_visual_overflow, section->SelfVisualOverflowRect());
// The section's visual overflow covers self visual overflow and visual // The section's visual overflow covers self visual overflow and visual
// overflows rows. // overflows rows.
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
"paintInvalidations": [ "paintInvalidations": [
{ {
"object": "LayoutTableSection TBODY", "object": "LayoutTableSection TBODY",
"rect": [8, 8, 200, 200], "rect": [9, 9, 198, 198],
"reason": "style change" "reason": "style change"
} }
] ]
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
"paintInvalidations": [ "paintInvalidations": [
{ {
"object": "LayoutTableSection TBODY id='tbody'", "object": "LayoutTableSection TBODY id='tbody'",
"rect": [8, 8, 200, 200], "rect": [9, 9, 198, 198],
"reason": "background" "reason": "background"
} }
] ]
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
"paintInvalidations": [ "paintInvalidations": [
{ {
"object": "LayoutTableSection TBODY", "object": "LayoutTableSection TBODY",
"rect": [8, 8, 200, 200], "rect": [9, 9, 198, 198],
"reason": "style change" "reason": "style change"
} }
] ]
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
"paintInvalidations": [ "paintInvalidations": [
{ {
"object": "LayoutTableSection TBODY id='tbody'", "object": "LayoutTableSection TBODY id='tbody'",
"rect": [8, 8, 200, 200], "rect": [9, 9, 198, 198],
"reason": "background" "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