From e06f33e5d3268b26c3df9df2f18abdb1f71e4393 Mon Sep 17 00:00:00 2001 From: "troy%netscape.com" Date: Sat, 12 Sep 1998 23:53:28 +0000 Subject: [PATCH] Changed Reflow() to directly create the child frames rather than use CreateFrame() member function which is going away --- layout/html/forms/src/nsInputFile.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/layout/html/forms/src/nsInputFile.cpp b/layout/html/forms/src/nsInputFile.cpp index bc1711d1deab..ff5c287e2276 100644 --- a/layout/html/forms/src/nsInputFile.cpp +++ b/layout/html/forms/src/nsInputFile.cpp @@ -32,6 +32,7 @@ #include "nsWidgetsCID.h" #include "nsRepository.h" #include "nsIView.h" +#include "nsHTMLParts.h" PRInt32 nsInputFileFrame::gSpacing = 40; nsString* nsInputFile::gFILE_TYPE = new nsString("file"); @@ -130,12 +131,16 @@ NS_IMETHODIMP nsInputFileFrame::Reflow(nsIPresContext& aPresContext, nsIFrame* childFrame; if (0 == numChildren) { + // XXX This code should move to Init(), someday when the frame construction + // changes are all done and Init() is always getting called... nsInputText* textField = content->GetTextField(); nsInput* browseButton = content->GetBrowseButton(); if ((nsnull != textField) && (nsnull != browseButton)) { - textField->CreateFrame(&aPresContext, this, mStyleContext, childFrame); + NS_NewInputTextFrame(textField, this, childFrame); + childFrame->SetStyleContext(&aPresContext, mStyleContext); mFirstChild = childFrame; - browseButton->CreateFrame(&aPresContext, this, mStyleContext, childFrame); + NS_NewInputButtonFrame(browseButton, this, childFrame); + childFrame->SetStyleContext(&aPresContext, mStyleContext); mFirstChild->SetNextSibling(childFrame); mChildCount = 2; }