[DEBUG only] Don't assert if the child frame is on the correct child overflow list. b=371681 r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@221070 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1747,9 +1747,25 @@ GetChildListNameFor(nsIFrame* aChildFrame)
|
||||
listName = nsnull;
|
||||
}
|
||||
|
||||
// Verify that the frame is actually in that child list
|
||||
NS_POSTCONDITION(nsFrameList(aChildFrame->GetParent()->GetFirstChild(listName))
|
||||
.ContainsFrame(aChildFrame), "not in child list");
|
||||
#ifdef NS_DEBUG
|
||||
// Verify that the frame is actually in that child list or in the
|
||||
// corresponding overflow list.
|
||||
nsIFrame* parent = aChildFrame->GetParent();
|
||||
PRBool found = nsFrameList(parent->GetFirstChild(listName))
|
||||
.ContainsFrame(aChildFrame);
|
||||
if (!found) {
|
||||
if (!(aChildFrame->GetStateBits() & NS_FRAME_OUT_OF_FLOW)) {
|
||||
found = nsFrameList(parent->GetFirstChild(nsGkAtoms::overflowList))
|
||||
.ContainsFrame(aChildFrame);
|
||||
}
|
||||
else if (aChildFrame->GetStyleDisplay()->IsFloating()) {
|
||||
found = nsFrameList(parent->GetFirstChild(nsGkAtoms::overflowOutOfFlowList))
|
||||
.ContainsFrame(aChildFrame);
|
||||
}
|
||||
// else it's positioned and should have been on the 'listName' child list.
|
||||
NS_POSTCONDITION(found, "not in child list");
|
||||
}
|
||||
#endif
|
||||
|
||||
return listName;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user