PDT+ bug 28341 - Destroy caption frame when outer table frame is destroyed. Add caption to outer frame rather than inner frame. r=troy, a=rickg

This commit is contained in:
karnaze@netscape.com
2000-03-02 06:09:37 +00:00
parent e5f6b3e10d
commit 9c252d135d
9 changed files with 107 additions and 26 deletions

View File

@@ -37,6 +37,8 @@
#include "nsHTMLParts.h"
#include "nsIPresShell.h"
/* ----------- nsTableCaptionFrame ---------- */
#define NS_TABLE_FRAME_CAPTION_LIST_INDEX 0
// caption frame
@@ -46,6 +48,20 @@ nsTableCaptionFrame::nsTableCaptionFrame()
SetFlags(NS_BLOCK_SPACE_MGR|NS_BLOCK_WRAP_SIZE);
}
nsTableCaptionFrame::~nsTableCaptionFrame()
{
}
NS_IMETHODIMP
nsTableOuterFrame::Destroy(nsIPresContext* aPresContext)
{
if (mCaptionFrame) {
mCaptionFrame->Destroy(aPresContext);
}
return nsHTMLContainerFrame::Destroy(aPresContext);
}
NS_IMETHODIMP
nsTableCaptionFrame::GetFrameType(nsIAtom** aType) const
{
@@ -117,13 +133,19 @@ struct OuterTableReflowState {
}
};
/* ----------- nsTableOuterFrame ---------- */
NS_IMPL_ADDREF_INHERITED(nsTableOuterFrame, nsHTMLContainerFrame)
NS_IMPL_RELEASE_INHERITED(nsTableOuterFrame, nsHTMLContainerFrame)
nsTableOuterFrame::nsTableOuterFrame()
{
}
nsTableOuterFrame::~nsTableOuterFrame()
{
}
nsresult nsTableOuterFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr)
{
if (NULL == aInstancePtr) {