[wpt-sync] Sync PR 64097 - WebKit export of https://bugs.webkit.org/show_bug.cgi?id=327176
Categories
(Core :: Layout: Flexbox, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox162 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 64097 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/64097
Details from upstream follow.
Alan Baradlay <zalan@apple.com> wrote:
WebKit export of https://bugs.webkit.org/show_bug.cgi?id=327176
WebKit export from bug: [<!---->Flex]<!----> A table flex item with borders is wider than its content and borders
<pre>
[Flex] A table flex item with borders is wider than its content and borders<div style="display: flex; justify-content: flex-end; width: 300px"> <table style="border: 10px solid; border-spacing: 0"><tr><td style="padding: 0"><div style="width: 50px"></div></td></tr></table> </div>The table should be 70px wide, its 50px content plus 20px of borders. Instead it was 90px and stuck out of the
container.RenderTable cached its inline borders and only recomputed them when it laid out or computed its intrinsic widths.
The flex layout read them before either, getting 0 on the first layout or the previous widths after a border change.
FlexLayoutItem cached that as the main-axis border and padding, and maxContentMainAxisExtentForFlexItem subtracted the
same stale value from a max-content contribution that had the real borders, so the content size came out too big by
the border widths and the border box added the real borders on top.Compute borderStart() and borderEnd() on demand, the way borderBefore() and borderAfter() already are, as the FIXMEs
in layout and computeIntrinsicLogicalWidths asked, and remove the cache.No measurable cost in PerformanceTests/Layout (median ms over 20 iterations; with the change, with the old cache,
then with the change again):large-table-with-collapsed-borders-and-no-colspans 179 180 184 large-table-with-collapsed-borders-and-colspans 181 183 183 large-table-with-collapsed-borders-and-colspans-wider-than-table 498 504.5 512WebKit-Bug: <a href="https://bugs.webkit.org/show_bug.cgi?id=327176">https://bugs.webkit.org/show_bug.cgi?id=327176</a>
WebKit-Canonical-Link: <a href="https://commits.webkit.org/323471@main">https://commits.webkit.org/323471@main</a>
</pre>
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Updated•29 days ago
|
| Assignee | ||
Updated•29 days ago
|
| Assignee | ||
Updated•29 days ago
|
| Assignee | ||
Updated•29 days ago
|
| Assignee | ||
Updated•29 days ago
|
| Assignee | ||
Comment 1•29 days ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/jobs?repo=try&landoInstance=lando-prod-2025&landoCommitID=114464
| Assignee | ||
Comment 2•29 days ago
|
||
CI Results
Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 1 tests
Status Summary
Firefox
PASS: 1
Chrome
PASS: 1
Safari
FAIL: 1
Links
Comment 4•22 days ago
|
||
| bugherder | ||
Description
•