Prototype Step 3 of Grid Sizing Algorithm: Re-resolve column sizes using updated content contributions
Categories
(Core :: Layout: Grid, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox141 | --- | fixed |
People
(Reporter: TYLin, Assigned: TYLin)
References
Details
(Whiteboard: [grid-percentages:m1], [wptsync upstream])
Attachments
(3 files)
Step 3:
Then, if the min-content contribution of any grid item has changed based on the row sizes and alignment calculated in step 2, re-resolve the sizes of the grid columns with the new min-content and max-content contributions (once only).
To find the block-axis available space for any items whose inline-axis size contributions require it, use the grid row sizes calculated in the previous step. If the grid container’s block size is definite, also apply align-content to account for the effective row gap sizes.
Updated•10 months ago
|
| Assignee | ||
Updated•9 months ago
|
| Assignee | ||
Updated•8 months ago
|
| Assignee | ||
Comment 1•8 months ago
|
||
CalculateTrackSizesForAxis() is the top-level function that implements the
Grid Sizing Algorithm. This patch moves the call from
ComputeBSizeForResolvingRowSizes() into Reflow() to make it clearer that the
track sizing is initiated from there.
Previously, the first pass to resolve row sizes was guarded by a multi-pass pref
and conditioned on having an unconstrained block-size, while the second pass
always ran. This patch restructures the logic so that the first pass always
runs, and the second pass runs only when the conditions are met. This makes the
flow clearer and emphasizes that the second pass is the "extra" step introduced
by the new behavior.
This patch prepares for the next part, which will add an additional pass for
resolving the column sizes in the block guarded by the multi-pass pref.
This patch does not change behavior.
| Assignee | ||
Comment 2•8 months ago
|
||
| Assignee | ||
Comment 3•8 months ago
|
||
grid-item-inline-contribution-002.html fails to properly assert that grid
column sizes are re-resolved in Firefox. For example, using DevTools to inspect
the first column shows it is 10px, yet Firefox still passes the test without
fixing this bug.
grid-item-inline-contribution-004.html is adapted from
grid-item-inline-contribution-002.html It correctly tests the re-resolution of
the grid columns sizes by requiring the first column to be exactly 50px in order
to render a green rectangle.
Comment 6•8 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/7da021992ad3
https://hg.mozilla.org/mozilla-central/rev/1345749b131c
https://hg.mozilla.org/mozilla-central/rev/537ed21ed596
Updated•7 months ago
|
Description
•