Closed Bug 798666 Opened 7 years ago Closed 7 years ago

flexbox doesn't honor min-height on horizontal auto-height flex container

Categories

(Core :: Layout, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla19

People

(Reporter: dholbert, Assigned: dholbert)

References

Details

Attachments

(2 files, 1 obsolete file)

Attached file testcase
STR: enable flexbox pref (layout.css.flexbox.enabled), and load testcase

EXPECTED RESULTS: green area should be 800px tall
ACTUAL RESULTS: green area is only 1 line tall
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Attached patch fix v1 (obsolete) — Splinter Review
Still need to add a reftest, but here's the fix.
Added reftests.

Note that I've already got reftests to address "min-height/max-height" in _vertical_ auto-height flex containers.  The reftests here are for _horizontal_ auto-height flex containers, with min-height / max-height constraints.

(plus a reftest for a vertical auto-width flex container, with min-width/max-width, for symmetry)


So -- the idea behind the code-change is:
 (a) if cross-size is unconstrained, we shrinkwrap our flex line's cross-size, **but** we must respect min/max sizing constraints.

 (b) If those min/max constraints end up affecting our cross-size, we need to update our line's cross-size. (so that positioning / stretch-sizing within the line will be working with the correct cross-size)  (That's why I changed the conditions under which we call lineCrossAxisPosnTracker.SetLineCrossSize().)
Attachment #668697 - Attachment is obsolete: true
Attachment #668743 - Flags: review?(dbaron)
Comment on attachment 668743 [details] [diff] [review]
fix v1a (now w/ reftests)

r=dbaron
Attachment #668743 - Flags: review?(dbaron) → review+
Unprefixed testcase (per bug 801098), and pushed:
https://hg.mozilla.org/integration/mozilla-inbound/rev/a70b58fcf059
Flags: in-testsuite+
https://hg.mozilla.org/mozilla-central/rev/a70b58fcf059
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
You need to log in before you can comment on or make changes to this bug.