Commit b19fca31 authored by Morten Stenshorne's avatar Morten Stenshorne Committed by Commit Bot

Consistently round table row heights.

Do in LogicalHeightForRow() as in CalcRowLogicalHeight() - i.e. round
instead of floor, to convert from LayoutUnit to int. We calculated the
pagination strut incorrectly for the line that followed, because it was
based on the floored LayoutUnit height of the preceding table row.
Then, later on, it got adjusted (rounded from LayoutUnit), and the
balancing code got confused, because the line had a pagination strut,
but didn't appear to be exactly at the start of a column (there should
be no strut in such a case).

Bug: 908247
Change-Id: I11fa5430b9ff6e83b20dc25ce1d945e54b80f6ea
Reviewed-on: https://chromium-review.googlesource.com/c/1356551
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Reviewed-by: default avatarDavid Grogan <dgrogan@chromium.org>
Reviewed-by: default avatarEmil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#613033}
parent a0e6cb4e
......@@ -1998,7 +1998,9 @@ int LayoutTableSection::LogicalHeightForRow(
if (grid_[row_index].logical_height.IsSpecified()) {
LayoutUnit specified_logical_height =
MinimumValueForLength(grid_[row_index].logical_height, LayoutUnit());
logical_height = std::max(logical_height, specified_logical_height.ToInt());
// We round here to match computations for row_pos_ in
// CalcRowLogicalHeight().
logical_height = std::max(logical_height, specified_logical_height.Round());
}
return logical_height;
}
......
......@@ -814,6 +814,7 @@ crbug.com/635619 virtual/layout_ng/external/wpt/css/CSS2/positioning/position-re
crbug.com/635619 virtual/layout_ng/external/wpt/css/CSS2/positioning/position-relative-034.xht [ Skip ]
crbug.com/635619 virtual/layout_ng/external/wpt/css/CSS2/positioning/position-relative-036.xht [ Skip ]
crbug.com/829028 virtual/layout_ng_experimental/external/wpt/css/css-multicol/balance-table-with-fractional-height-row.html [ Failure ]
crbug.com/829028 virtual/layout_ng_experimental/external/wpt/css/css-multicol/filter-with-abspos.html [ Failure ]
crbug.com/829028 virtual/layout_ng_experimental/external/wpt/css/css-multicol/going-out-of-flow-after-spanner.html [ Failure ]
crbug.com/829028 virtual/layout_ng_experimental/external/wpt/css/css-multicol/inline-block-and-column-span-all.html [ Failure ]
......
<!DOCTYPE html>
<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-multicol/#filling-columns">
<div id="multicol" style="columns:2; line-height:100px;">
<div style="display:table-row; height:4.9999px;"></div>
<div style="display:table-row;">
<br>
</div>
</div>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(()=> {
assert_equals(multicol.getBoundingClientRect().height, 100);
}, "If we have room for the line, we have room for all we need");
</script>
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