| 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 43ce12391cd7475975a611403da06c4e93aa3c6a..3b98d98a4d36603ab0378ef6a6a05a36fe441058 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutTableRow.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutTableRow.cpp
|
| @@ -293,30 +293,35 @@ void LayoutTableRow::ComputeOverflow() {
|
| }
|
|
|
| void LayoutTableRow::AddOverflowFromCell(const LayoutTableCell* cell) {
|
| - // Non-row-spanning-cells don't create overflow (they are fully contained
|
| - // within this row).
|
| - // TODO(crbug.com/603993): This seems incorrect because cell may have visual
|
| - // effect overflow that should be included in this row.
|
| - if (cell->RowSpan() == 1)
|
| - return;
|
| -
|
| - // Cells only generates visual overflow.
|
| - LayoutRect cell_visual_overflow_rect =
|
| - cell->VisualOverflowRectForPropagation(StyleRef());
|
| -
|
| - // 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 it below.
|
| - cell_visual_overflow_rect.MoveBy(-Location());
|
| - AddContentsVisualOverflow(cell_visual_overflow_rect);
|
| -
|
| // Table row paints its background behind cells. If the cell spans multiple
|
| // rows, the row's visual rect should be expanded to cover the cell.
|
| - if (StyleRef().HasBackground()) {
|
| + // Here don't check background existence to avoid requirement to invalidate
|
| + // overflow on change of background existence.
|
| + if (cell->RowSpan() > 1) {
|
| LayoutRect cell_background_rect = cell->FrameRect();
|
| cell_background_rect.MoveBy(-Location());
|
| 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();
|
| +
|
| + LayoutRect cell_visual_overflow_rect =
|
| + cell->VisualOverflowRectForPropagation(StyleRef());
|
| + cell_visual_overflow_rect.Move(cell_row_offset);
|
| + AddContentsVisualOverflow(cell_visual_overflow_rect);
|
| +
|
| + LayoutRect cell_layout_overflow_rect =
|
| + cell->LayoutOverflowRectForPropagation(StyleRef());
|
| + cell_layout_overflow_rect.Move(cell_row_offset);
|
| + AddLayoutOverflow(cell_layout_overflow_rect);
|
| }
|
|
|
| bool LayoutTableRow::IsFirstRowInSectionAfterHeader() const {
|
|
|