Open Bug 1793322 Opened 2 years ago Updated 2 years ago

Deal with column-reverse flexbox in nsFlexContainerFrame's nsILineIterator implementation.

Categories

(Core :: Layout: Flexbox, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: emilio, Assigned: emilio, NeedInfo)

References

Details

Attachments

(1 file)

For flex-direction: column-reverse flex containers (where we hit this code with info.mIsMainAxisReversed == true), I think this code will be wrong. In that scenario, I'd guess that we might want f to be mFrames.FrameAt(mFrames.GetLength() - aLineNumber) or something like that, assuming we want "line 0" to be the thing at the BStart edge?

I suspect this would need special-handling elsewhere, too; e.g. in the next function, FindLineContaining, we would probably need to account for this as well by subtracting index from the total child count so that the last child is treated as the 0th line. So: might involve a handful of changes throughout this file.

I agree with that and should be easy to test.

Flags: needinfo?(emilio)

Not super-convinced this is useful, tho, because the behavior is rather
unintuitive either way.

Daniel, see comment 1. I think our behavior with the patch might be marginally better, but not too much in practice... Thoughts?

Flags: needinfo?(emilio) → needinfo?(dholbert)

Thanks for the quick fix!

I'd like to spend a little time testing this out to get a feel for it; I probably won't have time for that until I'm back from PTO later this week (Thurs or Fri). Given this is lowish priority and it sounds like not a huge win, I suspect that's fine. :)

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: