Make fieldset splitting work so fieldsets taller than a page print. Bug

234015, r+sr=dbaron
This commit is contained in:
bzbarsky@mit.edu
2004-02-19 22:00:52 +00:00
parent 41ff8217bb
commit 2fbe82e37f
2 changed files with 38 additions and 0 deletions

View File

@@ -10753,6 +10753,25 @@ nsCSSFrameConstructor::CreateContinuingFrame(nsIPresContext* aPresContext,
if (!newFrame)
return NS_ERROR_NULL_POINTER;
newFrame->Init(aPresContext, content, aParentFrame, styleContext, aFrame);
} else if (nsLayoutAtoms::fieldSetFrame == frameType) {
rv = NS_NewFieldSetFrame(aPresContext->PresShell(), &newFrame,
NS_BLOCK_SPACE_MGR);
if (NS_SUCCEEDED(rv)) {
newFrame->Init(aPresContext, content, aParentFrame, styleContext,
aFrame);
// XXXbz should we be passing in a non-null aContentParentFrame?
nsHTMLContainerFrame::CreateViewForFrame(newFrame, nsnull, PR_FALSE);
// Create a continuing area frame
// XXXbz we really shouldn't have to do this by hand!
nsIFrame* continuingAreaFrame;
nsIFrame* areaFrame = aFrame->GetFirstChild(nsnull);
CreateContinuingFrame(aPresContext, areaFrame, newFrame, &continuingAreaFrame);
// Set the fieldset's initial child list
newFrame->SetInitialChildList(aPresContext, nsnull, continuingAreaFrame);
}
} else {
NS_ASSERTION(PR_FALSE, "unexpected frame type");
rv = NS_ERROR_UNEXPECTED;