Fully update the state even on invalid markups to avoid crashing, b=307839, r+sr=bz, a=asa

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_BRANCH@180339 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rbs%maths.uq.edu.au
2005-09-16 00:16:40 +00:00
parent 0de6b9976e
commit 60ca44ae80
4 changed files with 4 additions and 8 deletions

View File

@@ -525,7 +525,7 @@ nsMathMLContainerFrame::PropagatePresentationDataFor(nsIFrame* aFrame,
PRUint32 aFlagsValues,
PRUint32 aFlagsToUpdate)
{
if (!aFlagsToUpdate && !aScriptLevelIncrement)
if (!aFrame || (!aFlagsToUpdate && !aScriptLevelIncrement))
return;
nsIMathMLFrame* mathMLFrame;
aFrame->QueryInterface(NS_GET_IID(nsIMathMLFrame), (void**)&mathMLFrame);
@@ -557,7 +557,7 @@ nsMathMLContainerFrame::PropagatePresentationDataFromChildAt(nsIFrame* aPa
PRUint32 aFlagsValues,
PRUint32 aFlagsToUpdate)
{
if (!aFlagsToUpdate && !aScriptLevelIncrement)
if (!aParentFrame || (!aFlagsToUpdate && !aScriptLevelIncrement))
return;
PRInt32 index = 0;
nsIFrame* childFrame = aParentFrame->GetFirstChild(nsnull);
@@ -582,6 +582,8 @@ nsMathMLContainerFrame::PropagatePresentationDataFromChildAt(nsIFrame* aPa
nsMathMLContainerFrame::PropagateScriptStyleFor(nsIFrame* aFrame,
PRInt32 aParentScriptLevel)
{
if (!aFrame)
return;
nsIMathMLFrame* mathMLFrame;
aFrame->QueryInterface(NS_GET_IID(nsIMathMLFrame), (void**)&mathMLFrame);
if (mathMLFrame) {

View File

@@ -191,8 +191,6 @@ XXX The winner is the outermost in conflicting settings like these:
nsIFrame* baseFrame = mFrames.FirstChild();
if (baseFrame)
overscriptFrame = baseFrame->GetNextSibling();
if (!baseFrame || !overscriptFrame)
return NS_OK; // a visual error indicator will be reported later during layout
// if our base is an embellished operator, let its state bubble to us (in particular,
// this is where we get the flag for NS_MATHML_EMBELLISH_MOVABLELIMITS). Our flags

View File

@@ -191,8 +191,6 @@ XXX The winner is the outermost setting in conflicting settings like these:
nsIFrame* baseFrame = mFrames.FirstChild();
if (baseFrame)
underscriptFrame = baseFrame->GetNextSibling();
if (!baseFrame || !underscriptFrame)
return NS_OK; // a visual error indicator will be reported later during layout
// if our base is an embellished operator, let its state bubble to us (in particular,
// this is where we get the flag for NS_MATHML_EMBELLISH_MOVABLELIMITS). Our flags

View File

@@ -195,8 +195,6 @@ nsMathMLmunderoverFrame::TransmitAutomaticData()
underscriptFrame = baseFrame->GetNextSibling();
if (underscriptFrame)
overscriptFrame = underscriptFrame->GetNextSibling();
if (!baseFrame || !underscriptFrame || !overscriptFrame)
return NS_OK; // a visual error indicator will be reported later during layout
// if our base is an embellished operator, let its state bubble to us (in particular,
// this is where we get the flag for NS_MATHML_EMBELLISH_MOVABLELIMITS). Our flags