Closed Bug 798235 Opened 13 years ago Closed 13 years ago

"Assertion failure: aCoord.IsCoordPercentCalcUnit()" with flexbox

Categories

(Core :: Layout, defect)

defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla19

People

(Reporter: jruderman, Assigned: dholbert)

References

Details

(Keywords: assertion, testcase)

Attachments

(3 files)

With user_pref("layout.css.flexbox.enabled", true); the testcase triggers: Assertion failure: aCoord.IsCoordPercentCalcUnit(), at layout/base/nsLayoutUtils.h:944
Attached file stack
So this is from a case where we're using "flex-basis" in place of "height" (in a vertical flexbox), and "flex-basis" happens to be set to a special keyword -- -moz-max-content -- which is supported for "width" but not for "height". I think it makes the most sense to treat these special keywords as if they were "auto", which (for flex-basis in a vertical flexbox) means "just use the value of the 'height' property"
Assignee: nobody → dholbert
OS: Mac OS X → All
Hardware: x86_64 → All
Attached patch fixSplinter Review
Here's the fix. NOTE: After this patch, the code has this structure: if (horizontal) { // use flex basis for width } else { // comments if (not enum) { // use flex basis for height } } That "else { ... if() {" could be collapsed to "else if () {, but I think I like it better with the "if" separated because the if-check is really just to filter out a special-case, and we're ultimately expecting to remove that check. Happy to collapse it if you prefer, though.
Attachment #668963 - Flags: review?(dbaron)
Depends on: css3-flexbox
Flags: in-testsuite+
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: