Assertion failure: "Computed width should always be constrained, so horizontal flex containers should always have a constrained main-size"

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
x86_64
macOS
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

Reporter

Description

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

Assertion failure: !IsAxisHorizontal(aAxisTracker.GetMainAxis()) (Computed width should always be constrained, so horizontal flex containers should always have a constrained main-size), at layout/generic/nsFlexContainerFrame.cpp:1794
Reporter

Comment 1

7 years ago
Posted file stack
Assignee

Comment 2

7 years ago
Comment on attachment 668142 [details]
testcase (asserts fatally when loaded)

><body style="letter-spacing: 693626589697em;">

Oh, Jesse. :)

So this looks like a case where our actual computed width is large enough to overflow NS_UNCONSTRAINEDSIZE, so it looks like we've got an unconstrained computed-width, and we're not expecting that.

We should probably just change this to a NS_WARNING instead of a MOZ_ASSERT, since web content can trigger this (with ridiculously huge values) and it's not a problem, it'll just give incorrect layout. (we'll shrinkwrap instead of honoring the gigantic height)
Reporter

Comment 3

7 years ago
Sounds reasonable.  If we ever do bug 765861, we can turn it into a conditional assert.
Assignee

Comment 4

7 years ago
Posted patch fixSplinter Review
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Attachment #668826 - Flags: review?(dbaron)
Comment on attachment 668826 [details] [diff] [review]
fix

r=dbaron
Attachment #668826 - Flags: review?(dbaron) → review+
Assignee

Comment 7

7 years ago
(unprefixed testcase code before pushing, per bug 801098)

Comment 8

7 years ago
https://hg.mozilla.org/mozilla-central/rev/e03f63abb826
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.