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

RESOLVED FIXED in mozilla19

Status

()

defect
--
critical
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: jruderman, Assigned: dholbert)

Tracking

(Blocks 1 bug, {assertion, testcase})

Trunk
mozilla19
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

With
  user_pref("layout.css.flexbox.enabled", true);
the testcase triggers:

Assertion failure: aCoord.IsCoordPercentCalcUnit(), at layout/base/nsLayoutUtils.h:944
Posted 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
Posted 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
Comment on attachment 668963 [details] [diff] [review]
fix

r=dbaron
Attachment #668963 - Flags: review?(dbaron) → review+
Unprefixed testcase (per bug 801098), and pushed:
https://hg.mozilla.org/integration/mozilla-inbound/rev/5c67076a5a05
Flags: in-testsuite+
https://hg.mozilla.org/mozilla-central/rev/5c67076a5a05
Status: NEW → 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.