Closed Bug 2077917 Opened 1 month ago Closed 1 month ago

[wpt-sync] Sync PR 63232 - WebKit export of https://bugs.webkit.org/show_bug.cgi?id=325808

Categories

(Core :: Layout: Tables, task, P4)

task

Tracking

()

RESOLVED FIXED
160 Branch
Tracking Status
firefox160 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 63232 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/63232
Details from upstream follow.

Alan Baradlay <zalan@apple.com> wrote:

WebKit export of https://bugs.webkit.org/show_bug.cgi?id=325808

WebKit export from bug: Regression(311393@main) Table content disappears depending on the window width

<pre>
REGRESSION(<a href="https://commits.webkit.org/311393@main">311393@main</a>): Table cells after a width: 0 column are placed off-screen

<table style="width: 300px">
<tr>
<td style="width: 20px">text</td>
...
<td style="width: 0; padding: 0"></td>
<td style="width: 1%">text</td>
</tr>
</table>

The last cell should be at the table's right edge. Instead it was placed at x = -33554152 (caused by NaN).

<a href="https://commits.webkit.org/311393@main">311393@main</a> stopped ignoring width: 0 on cells, making an empty 'width: 0' column (with no padding) a fixed column with a max width of 0.
When AutoTableLayout::layout() distributes leftover width over fixed columns,

  1. first (and subsequent) columns use up totalFixed,
  2. the zero width column computes 0/0 = NaN and
  3. the last column gets pushed off-screen.

This is also a pre-existing bug: a positive width that rounds down to 0 in LayoutUnit (e.g. width: 0.001px) is not ignored either (see first test case).

Stop distributing when we run out of totalFixed space. The remaining fixed columns have a max width of 0, so they would get 0 anyway, and any width still left goes to the later passes (e.g. percent columns).

WebKit-Bug: <a href="https://bugs.webkit.org/show_bug.cgi?id=325808">https://bugs.webkit.org/show_bug.cgi?id=325808</a>
WebKit-Canonical-Link: <a href="https://commits.webkit.org/322376@main">https://commits.webkit.org/322376@main</a>
</pre>

Component: web-platform-tests → Layout: Tables
Product: Testing → Core

CI Results

Ran 11 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 344 tests and 1 subtests

Status Summary

Firefox

OK : 135
PASS: 2[GitHub] 40[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 853[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 998[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview] 1003[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL: 95[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 114[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] 116[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview]

Chrome

PASS: 2

Safari

FAIL: 2

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 160 Branch
You need to log in before you can comment on or make changes to this bug.