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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user