Commit 3da2b3e2 authored by Aleks Totic's avatar Aleks Totic Committed by Chromium LUCI CQ

[TablesNG] Compat fix to legacy algorithm

This fix makes Legacy match TablesNG/FF.
It fixes a corner case:
- when cell percentage width is equal to percentage to
total percentage width do not use cell's percentage
to compute table's intrinsic width.

Bug: 958381
Change-Id: Icc8fac3678cf40ea8ae693a2a19735a74bf24c38
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2568262Reviewed-by: default avatarIan Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Aleks Totic <atotic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#832507}
parent 64e28d96
...@@ -472,9 +472,9 @@ int TableLayoutAlgorithmAuto::CalcEffectiveLogicalWidth() { ...@@ -472,9 +472,9 @@ int TableLayoutAlgorithmAuto::CalcEffectiveLogicalWidth() {
// adjust table max width if needed // adjust table max width if needed
if (cell_logical_width.IsPercentOrCalc()) { if (cell_logical_width.IsPercentOrCalc()) {
if (total_percent > cell_logical_width.Percent() || if (total_percent >= cell_logical_width.Percent() ||
all_cols_are_percent) { all_cols_are_percent) {
// can't satify this condition, treat as variable // can't satisfy this condition, treat as variable
cell_logical_width = Length(); cell_logical_width = Length();
} else { } else {
max_logical_width = max_logical_width =
......
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