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:
roc+%cs.cmu.edu
2006-03-26 21:30:36 +00:00
parent cbf12a16e3
commit 140fbb3377
228 changed files with 1576 additions and 1768 deletions

View File

@@ -56,9 +56,9 @@
#undef NOISY_FINAL_SIZE
nsIFrame*
NS_NewAreaFrame(nsIPresShell* aPresShell, PRUint32 aFlags)
NS_NewAreaFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, PRUint32 aFlags)
{
nsAreaFrame* it = new (aPresShell) nsAreaFrame;
nsAreaFrame* it = new (aPresShell) nsAreaFrame(aContext);
if (it != nsnull)
it->SetFlags(aFlags);
@@ -66,10 +66,6 @@ NS_NewAreaFrame(nsIPresShell* aPresShell, PRUint32 aFlags)
return it;
}
nsAreaFrame::nsAreaFrame()
{
}
#ifdef MOZ_XUL
// If you make changes to this function, check its counterparts
@@ -122,13 +118,9 @@ nsAreaFrame::RegUnregAccessKey(nsPresContext* aPresContext,
NS_IMETHODIMP
nsAreaFrame::Init(nsIContent* aContent,
nsIFrame* aParent,
nsStyleContext* aContext,
nsIFrame* aPrevInFlow)
{
nsresult rv = nsBlockFrame::Init(aContent,
aParent,
aContext,
aPrevInFlow);
nsresult rv = nsBlockFrame::Init(aContent, aParent, aPrevInFlow);
if (NS_FAILED(rv))
return rv;