github web-platform-tests/wpt merge_pr_47590

latest releases: merge_pr_49470, epochs/three_hourly/2024-12-03_06H, epochs/six_hourly/2024-12-03_06H...
13 months ago

[calc-size] Rework stretch alignment in flexbox.

Previously each FlexItem object had a FlexOffset which was "global",
e.g. its origin was the based off the parent flexbox (not the flex
line for example).

This resulted in some somewhat complex tracking, needing to adjust
the offset whenever a flex-line shifted, etc.

Instead of this global offset, just track the main_axis_offset.

Calculate the cross_axis_offset based on the flex-line offset, and
calculating the alignment just before we add the result to the
fragment builder.

This removes FlexItem::ComputeStretchedSize which was problematic
for calc-size() as it was performing a stretch without using
any of our length_utils functions, (and not resolving auto correctly).

Bug: 313072
Change-Id: Ia717c7b5920e4b8fc546add34022a95f10999756
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5783508
Reviewed-by: David Grogan dgrogan@chromium.org
Reviewed-by: David Baron dbaron@chromium.org
Commit-Queue: Ian Kilpatrick ikilpatrick@chromium.org
Cr-Commit-Position: refs/heads/main@{#1341154}

Don't miss a new wpt release

NewReleases is sending notifications on new releases.