Commit 34ee1b5d authored by Aleks Totic's avatar Aleks Totic Committed by Commit Bot

[TablesNG] SetHideTableCellIfEmpty cleanup

I believed that empty-cells:hide was a css attribute on table,
that afffects how cells are drawn. This was wrong.

empty-cells:hide is a css property of a cell, inherited via CSS.

Old way made this test fail:
external/wpt/css/CSS2/tables/empty-cells-applies-to-014.xht

Bug: 958381
Change-Id: I0fcc09bec995fd743e31d9e9ad688431e92f666e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2416840
Commit-Queue: Aleks Totic <atotic@chromium.org>
Reviewed-by: default avatarMorten Stenshorne <mstensho@chromium.org>
Reviewed-by: default avatarIan Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#808976}
parent 79fe0a2a
...@@ -100,6 +100,10 @@ scoped_refptr<const NGLayoutResult> NGTableRowLayoutAlgorithm::Layout() { ...@@ -100,6 +100,10 @@ scoped_refptr<const NGLayoutResult> NGTableRowLayoutAlgorithm::Layout() {
builder.SetIsTableCellHiddenForPaint( builder.SetIsTableCellHiddenForPaint(
table_data.column_locations[*cell_location_start_column].is_collapsed && table_data.column_locations[*cell_location_start_column].is_collapsed &&
*cell_location_start_column == cell_location_end_column); *cell_location_start_column == cell_location_end_column);
builder.SetHideTableCellIfEmpty(!table_data.has_collapsed_borders &&
cell.Style().EmptyCells() ==
EEmptyCells::kHide);
return builder.ToConstraintSpace(); return builder.ToConstraintSpace();
}; };
......
...@@ -60,8 +60,6 @@ scoped_refptr<const NGLayoutResult> NGTableSectionLayoutAlgorithm::Layout() { ...@@ -60,8 +60,6 @@ scoped_refptr<const NGLayoutResult> NGTableSectionLayoutAlgorithm::Layout() {
row_space_builder.SetPercentageResolutionSize( row_space_builder.SetPercentageResolutionSize(
{container_builder_.InlineSize(), kIndefiniteSize}); {container_builder_.InlineSize(), kIndefiniteSize});
row_space_builder.SetNeedsBaseline(true); row_space_builder.SetNeedsBaseline(true);
row_space_builder.SetHideTableCellIfEmpty(
ConstraintSpace().HideTableCellIfEmpty());
row_space_builder.SetTableRowData(&table_data, row_index); row_space_builder.SetTableRowData(&table_data, row_index);
NGConstraintSpace row_space = row_space_builder.ToConstraintSpace(); NGConstraintSpace row_space = row_space_builder.ToConstraintSpace();
scoped_refptr<const NGLayoutResult> row_result = row.Layout(row_space); scoped_refptr<const NGLayoutResult> row_result = row.Layout(row_space);
......
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