Closed Bug 1936370 Opened 1 year ago Closed 1 year ago

Fix the flex item's stretched cross-size when computing flex container's intrinsic inline size

Categories

(Core :: Layout: Flexbox, defect)

defect

Tracking

()

RESOLVED FIXED
135 Branch
Tracking Status
firefox135 --- fixed

People

(Reporter: TYLin, Assigned: TYLin)

References

Details

Attachments

(2 files)

Bug 1742042 fixed the flex item's stretched cross-size when computing the flex container's intrinsic size. However, the code has two issues:

  1. When getting the used align-self value for the flex item here, it fails to consider legacy -webkit-box-align value from the container.
  2. When the flex item has box-sizing:border-box, it does not subtract the item's margin when computing the stretched cross-size. This is the logic to be fixed.
Depends on: 1936377

This patch extracts the logic from FlexItem's constructor that computes the
used align-self value of a flex item, with legacy -webkit-box-align
considered. The new helper is then used in ComputeIntrinsicISize().

Assignee: nobody → aethanyc
Status: NEW → ASSIGNED

When the flex item has 'box-sizing:border-box', we should subtract its margin
from the stretched cross size.

The testcase is adapted from aspect-ratio-intrinsic-size-008.html, with
"box-sizing:border-box" added to the flex item.

Pushed by aethanyc@gmail.com: https://hg.mozilla.org/integration/autoland/rev/1658b53c6682 Part 1 - Fix legacy flex container cross size alignment when computing intrinsic inline size. r=dholbert https://hg.mozilla.org/integration/autoland/rev/c9a7242c12e3 Part 2 - Fix flex item's stretched cross size with box-sizing:border-box when computing flex container's intrinsic inline size. r=dholbert
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/49665 for changes under testing/web-platform/tests
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 135 Branch
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: