Bug 1015781 - part 6, Make nsViewportFrame::SetInitialChildList/AppendFrames/InsertFrames/RemoveFrame DEBUG only. r=roc

This commit is contained in:
Mats Palmgren 2014-05-28 19:36:59 +00:00
Родитель 16e5742424
Коммит 0aa4c77503
2 изменённых файлов: 9 добавлений и 12 удалений

Просмотреть файл

@ -59,13 +59,12 @@ ViewportFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
BuildDisplayListForChild(aBuilder, kid, aDirtyRect, aLists);
}
#ifdef DEBUG
void
ViewportFrame::SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList)
{
#ifdef DEBUG
nsFrame::VerifyDirtyBitSet(aChildList);
#endif
nsContainerFrame::SetInitialChildList(aListID, aChildList);
}
@ -73,10 +72,8 @@ void
ViewportFrame::AppendFrames(ChildListID aListID,
nsFrameList& aFrameList)
{
NS_ASSERTION(aListID == kPrincipalList ||
aListID == GetAbsoluteListID(), "unexpected child list");
NS_ASSERTION(aListID != GetAbsoluteListID() ||
GetChildList(aListID).IsEmpty(), "Shouldn't have any kids!");
NS_ASSERTION(aListID == kPrincipalList, "unexpected child list");
NS_ASSERTION(GetChildList(aListID).IsEmpty(), "Shouldn't have any kids!");
nsContainerFrame::AppendFrames(aListID, aFrameList);
}
@ -85,10 +82,8 @@ ViewportFrame::InsertFrames(ChildListID aListID,
nsIFrame* aPrevFrame,
nsFrameList& aFrameList)
{
NS_ASSERTION(aListID == kPrincipalList ||
aListID == GetAbsoluteListID(), "unexpected child list");
NS_ASSERTION(aListID != GetAbsoluteListID() ||
GetChildList(aListID).IsEmpty(), "Shouldn't have any kids!");
NS_ASSERTION(aListID == kPrincipalList, "unexpected child list");
NS_ASSERTION(GetChildList(aListID).IsEmpty(), "Shouldn't have any kids!");
nsContainerFrame::InsertFrames(aListID, aPrevFrame, aFrameList);
}
@ -96,10 +91,10 @@ void
ViewportFrame::RemoveFrame(ChildListID aListID,
nsIFrame* aOldFrame)
{
NS_ASSERTION(aListID == kPrincipalList ||
aListID == GetAbsoluteListID(), "unexpected child list");
NS_ASSERTION(aListID == kPrincipalList, "unexpected child list");
nsContainerFrame::RemoveFrame(aListID, aOldFrame);
}
#endif
/* virtual */ nscoord
ViewportFrame::GetMinWidth(nsRenderingContext *aRenderingContext)

Просмотреть файл

@ -38,6 +38,7 @@ public:
nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
#ifdef DEBUG
virtual void SetInitialChildList(ChildListID aListID,
nsFrameList& aChildList) MOZ_OVERRIDE;
virtual void AppendFrames(ChildListID aListID,
@ -47,6 +48,7 @@ public:
nsFrameList& aFrameList) MOZ_OVERRIDE;
virtual void RemoveFrame(ChildListID aListID,
nsIFrame* aOldFrame) MOZ_OVERRIDE;
#endif
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,