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:
@@ -748,13 +748,12 @@ nsMathMLContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
NS_IMETHODIMP
|
||||
nsMathMLContainerFrame::Init(nsIContent* aContent,
|
||||
nsIFrame* aParent,
|
||||
nsStyleContext* aContext,
|
||||
nsIFrame* aPrevInFlow)
|
||||
{
|
||||
MapAttributesIntoCSS(aContext->GetRuleNode()->GetPresContext(), aContent);
|
||||
MapAttributesIntoCSS(GetPresContext(), aContent);
|
||||
|
||||
// let the base class do its Init()
|
||||
return nsHTMLContainerFrame::Init(aContent, aParent, aContext, aPrevInFlow);
|
||||
return nsHTMLContainerFrame::Init(aContent, aParent, aPrevInFlow);
|
||||
|
||||
// ...We will build our automatic MathML data once the entire <math>...</math>
|
||||
// tree is constructed.
|
||||
@@ -1500,15 +1499,15 @@ nsMathMLContainerFrame::FixInterFrameSpacing(nsHTMLReflowMetrics& aDesiredSize)
|
||||
//==========================
|
||||
|
||||
nsIFrame*
|
||||
NS_NewMathMLmathBlockFrame(nsIPresShell* aPresShell)
|
||||
NS_NewMathMLmathBlockFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
|
||||
{
|
||||
return new (aPresShell) nsMathMLmathBlockFrame;
|
||||
return new (aPresShell) nsMathMLmathBlockFrame(aContext);
|
||||
}
|
||||
|
||||
//==========================
|
||||
|
||||
nsIFrame*
|
||||
NS_NewMathMLmathInlineFrame(nsIPresShell* aPresShell)
|
||||
NS_NewMathMLmathInlineFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
|
||||
{
|
||||
return new (aPresShell) nsMathMLmathInlineFrame;
|
||||
return new (aPresShell) nsMathMLmathInlineFrame(aContext);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user