Frame construction changes for tables

git-svn-id: svn://10.0.0.236/trunk@10159 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
troy%netscape.com
1998-09-16 17:19:20 +00:00
parent f66f963cdc
commit 8b2676b6e1
29 changed files with 1483 additions and 371 deletions

View File

@@ -73,6 +73,29 @@ nsTableCellFrame::~nsTableCellFrame()
{
}
NS_IMETHODIMP
nsTableCellFrame::Init(nsIPresContext& aPresContext, nsIFrame* aChildList)
{
// Create body pseudo frame
NS_NewBodyFrame(mContent, this, mFirstChild);
mChildCount = 1;
// Resolve style and set the style context
nsIStyleContext* styleContext =
aPresContext.ResolveStyleContextFor(mContent, this); // styleContext: ADDREF++
mFirstChild->SetStyleContext(&aPresContext, styleContext);
NS_RELEASE(styleContext); // styleContext: ADDREF--
// Set the geometric and content parent for each of the child frames
for (nsIFrame* frame = aChildList; nsnull != frame; frame->GetNextSibling(frame)) {
frame->SetGeometricParent(mFirstChild);
frame->SetContentParent(mFirstChild);
}
// Queue up the frames for the block frame
return mFirstChild->Init(aPresContext, aChildList);
}
NS_METHOD nsTableCellFrame::Paint(nsIPresContext& aPresContext,
nsIRenderingContext& aRenderingContext,
const nsRect& aDirtyRect)