mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-06 12:43:53 +00:00
Bug 416907 - Crash [@ nsHTMLFramesetFrame::Reflow] with frameset in mroot; r+sr=roc
This commit is contained in:
parent
eca46b0128
commit
245dc2f25a
@ -162,6 +162,7 @@ protected:
|
||||
nsHTMLFramesetBorderFrame(nsStyleContext* aContext, PRInt32 aWidth, PRBool aVertical, PRBool aVisible);
|
||||
virtual ~nsHTMLFramesetBorderFrame();
|
||||
virtual nscoord GetIntrinsicWidth();
|
||||
virtual nscoord GetIntrinsicHeight();
|
||||
|
||||
PRInt32 mWidth;
|
||||
PRPackedBool mVertical;
|
||||
@ -198,6 +199,7 @@ protected:
|
||||
nsHTMLFramesetBlankFrame(nsStyleContext* aContext) : nsLeafFrame(aContext) {}
|
||||
virtual ~nsHTMLFramesetBlankFrame();
|
||||
virtual nscoord GetIntrinsicWidth();
|
||||
virtual nscoord GetIntrinsicHeight();
|
||||
|
||||
friend class nsHTMLFramesetFrame;
|
||||
friend class nsHTMLFrameset;
|
||||
@ -1628,6 +1630,12 @@ nscoord nsHTMLFramesetBorderFrame::GetIntrinsicWidth()
|
||||
return 0;
|
||||
}
|
||||
|
||||
nscoord nsHTMLFramesetBorderFrame::GetIntrinsicHeight()
|
||||
{
|
||||
// No intrinsic height
|
||||
return 0;
|
||||
}
|
||||
|
||||
void nsHTMLFramesetBorderFrame::SetVisibility(PRBool aVisibility)
|
||||
{
|
||||
mVisibility = aVisibility;
|
||||
@ -1839,6 +1847,12 @@ nscoord nsHTMLFramesetBlankFrame::GetIntrinsicWidth()
|
||||
return 0;
|
||||
}
|
||||
|
||||
nscoord nsHTMLFramesetBlankFrame::GetIntrinsicHeight()
|
||||
{
|
||||
// No intrinsic height
|
||||
return 0;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLFramesetBlankFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
|
@ -294,7 +294,6 @@ nsMathMLmfracFrame::Place(nsIRenderingContext& aRenderingContext,
|
||||
frameDen = frameNum->GetNextSibling();
|
||||
if (!frameNum || !frameDen || frameDen->GetNextSibling()) {
|
||||
// report an error, encourage people to get their markups in order
|
||||
NS_WARNING("invalid markup");
|
||||
return ReflowError(aRenderingContext, aDesiredSize);
|
||||
}
|
||||
GetReflowAndBoundingMetricsFor(frameNum, sizeNum, bmNum);
|
||||
|
@ -268,7 +268,6 @@ nsMathMLmmultiscriptsFrame::Place(nsIRenderingContext& aRenderingContext,
|
||||
if (mprescriptsFrame) {
|
||||
// duplicate <mprescripts/> found
|
||||
// report an error, encourage people to get their markups in order
|
||||
NS_WARNING("invalid markup");
|
||||
return ReflowError(aRenderingContext, aDesiredSize);
|
||||
}
|
||||
mprescriptsFrame = childFrame;
|
||||
@ -377,7 +376,6 @@ nsMathMLmmultiscriptsFrame::Place(nsIRenderingContext& aRenderingContext,
|
||||
// note: width=0 if all sup-sub pairs match correctly
|
||||
if ((0 != width) || !baseFrame || !subScriptFrame || !supScriptFrame) {
|
||||
// report an error, encourage people to get their markups in order
|
||||
NS_WARNING("invalid markup");
|
||||
return ReflowError(aRenderingContext, aDesiredSize);
|
||||
}
|
||||
|
||||
|
@ -270,7 +270,6 @@ nsMathMLmoverFrame::Place(nsIRenderingContext& aRenderingContext,
|
||||
overFrame = baseFrame->GetNextSibling();
|
||||
if (!baseFrame || !overFrame || overFrame->GetNextSibling()) {
|
||||
// report an error, encourage people to get their markups in order
|
||||
NS_WARNING("invalid markup");
|
||||
return ReflowError(aRenderingContext, aDesiredSize);
|
||||
}
|
||||
GetReflowAndBoundingMetricsFor(baseFrame, baseSize, bmBase);
|
||||
|
@ -246,10 +246,11 @@ nsMathMLmrootFrame::Reflow(nsPresContext* aPresContext,
|
||||
}
|
||||
if (2 != count) {
|
||||
// report an error, encourage people to get their markups in order
|
||||
NS_WARNING("invalid markup");
|
||||
rv = ReflowError(renderingContext, aDesiredSize);
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
|
||||
// Call DidReflow() for the child frames we successfully did reflow.
|
||||
DidReflowChildren(mFrames.FirstChild(), childFrame);
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
@ -136,9 +136,7 @@ nsMathMLmsubFrame::PlaceSubScript (nsPresContext* aPresContext,
|
||||
subScriptFrame = baseFrame->GetNextSibling();
|
||||
if (!baseFrame || !subScriptFrame || subScriptFrame->GetNextSibling()) {
|
||||
// report an error, encourage people to get their markups in order
|
||||
NS_WARNING("invalid markup");
|
||||
return static_cast<nsMathMLContainerFrame*>(aFrame)->ReflowError(aRenderingContext,
|
||||
aDesiredSize);
|
||||
return aFrame->ReflowError(aRenderingContext, aDesiredSize);
|
||||
}
|
||||
GetReflowAndBoundingMetricsFor(baseFrame, baseSize, bmBase);
|
||||
GetReflowAndBoundingMetricsFor(subScriptFrame, subScriptSize, bmSubScript);
|
||||
|
@ -159,10 +159,7 @@ nsMathMLmsubsupFrame::PlaceSubSupScript(nsPresContext* aPresContext,
|
||||
if (!baseFrame || !subScriptFrame || !supScriptFrame ||
|
||||
supScriptFrame->GetNextSibling()) {
|
||||
// report an error, encourage people to get their markups in order
|
||||
NS_WARNING("invalid markup");
|
||||
return static_cast<nsMathMLContainerFrame*>
|
||||
(aFrame)->ReflowError(aRenderingContext,
|
||||
aDesiredSize);
|
||||
return aFrame->ReflowError(aRenderingContext, aDesiredSize);
|
||||
}
|
||||
GetReflowAndBoundingMetricsFor(baseFrame, baseSize, bmBase);
|
||||
GetReflowAndBoundingMetricsFor(subScriptFrame, subScriptSize, bmSubScript);
|
||||
|
@ -137,9 +137,7 @@ nsMathMLmsupFrame::PlaceSuperScript(nsPresContext* aPresContext,
|
||||
supScriptFrame = baseFrame->GetNextSibling();
|
||||
if (!baseFrame || !supScriptFrame || supScriptFrame->GetNextSibling()) {
|
||||
// report an error, encourage people to get their markups in order
|
||||
NS_WARNING("invalid markup");
|
||||
return static_cast<nsMathMLContainerFrame*>(aFrame)->ReflowError(aRenderingContext,
|
||||
aDesiredSize);
|
||||
return aFrame->ReflowError(aRenderingContext, aDesiredSize);
|
||||
}
|
||||
GetReflowAndBoundingMetricsFor(baseFrame, baseSize, bmBase);
|
||||
GetReflowAndBoundingMetricsFor(supScriptFrame, supScriptSize, bmSupScript);
|
||||
|
@ -267,7 +267,6 @@ nsMathMLmunderFrame::Place(nsIRenderingContext& aRenderingContext,
|
||||
underFrame = baseFrame->GetNextSibling();
|
||||
if (!baseFrame || !underFrame || underFrame->GetNextSibling()) {
|
||||
// report an error, encourage people to get their markups in order
|
||||
NS_WARNING("invalid markup");
|
||||
return ReflowError(aRenderingContext, aDesiredSize);
|
||||
}
|
||||
GetReflowAndBoundingMetricsFor(baseFrame, baseSize, bmBase);
|
||||
|
@ -307,7 +307,6 @@ nsMathMLmunderoverFrame::Place(nsIRenderingContext& aRenderingContext,
|
||||
overFrame = underFrame->GetNextSibling();
|
||||
if (!baseFrame || !underFrame || !overFrame || overFrame->GetNextSibling()) {
|
||||
// report an error, encourage people to get their markups in order
|
||||
NS_WARNING("invalid markup");
|
||||
return ReflowError(aRenderingContext, aDesiredSize);
|
||||
}
|
||||
GetReflowAndBoundingMetricsFor(baseFrame, baseSize, bmBase);
|
||||
|
5
layout/mathml/crashtests/416907-1.xhtml
Normal file
5
layout/mathml/crashtests/416907-1.xhtml
Normal file
@ -0,0 +1,5 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:mathml="http://www.w3.org/1998/Math/MathML">
|
||||
<mathml:mroot>
|
||||
<frameset/>
|
||||
</mathml:mroot>
|
||||
</html>
|
@ -37,5 +37,6 @@ load 405187-1.xhtml
|
||||
load 405271-1.xml
|
||||
load 412237-1.xml
|
||||
load 413063-1.xhtml
|
||||
load 416907-1.xhtml
|
||||
load 420420-1.xhtml
|
||||
load 443089-1.xhtml
|
||||
|
Loading…
Reference in New Issue
Block a user