зеркало из https://github.com/mozilla/gecko-dev.git
[DEBUG only] Don't assert if the child frame is on the correct child overflow list. b=371681 r+sr=roc
This commit is contained in:
Родитель
c064e81ce2
Коммит
7c8d48b603
|
@ -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;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче