Closed Bug 1812485 Opened 2 years ago Closed 2 years ago

Fix pushing tall flex items for "reverse" flex containers

Categories

(Core :: Layout: Flexbox, defect)

defect

Tracking

()

RESOLVED FIXED
117 Branch
Tracking Status
firefox117 --- fixed

People

(Reporter: TYLin, Assigned: TYLin)

References

Details

Attachments

(1 file)

My patch in bug 1743890 Part 2 doesn't consider reversed flex item or flex line. For example,

  1. In a flex-direction:column-reverse flex container, the first item in the column is at the end, and the last item is the bstart-most thing.

  2. In a flex-flow:row wrap-reverse multi-line flex container, the first line is at the bottom edge.

See Also: → 1824902

When iterating flex line and flex item in ReflowChildren(), start from the
startmost line and startmost item with respect to the flex container's
writing-mode. This is equivalent to iterate the items in visual order, which is
necessary to compute the item's position correctly, because any shift to the
startmost line or startmost item can affect later ones.

Also, change a condition in Reflow() to aReflowInput.IsInFragmentedContext()
so that the necessary data can be updated when the flex container fragment is
reflowed in the last column. Otherwise, there will be "unexpected max block
size" assertions [1] while running layout/generic/crashtests/1666592.html.

[1] https://searchfox.org/mozilla-central/rev/e9b8c73771d0038214c69f17c5934ba8ae049799/layout/generic/nsFloatManager.cpp#111

Assignee: nobody → aethanyc
Status: NEW → ASSIGNED
Pushed by aethanyc@gmail.com: https://hg.mozilla.org/integration/autoland/rev/03e38eb3c09f Fix flex container fragmentation for reversed axes. r=dholbert
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 117 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: