[wpt-sync] Sync PR 64993 - WebKit export of https://bugs.webkit.org/show_bug.cgi?id=313500
Categories
(Core :: Layout: Tables, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox163 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
(Blocks 1 open bug, )
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 64993 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/64993
Details from upstream follow.
Alan Baradlay <zalan@apple.com> wrote:
WebKit export of https://bugs.webkit.org/show_bug.cgi?id=313500
WebKit export from bug: Fix imported/<!---->w3c/<!---->web-<!---->platform-<!---->tests/<!---->css/<!---->css-<!---->tables/<!---->absolute-<!---->tables-<!---->015.<!---->html
<pre>
Fix css/css-tables/absolute-tables-015.htmlA table with width: 0px was treated as width: auto, causing
percentage column scaling to inflate the table to its max-content
width instead of its min-content width.For example:
<table style="width: 0px">
<td style="width: 100%;">
<span style="display: inline-block; width: 100px; height: 50px;"></span>
<span style="display: inline-block; width: 100px; height: 50px;"></span>
</td>
</table>Expected: table is 100px (min-content), spans stack vertically.
Actual: table is 200px (max-content scaled by td width: 100%).The condition in RenderTable::updateLogicalWidth that decides
whether to use the specified-width path or the auto-width path was:styleLogicalWidth.isSpecified() && styleLogicalWidth.isPossiblyPositive()
isPossiblyPositive() returns false for 0, so width: 0px fell into
the auto-width path. The auto-width path uses
scaledWidthFromPercentColumns (from td width: 100%), which scales
the max-content width (204) to fill the available space (200).The fix adds isKnownZero() to the condition so width: 0px takes
the specified-width path: the table gets width 0, then line 341
expands it to minPreferredLogicalWidth (100 - the min-content).This changes the expectation of the replaced-element subtest of percentage-sizing-of-table-cell-children.html: with the table's width: 0px giving it its min-content width, the input's percentage width makes its min-content contribution zero (it's a compressible replaced element), so the input ends up 0px wide.
WebKit-Bug: <a href="https://bugs.webkit.org/show_bug.cgi?id=313500">https://bugs.webkit.org/show_bug.cgi?id=313500</a>
WebKit-Canonical-Link: <a href="https://commits.webkit.org/312204@main">https://commits.webkit.org/312204@main</a>
</pre>
| Assignee | ||
Updated•17 days ago
|
| Assignee | ||
Comment 1•17 days ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/jobs?repo=try&landoInstance=lando-prod-2025&landoCommitID=121848
| Assignee | ||
Comment 2•17 days ago
|
||
CI Results
Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 1 tests and 10 subtests
Status Summary
Firefox
OK : 1
PASS: 7
FAIL: 3
Chrome
OK : 1
PASS: 10
Safari
OK : 1
PASS: 10
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
Firefox-only Failures
- /css/css-tables/height-distribution/percentage-sizing-of-table-cell-children.html [wpt.fyi]
- Percentages resolve based on the row height:
FAIL - Percentages resolve based on the final row height:
FAIL - Unresolvable percentage heights are resolved as 0px in first pass (scrollable overflow):
FAIL
- Percentages resolve based on the row height:
New Tests That Don't Pass
- /css/css-tables/height-distribution/percentage-sizing-of-table-cell-children.html [wpt.fyi]
- Percentages resolve based on the row height:
FAIL(Chrome:PASS, Safari:PASS) - Percentages resolve based on the final row height:
FAIL(Chrome:PASS, Safari:PASS) - Unresolvable percentage heights are resolved as 0px in first pass (scrollable overflow):
FAIL(Chrome:PASS, Safari:PASS)
- Percentages resolve based on the row height:
Comment 4•14 days ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/f4d691d74d54
https://hg.mozilla.org/mozilla-central/rev/8ff173f1c8f5
Description
•