mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Bug 1015781 - part 4, Make nsColumnSetFrame::SetInitialChildList/AppendFrames/InsertFrames/RemoveFrame DEBUG only and assert that the latter three are not called. r=roc
This commit is contained in:
parent
6ae2bb8863
commit
b6577db002
@ -120,24 +120,6 @@ nsColumnSetFrame::PaintColumnRule(nsRenderingContext* aCtx,
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
nsColumnSetFrame::SetInitialChildList(ChildListID aListID,
|
||||
nsFrameList& aChildList)
|
||||
{
|
||||
if (aListID == kAbsoluteList) {
|
||||
// XXX uhm, but nsContainerFrame can't handle kAbsoluteList
|
||||
nsContainerFrame::SetInitialChildList(aListID, aChildList);
|
||||
return;
|
||||
}
|
||||
|
||||
NS_ASSERTION(aListID == kPrincipalList,
|
||||
"Only default child list supported");
|
||||
NS_ASSERTION(aChildList.OnlyChild(),
|
||||
"initial child list must have exaisRevertingctly one child");
|
||||
// Queue up the frames for the content frame
|
||||
nsContainerFrame::SetInitialChildList(kPrincipalList, aChildList);
|
||||
}
|
||||
|
||||
static nscoord
|
||||
GetAvailableContentWidth(const nsHTMLReflowState& aReflowState)
|
||||
{
|
||||
@ -1041,15 +1023,22 @@ nsColumnSetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
}
|
||||
}
|
||||
|
||||
// XXX The methods below are all dead code? (nsContainerFrame only deals with
|
||||
// kPrincipalList and kNoReflowPrincipalList)
|
||||
#ifdef DEBUG
|
||||
void
|
||||
nsColumnSetFrame::SetInitialChildList(ChildListID aListID,
|
||||
nsFrameList& aChildList)
|
||||
{
|
||||
MOZ_ASSERT(aListID == kPrincipalList, "unexpected child list");
|
||||
MOZ_ASSERT(aChildList.OnlyChild(),
|
||||
"initial child list must have exactly one child");
|
||||
nsContainerFrame::SetInitialChildList(kPrincipalList, aChildList);
|
||||
}
|
||||
|
||||
void
|
||||
nsColumnSetFrame::AppendFrames(ChildListID aListID,
|
||||
nsFrameList& aFrameList)
|
||||
{
|
||||
MOZ_ASSERT(aListID == kAbsoluteList, "unexpected child list");
|
||||
nsContainerFrame::AppendFrames(aListID, aFrameList);
|
||||
MOZ_CRASH("unsupported operation");
|
||||
}
|
||||
|
||||
void
|
||||
@ -1057,14 +1046,13 @@ nsColumnSetFrame::InsertFrames(ChildListID aListID,
|
||||
nsIFrame* aPrevFrame,
|
||||
nsFrameList& aFrameList)
|
||||
{
|
||||
MOZ_ASSERT(aListID == kAbsoluteList, "unexpected child list");
|
||||
nsContainerFrame::InsertFrames(aListID, aPrevFrame, aFrameList);
|
||||
MOZ_CRASH("unsupported operation");
|
||||
}
|
||||
|
||||
void
|
||||
nsColumnSetFrame::RemoveFrame(ChildListID aListID,
|
||||
nsIFrame* aOldFrame)
|
||||
{
|
||||
MOZ_ASSERT(aListID == kAbsoluteList, "unexpected child list");
|
||||
nsContainerFrame::RemoveFrame(aListID, aOldFrame);
|
||||
MOZ_CRASH("unsupported operation");
|
||||
}
|
||||
#endif
|
||||
|
@ -19,6 +19,7 @@ public:
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
|
||||
#ifdef DEBUG
|
||||
virtual void SetInitialChildList(ChildListID aListID,
|
||||
nsFrameList& aChildList) MOZ_OVERRIDE;
|
||||
virtual void AppendFrames(ChildListID aListID,
|
||||
@ -28,6 +29,7 @@ public:
|
||||
nsFrameList& aFrameList) MOZ_OVERRIDE;
|
||||
virtual void RemoveFrame(ChildListID aListID,
|
||||
nsIFrame* aOldFrame) MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
||||
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
|
||||
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext) MOZ_OVERRIDE;
|
||||
|
Loading…
Reference in New Issue
Block a user