Bug 330934. Set a nsIFrame's stylecontext in its constructor, to ensure that there's always one available for GetPresContext() to use even if Init hasn't been called. Patch by Marc Liddell, r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@193022 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -83,12 +83,13 @@
|
||||
static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);
|
||||
|
||||
nsIFrame*
|
||||
NS_NewIsIndexFrame(nsIPresShell* aPresShell)
|
||||
NS_NewIsIndexFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
|
||||
{
|
||||
return new (aPresShell) nsIsIndexFrame();
|
||||
return new (aPresShell) nsIsIndexFrame(aContext);
|
||||
}
|
||||
|
||||
nsIsIndexFrame::nsIsIndexFrame()
|
||||
nsIsIndexFrame::nsIsIndexFrame(nsStyleContext* aContext) :
|
||||
nsAreaFrame(aContext)
|
||||
{
|
||||
//Shrink the area around its contents
|
||||
SetFlags(NS_BLOCK_SHRINK_WRAP | NS_BLOCK_SPACE_MGR);
|
||||
|
||||
Reference in New Issue
Block a user