mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 21:05:36 +00:00
Changed Reflow() to directly create the child frames rather than use
CreateFrame() member function which is going away
This commit is contained in:
parent
17fd2c695e
commit
e06f33e5d3
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user