Moved logic that created a BODY frame that forms the cell's content from the

table frame code to the frame construction code
This commit is contained in:
troy@netscape.com
1998-12-04 02:08:51 +00:00
parent 0d5a595ba3
commit a1854c5e92
7 changed files with 171 additions and 70 deletions

View File

@@ -48,31 +48,6 @@ static const PRBool gsDebug = PR_FALSE;
static const PRBool gsDebugNT = PR_FALSE;
#endif
NS_IMETHODIMP
nsTableCellFrame::SetInitialChildList(nsIPresContext& aPresContext,
nsIAtom* aListName,
nsIFrame* aChildList)
{
// Create body pseudo frame
NS_NewBodyFrame(mFirstChild, NS_BODY_NO_AUTO_MARGINS);
// Resolve style and set the style context
nsIStyleContext* styleContext =
aPresContext.ResolvePseudoStyleContextFor(mContent, nsHTMLAtoms::cellContentPseudo, mStyleContext); // styleContext: ADDREF++
mFirstChild->Init(aPresContext, mContent, this, 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->SetInitialChildList(aPresContext, nsnull, aChildList);
}
NS_METHOD nsTableCellFrame::Paint(nsIPresContext& aPresContext,
nsIRenderingContext& aRenderingContext,
const nsRect& aDirtyRect)