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:
@@ -60,18 +60,9 @@ NS_IMPL_RELEASE_INHERITED(nsMathMLForeignFrameWrapper, nsMathMLFrame)
|
||||
NS_IMPL_QUERY_INTERFACE_INHERITED1(nsMathMLForeignFrameWrapper, nsBlockFrame, nsMathMLFrame)
|
||||
|
||||
nsIFrame*
|
||||
NS_NewMathMLForeignFrameWrapper(nsIPresShell* aPresShell)
|
||||
NS_NewMathMLForeignFrameWrapper(nsIPresShell* aPresShell, nsStyleContext* aContext)
|
||||
{
|
||||
return new (aPresShell) nsMathMLForeignFrameWrapper;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsMathMLForeignFrameWrapper::Init(nsIContent* aContent,
|
||||
nsIFrame* aParent,
|
||||
nsStyleContext* aContext,
|
||||
nsIFrame* aPrevInFlow)
|
||||
{
|
||||
return nsBlockFrame::Init(aContent, aParent, aContext, aPrevInFlow);
|
||||
return new (aPresShell) nsMathMLForeignFrameWrapper(aContext);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
||||
Reference in New Issue
Block a user