Closed Bug 366667 Opened 18 years ago Closed 18 years ago

[FIX]"ASSERTION: Computed overflow area must contain frame bounds" involving -moz-inline-box

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9alpha1

People

(Reporter: jruderman, Assigned: bzbarsky)

References

Details

(Keywords: assertion, testcase)

Attachments

(2 files)

Attached file testcase
Loading the testcase triggers:

###!!! ASSERTION: Computed overflow area must contain frame bounds: 'aNewSize.width == 0 || aNewSize.height == 0 || aOverflowArea->Contains(nsRect(nsPoint(0, 0), aNewSize))', file /Users/admin/trunk/mozilla/layout/generic/nsFrame.cpp, line 5236
(gdb) p aNewSize
$1 = {width = 360, height = -32768}
(gdb) p *aOverflowArea
$3 = {x = 0, y = 0, width = 0, height = 0}
(gdb) p this
$4 = (nsInlineFrame *) 0x8a0ad84

I set a breakpoint in SetRect and SetSize to catch this, and I get:

#0  nsIFrame::SetRect (this=0x8a57d6c, aRect=@0x8779e80)
    at ../../../../../mozilla/layout/generic/nsIFrame.h:657
#1  0xb7195154 in nsLineLayout::VerticalAlignLine (this=0xbfffd360, aLineBox=0x8a57ce0)
    at ../../../mozilla/layout/generic/nsLineLayout.cpp:1498
#2  0xb7137459 in nsBlockFrame::PlaceLine (this=0x8a57740, aState=@0xbfffd920, 
    aLineLayout=@0xbfffd360, aLine={mCurrent = 0x8a57ce0, mListLink = 0x8a57784}, 
    aKeepReflowGoing=0xbfffd6d8) at ../../../mozilla/layout/generic/nsBlockFrame.cpp:3833
#3  0xb7136304 in nsBlockFrame::DoReflowInlineFrames (this=0x8a57740, 
    aState=@0xbfffd920, aLineLayout=@0xbfffd360, aLine=
      {mCurrent = 0x8a57ce0, mListLink = 0x8a57784}, aKeepReflowGoing=0xbfffd6d8, 
    aLineReflowStatus=0xbfffd44c, aAllowPullUp=1)
    at ../../../mozilla/layout/generic/nsBlockFrame.cpp:3393

(gdb) frame 1
#1  0xb7195154 in nsLineLayout::VerticalAlignLine (this=0xbfffd360, aLineBox=0x8a57ce0)
    at ../../../mozilla/layout/generic/nsLineLayout.cpp:1498
1498        pfd->mFrame->SetRect(pfd->mBounds);
(gdb) p pfd->mBounds
$7 = {x = 0, y = 1073741584, width = 360, height = -32768}

This is the frame that contains the nsBoxFrame.

The reason we get the bogus-like numbers is that in nsLineLayout::VerticalAlignFrames we hit this code:

    if (maxY < spanFramePFD->mBounds.height) {
      nscoord adjust = spanFramePFD->mBounds.height - maxY;
      spanFramePFD->mBounds.height -= adjust; // move the bottom up
      spanFramePFD->mDescent -= adjust;
      psd->mBottomLeading += adjust;
    }

here spanFramePFD->mBounds.height is 300, and maxY is -32768 (which is VERTICAL_ALIGN_FRAMES_NO_MAXIMUM).

The problem seems to be this block of code a bit above that:

  if ((minY == VERTICAL_ALIGN_FRAMES_NO_MINIMUM) ||
      (maxY == VERTICAL_ALIGN_FRAMES_NO_MINIMUM)) {
    minY = maxY = baselineY;
  }

I'm guessing that's a typo?
OS: Mac OS X → All
Hardware: Macintosh → All
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Attachment #251194 - Flags: superreview?(dbaron)
Attachment #251194 - Flags: review?(dbaron)
Summary: "ASSERTION: Computed overflow area must contain frame bounds" involving -moz-inline-box → [FIX]"ASSERTION: Computed overflow area must contain frame bounds" involving -moz-inline-box
Target Milestone: --- → mozilla1.9alpha
Comment on attachment 251194 [details] [diff] [review]
This does fix the assert for me...

r+sr=dbaron
Attachment #251194 - Flags: superreview?(dbaron)
Attachment #251194 - Flags: superreview+
Attachment #251194 - Flags: review?(dbaron)
Attachment #251194 - Flags: review+
Fixed.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Blocks: 363176
Blocks: 363388
Crashtest checked in.
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: