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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutTableRow.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/LayoutTableRow.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutTableRow.cpp b/third_party/WebKit/Source/core/layout/LayoutTableRow.cpp
index 440f7a27eb0488ebc422b53e32fe0e7751c1b68f..b293e1b48ab25844db6847dc318aaab7b3ac2018 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTableRow.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTableRow.cpp
@@ -302,16 +302,26 @@ void LayoutTableRow::AddOverflowFromCell(const LayoutTableCell* cell) {
AddSelfVisualOverflow(cell_background_rect);
}
- // Should propagate cell's overflow to row if the cell has row span or has
- // overflow.
- if (cell->RowSpan() == 1 && !cell->HasOverflowModel())
- return;
-
// The cell and the row share the section's coordinate system. However
// the visual overflow should be determined in the coordinate system of
// the row, that's why we shift the rects by cell_row_offset below.
LayoutSize cell_row_offset = cell->Location() - Location();
+ // Let the row's self visual overflow cover the cell's whole collapsed
+ // borders. This ensures correct raster invalidation on row border style
+ // change.
+ if (const auto* collapsed_borders = cell->GetCollapsedBorderValues()) {
+ LayoutRect collapsed_border_rect =
+ cell->RectForOverflowPropagation(collapsed_borders->LocalVisualRect());
+ collapsed_border_rect.Move(cell_row_offset);
+ AddSelfVisualOverflow(collapsed_border_rect);
+ }
+
+ // Should propagate cell's overflow to row if the cell has row span or has
+ // overflow.
+ if (cell->RowSpan() == 1 && !cell->HasOverflowModel())
+ return;
+
LayoutRect cell_visual_overflow_rect =
cell->VisualOverflowRectForPropagation();
cell_visual_overflow_rect.Move(cell_row_offset);

Powered by Google App Engine
This is Rietveld 408576698