Closed Bug 439204 Opened 16 years ago Closed 11 years ago

"ASSERTION: We placed a float where there was no room!" with text-indent, width

Categories

(Core :: Layout: Floats, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla30

People

(Reporter: jruderman, Assigned: dbaron)

References

Details

(Keywords: assertion, regression, testcase)

Attachments

(2 files)

Attached file testcase (deleted) —
Re bug 50630 comment 51:

> > +    NS_ASSERTION(psd->mRightEdge >= psd->mLeftEdge,
> > +                 "We placed a float where there was no room!");
> > 
> > Are you sure you can't hit this with negative margins?
> 
> We don't hit it in reftests.

Famous last words.  This testcase hits it:

###!!! ASSERTION: We placed a float where there was no room!: 'psd->mX <= psd->mRightEdge', file /Users/jruderman/central/mozilla/layout/generic/nsLineLayout.cpp, line 344
Ah.

We should probably just take the assertion out, since in retrospect it's bound to fire when the float is the first thing on the line and the float is wider than the available width.
roc changed the assertion condition in bug 441259.  The testcase in this bug still hits the modified assertion:

###!!! ASSERTION: We placed a float where there was no room!: 'psd->mX - mTrimmableWidth <= psd->mRightEdge', file /Users/jruderman/central/mozilla/layout/generic/nsLineLayout.cpp, line 345
Something has changed recently; nowadays running mochitest triggers this a lot.
(In reply to comment #3)
> Something has changed recently; nowadays running mochitest triggers this a lot.
Just browsing to planet.mozilla.org triggers this assertion twice for me.
The new nsFloatManager is the most likely suspect...
(In reply to comment #3)
> Something has changed recently; nowadays running mochitest triggers this a lot.

That should be filed as a bug separate from this one if it still exists after the landing of bug 472252.
The testcase in bug 435664 also triggers it; current trunk on Linux.
OS: Mac OS X → All
I filed the separate bug as bug 476372.
(In reply to comment #7)
> The testcase in bug 435664 also triggers it; current trunk on Linux.

Those assertions were prior to the float manager landing, so thus are not covered by bug 476372.
Hopefully this isn't just noise but dromaeo triggers this a lot too.
379217-2.xhtml hits this assertion too.
This is really annoying in debug builds and makes debugging with fatal asserts borderline impossible. If this can't be fixed, we should switch the assert off and convert it to a silent FIXME with a bug #.

###!!! ASSERTION: We placed a float where there was no room!: 'psd->mX - mTrimmableWidth <= psd->mRightEdge', file ../../../layout/generic/nsLineLayout.cpp, line 345
###!!! ASSERTION: We placed a float where there was no room!: 'psd->mX - mTrimmableWidth <= psd->mRightEdge', file ../../../layout/generic/nsLineLayout.cpp, line 345
Hardware: x86 → All
Assignee: nobody → dbaron
Status: NEW → ASSIGNED
https://hg.mozilla.org/mozilla-central/rev/5ddb2542c961
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: