Bug 1015781 - part 8, Make nsTableCellFrame::AppendFrames/InsertFrames/RemoveFrame DEBUG only. r=roc

This commit is contained in:
Mats Palmgren 2014-05-28 19:36:59 +00:00
parent b4c312216c
commit 7fb0cc9b2e
2 changed files with 9 additions and 7 deletions

View File

@ -240,12 +240,12 @@ nsTableCellFrame::DidSetStyleContext(nsStyleContext* aOldStyleContext)
} }
} }
#ifdef DEBUG
void void
nsTableCellFrame::AppendFrames(ChildListID aListID, nsTableCellFrame::AppendFrames(ChildListID aListID,
nsFrameList& aFrameList) nsFrameList& aFrameList)
{ {
NS_PRECONDITION(false, "unsupported operation"); MOZ_CRASH("unsupported operation");
} }
void void
@ -253,15 +253,16 @@ nsTableCellFrame::InsertFrames(ChildListID aListID,
nsIFrame* aPrevFrame, nsIFrame* aPrevFrame,
nsFrameList& aFrameList) nsFrameList& aFrameList)
{ {
NS_PRECONDITION(false, "unsupported operation"); MOZ_CRASH("unsupported operation");
} }
void void
nsTableCellFrame::RemoveFrame(ChildListID aListID, nsTableCellFrame::RemoveFrame(ChildListID aListID,
nsIFrame* aOldFrame) nsIFrame* aOldFrame)
{ {
NS_PRECONDITION(false, "unsupported operation"); MOZ_CRASH("unsupported operation");
} }
#endif
void nsTableCellFrame::SetColIndex(int32_t aColIndex) void nsTableCellFrame::SetColIndex(int32_t aColIndex)
{ {

View File

@ -60,9 +60,9 @@ public:
/** @see nsIFrame::DidSetStyleContext */ /** @see nsIFrame::DidSetStyleContext */
virtual void DidSetStyleContext(nsStyleContext* aOldStyleContext) MOZ_OVERRIDE; virtual void DidSetStyleContext(nsStyleContext* aOldStyleContext) MOZ_OVERRIDE;
// table cells contain a block frame which does most of the work, and #ifdef DEBUG
// so these functions should never be called. They assert and return // Our anonymous block frame is the content insertion frame so these
// NS_ERROR_NOT_IMPLEMENTED // methods should never be called:
virtual void AppendFrames(ChildListID aListID, virtual void AppendFrames(ChildListID aListID,
nsFrameList& aFrameList) MOZ_OVERRIDE; nsFrameList& aFrameList) MOZ_OVERRIDE;
virtual void InsertFrames(ChildListID aListID, virtual void InsertFrames(ChildListID aListID,
@ -70,6 +70,7 @@ public:
nsFrameList& aFrameList) MOZ_OVERRIDE; nsFrameList& aFrameList) MOZ_OVERRIDE;
virtual void RemoveFrame(ChildListID aListID, virtual void RemoveFrame(ChildListID aListID,
nsIFrame* aOldFrame) MOZ_OVERRIDE; nsIFrame* aOldFrame) MOZ_OVERRIDE;
#endif
virtual nsContainerFrame* GetContentInsertionFrame() MOZ_OVERRIDE { virtual nsContainerFrame* GetContentInsertionFrame() MOZ_OVERRIDE {
return GetFirstPrincipalChild()->GetContentInsertionFrame(); return GetFirstPrincipalChild()->GetContentInsertionFrame();