Bug 473390 part 10. Move various XUL nsIBoxLayout stuff out of the frame constructor into frame creation functions, and make the XUL frame creation functions have the right signature to fit into the new world. r+sr=roc

This commit is contained in:
Boris Zbarsky
2009-01-19 13:31:33 -05:00
parent 0533e4252b
commit 1b29d18b8a
22 changed files with 133 additions and 144 deletions

View File

@@ -153,21 +153,32 @@ private:
};
//
// NS_NewMenuFrame
// NS_NewMenuFrame and NS_NewMenuItemFrame
//
// Wrapper for creating a new menu popup container
// Wrappers for creating a new menu popup container
//
nsIFrame*
NS_NewMenuFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, PRUint32 aFlags)
NS_NewMenuFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
{
nsMenuFrame* it = new (aPresShell) nsMenuFrame (aPresShell, aContext);
if ((it != nsnull) && aFlags)
if (it)
it->SetIsMenu(PR_TRUE);
return it;
}
nsIFrame*
NS_NewMenuItemFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
{
nsMenuFrame* it = new (aPresShell) nsMenuFrame (aPresShell, aContext);
if (it)
it->SetIsMenu(PR_FALSE);
return it;
}
NS_QUERYFRAME_HEAD(nsMenuFrame)
NS_QUERYFRAME_ENTRY(nsIMenuFrame)
NS_QUERYFRAME_ENTRY(nsIScrollableViewProvider)