Reworked frame factory methods; fixed bug 4519

This commit is contained in:
kipp@netscape.com
1999-05-11 22:03:29 +00:00
parent bba83ee6e2
commit 68aa9f7c60
142 changed files with 1298 additions and 809 deletions

View File

@@ -56,12 +56,17 @@ static NS_DEFINE_IID(kViewCID, NS_VIEW_CID);
static NS_DEFINE_IID(kIViewIID, NS_IVIEW_IID);
nsresult
NS_NewHTMLButtonControlFrame(nsIFrame*& aResult)
NS_NewHTMLButtonControlFrame(nsIFrame** aNewFrame)
{
aResult = new nsHTMLButtonControlFrame;
if (nsnull == aResult) {
NS_PRECONDITION(aNewFrame, "null OUT ptr");
if (nsnull == aNewFrame) {
return NS_ERROR_NULL_POINTER;
}
nsHTMLButtonControlFrame* it = new nsHTMLButtonControlFrame;
if (!it) {
return NS_ERROR_OUT_OF_MEMORY;
}
*aNewFrame = it;
return NS_OK;
}
@@ -356,7 +361,7 @@ nsHTMLButtonControlFrame::SetInitialChildList(nsIPresContext& aPresContext,
PRUint8 flags = (mInline) ? NS_BLOCK_SHRINK_WRAP : 0;
nsIFrame* areaFrame;
NS_NewAreaFrame(areaFrame, flags);
NS_NewAreaFrame(&areaFrame, flags);
mFrames.SetFrames(areaFrame);
// Resolve style and initialize the frame