Commit 273c638
Table layout: Fix min-width distribution for spanning cells across mixed percent/auto columns
https://[email protected]/show_bug.cgi?id=305042
rdar://167684748
Reviewed by Alan Baradlay.
This patch undo some renering progressions from 305120@main where we shipped
correct rendering but it broke distribution and caused tables to be wide
in linked test case (in bugzilla - also converted to regression test case).
i.e., table was ~770 pixel instead of 602 but with correct rendering.
This patch will give us same rendering albeit incorrect as of shipping Safari,
although it does not negate our 305120@main fully and we still progress a lot
of test cases - which is right step to do.
When a spanning cell covers columns with a mix of percentages, fixed widths,
and auto widths, the distribution logic needs to account for fixed-width
columns separately. The new code path for distributing min/max widths based
on effective percentages should only apply when there are no fixed-width
columns in the span.
The fix adds a check for fixedWidth <= 0 to ensure the new distribution
logic only runs when the span contains only percent and auto columns, allowing
the existing else block to handle the mixed fixed+percent+auto case correctly.
* Source/WebCore/rendering/AutoTableLayout.cpp:
(WebCore::AutoTableLayout::calcEffectiveLogicalWidth):
* LayoutTests/fast/table/table-colspan-mixed-percent-fixed-auto-expected.txt: Added.
* LayoutTests/fast/table/table-colspan-mixed-percent-fixed-auto.html: Added.
^ So we don't regress it in future. It checks width (not rendering).
Canonical link: https://commits.webkit.org/305215@main1 parent a1f9951 commit 273c638
File tree
3 files changed
+66
-1
lines changed- LayoutTests/fast/table
- Source/WebCore/rendering
3 files changed
+66
-1
lines changedLines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
Lines changed: 55 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
457 | 457 | | |
458 | 458 | | |
459 | 459 | | |
460 | | - | |
| 460 | + | |
461 | 461 | | |
462 | 462 | | |
463 | 463 | | |
| |||
0 commit comments