Bug 473390 part 2. Call SetInitialChildList on HTML frames even if the child list is empty, to bring HTML in line with everything else. r+sr=roc

This commit is contained in:
Boris Zbarsky 2009-01-19 13:31:31 -05:00
parent cb7d2b1273
commit c0de154bc2
4 changed files with 19 additions and 16 deletions

View File

@ -5506,9 +5506,7 @@ nsCSSFrameConstructor::ConstructHTMLFrame(nsFrameConstructorState& aState,
childItems, PR_FALSE);
// Set the frame's initial child list
if (childItems.childList) {
newFrame->SetInitialChildList(nsnull, childItems.childList);
}
newFrame->SetInitialChildList(nsnull, childItems.childList);
}
if (!addedToFrameList) {

View File

@ -412,19 +412,6 @@ NS_IMETHODIMP nsFileControlFrame::Reflow(nsPresContext* aPresContext,
aStatus);
}
/*
NS_IMETHODIMP
nsFileControlFrame::SetInitialChildList(nsIAtom* aListName,
nsIFrame* aChildList)
{
nsBlockFrame::SetInitialChildList(aListName, aChildList);
// given that the CSS frame constructor created all our frames. We need to find the text field
// so we can get info from it.
mTextFrame = GetTextControlFrame(this);
}
*/
nsNewFrame*
nsFileControlFrame::GetTextControlFrame(nsPresContext* aPresContext, nsIFrame* aStart)
{

View File

@ -477,6 +477,21 @@ nsHTMLFramesetFrame::Init(nsIContent* aContent,
return rv;
}
NS_IMETHODIMP
nsHTMLFramesetFrame::SetInitialChildList(nsIAtom* aListName,
nsIFrame* aChildList)
{
// We do this weirdness where we create our child frames in Init(). On the
// other hand, we're going to get a SetInitialChildList() with a null list
// and list name after the frame constructor is done creating us. So just
// ignore that call.
if (!aListName && !aChildList) {
return NS_OK;
}
return nsHTMLContainerFrame::SetInitialChildList(aListName, aChildList);
}
// XXX should this try to allocate twips based on an even pixel boundary?
void nsHTMLFramesetFrame::Scale(nscoord aDesired,
PRInt32 aNumIndicies,

View File

@ -116,6 +116,9 @@ public:
nsIFrame* aParent,
nsIFrame* aPrevInFlow);
NS_IMETHOD SetInitialChildList(nsIAtom* aListName,
nsIFrame* aChildList);
static PRBool gDragInProgress;
void GetSizeOfChild(nsIFrame* aChild, nsSize& aSize);