Closed
Bug 391894
Opened 18 years ago
Closed 18 years ago
"ASSERTION: Out of flow frame doesn't have the expected parent" and more and hang with -moz-column, float, :first-line
Categories
(Core :: Layout, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: jruderman, Assigned: dholbert)
References
Details
(Keywords: assertion, hang, testcase)
Attachments
(3 files)
|
192 bytes,
text/html
|
Details | |
|
1.05 KB,
patch
|
roc
:
review+
roc
:
superreview+
roc
:
approval1.9+
|
Details | Diff | Splinter Review |
|
2.31 KB,
patch
|
Details | Diff | Splinter Review |
Loading the testcase triggers:
###!!! ASSERTION: Out of flow frame doesn't have the expected parent: 'outOfFlowFrame->GetParent() == this', file /Users/jruderman/trunk/mozilla/layout/generic/nsBlockFrame.cpp, line 6404
###!!! ASSERTION: Parent not consistent with exepectations: 'aOldParent == aFrame->GetParent()', file /Users/jruderman/trunk/mozilla/layout/generic/nsBlockFrame.cpp, line 592
###!!! ASSERTION: Creating a circular frame list, this is very bad.: 'this != aNextSibling', file /Users/jruderman/trunk/mozilla/layout/base/../generic/nsIFrame.h, line 800
Variations on the testcase trigger:
###!!! ASSERTION: Float frame has wrong parent: 'floatFrame->GetParent() == mBlock', file /Users/jruderman/trunk/mozilla/layout/generic/nsBlockReflowState.cpp
###!!! ASSERTION: loop in frame list. This will probably hang soon.: 'Error', file /Users/jruderman/trunk/mozilla/layout/generic/nsFrameList.cpp
Flags: blocking1.9?
| Reporter | ||
Comment 1•18 years ago
|
||
A related testcase crashes dereferencing 0xddddde01.
Flags: blocking1.9? → blocking1.9+
| Assignee | ||
Updated•18 years ago
|
OS: Mac OS X → All
| Assignee | ||
Comment 2•18 years ago
|
||
This patch fixes the "Out of flow frame doesn't have the expected parent" assertion and the hang.
The issue was this:
When we're breaking the "Body" frame to make the second column, we call CollectFloats, which recursively looks for placeholders, and then moves their corresponding floats onto the OutOfFlowFrame list. That list is important because it lets these floats follow their placeholders into the the second column. (this list is called "OverflowOutOfFlow-list" in frame dumps)
This process was failing in our testcase, though, because when we call CollectFloats in preparation for making the second column, the Placeholder is in an Overflow-list, as a result of the "first-line" CSS property. This means that CollectFloats misses the placeholder entirely, and so its float doesn't get moved to an OutOfFlowFrame list.
Then we end up with the second column having a placeholder whose float is back in the first column, which is bad.
The actual "Out of flow frame doesn't have the expected parent" assertion was getting hit when we called CollectFloats on a frame in the second column, to prepare for making the third column. At that point, we *do* run across the placeholder in the second column, but its float is back in the first column, and that triggers the assertion.
This patch fixes this whole process by making CollectFloats make recursive calls not just on its children, but also on its overflow-list.
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
| Assignee | ||
Updated•18 years ago
|
Attachment #280783 -
Flags: review?(roc)
| Assignee | ||
Comment 3•18 years ago
|
||
btw: patch v1 passes layout reftests without causing any new assertion-failures
Comment on attachment 280783 [details] [diff] [review]
patch v1 (call CollectFloats on overflowList)
You should add a comment explaining that even though you're calling CollectFloats on aFrame's overflow-list, you're passing down aFromOverflow unchanged because we haven't moved out of this frame's regular-children subtree.
Attachment #280783 -
Flags: superreview+
Attachment #280783 -
Flags: review?(roc)
Attachment #280783 -
Flags: review+
Attachment #280783 -
Flags: approval1.9+
| Assignee | ||
Comment 5•18 years ago
|
||
Added the comment below (and fixed s/aHead/aList in the function comment for CollectFloats)
roc, how's this sound?
> // Note: Even though we're calling CollectFloats on aFrame's overflow
> // list, we'll pass down aFromOverflow unchanged because we're still
> // traversing the normal-child subtree of the 'this' frame.
| Assignee | ||
Comment 6•18 years ago
|
||
oops, meant "regular-children", not normal-child.
New version (will change when I commit):
// Note: Even though we're calling CollectFloats on aFrame's
// overflow-list, we'll pass down aFromOverflow unchanged because we're
// still traversing the regular-children subtree of the 'this' frame.
Yeah, that's great.
| Assignee | ||
Comment 8•18 years ago
|
||
Patch v1a checked in at 1:18
Checking in nsBlockFrame.cpp;
/cvsroot/mozilla/layout/generic/nsBlockFrame.cpp,v <-- nsBlockFrame.cpp
new revision: 3.868; previous revision: 3.867
done
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•