Open
Bug 795087
Opened 13 years ago
Updated 3 years ago
"ASSERTION: Bogus availSize.width; should be bigger," with <fieldset style="min-width: 0"> in small flex container
Categories
(Core :: Layout, defect)
Tracking
()
NEW
People
(Reporter: dholbert, Unassigned)
References
Details
(Keywords: assertion)
Attachments
(1 file)
|
619 bytes,
application/xhtml+xml
|
Details |
Attached testcase triggers this assertion-failure, in a debug build with Bug 666041 & bug 783409's patches applied:
{
###!!! ASSERTION: Bogus availSize.width; should be bigger: '!mContentFrame || nsLayoutUtils::IntrinsicForContainer(aReflowState.rendContext, mContentFrame, nsLayoutUtils::MIN_WIDTH) <= availSize.width', file ../../../mozilla/layout/forms/nsFieldSetFrame.cpp, line 426
}
From looking at the code around that assertion, it appears that fieldsets expect their "aReflowState.ComputedWidth()" to be at least as large as their min-content-size, even if their "min-width" property is set to something smaller than that.
Fieldsets enforce this expectation in their "ComputeSize()" impl, but the flexbox algorithm lets us shrink below what ComputeSize() produces, to an intermediate size between the computed width and the computed min-width. And that makes fieldsets unhappy.
Here are two things that make me slightly less worried about this:
(a) We apparently already have the exact same problem already, in fieldset/table interactions -- see bug 402850 and bug 424225.
(b) chrome dev channel (which has flexbox support) agrees with us on the actual rendering of this testcase. (It renders the fieldset smaller than its min-content width -- small enough to fit inside the flex container -- with the text overflowing.)
Possible fixes:
(1) Silence this assertion in some cases, if it doesn't matter. (It doesn't seem to have worried us too much, as we've had some bugs open for 4+ years on existing instances of this assertion, per (a) above)
(2) Add a special-case for fieldsets in the flexbox algorithm, to possibly override the computed value of min-width. That would change the rendering of the attached testcase and make us disagree with chrome dev-channel, FWIW.
(3) ...something else...?
Note also that we _only_ hit this if you explicitly set "min-width" on a fieldset. Otherwise we'll use the default "min-width:auto", which resolves to the min-content width inside of a flex container.
| Reporter | ||
Comment 1•13 years ago
|
||
I still hit this in trunk debug builds, FWIW. (though per parts of comment 0, it's probably not too worrisome)
(In reply to Daniel Holbert [:dholbert] from comment #0)
> Note also that we _only_ hit this if you explicitly set "min-width" on a
> fieldset. Otherwise we'll use the default "min-width:auto", which resolves
> to the min-content width inside of a flex container.
(Bug 848539 is removing "min-width:auto"; after that lands, you won't need to explicitly set "min-width" to trigger this bug)
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•