зеркало из https://github.com/mozilla/pjs.git
Fully update the state even on invalid markups to avoid crashing, b=307839, r+sr=bz
This commit is contained in:
Родитель
d402454cc2
Коммит
de74d1fb69
|
@ -525,7 +525,7 @@ nsMathMLContainerFrame::PropagatePresentationDataFor(nsIFrame* aFrame,
|
||||||
PRUint32 aFlagsValues,
|
PRUint32 aFlagsValues,
|
||||||
PRUint32 aFlagsToUpdate)
|
PRUint32 aFlagsToUpdate)
|
||||||
{
|
{
|
||||||
if (!aFlagsToUpdate && !aScriptLevelIncrement)
|
if (!aFrame || (!aFlagsToUpdate && !aScriptLevelIncrement))
|
||||||
return;
|
return;
|
||||||
nsIMathMLFrame* mathMLFrame;
|
nsIMathMLFrame* mathMLFrame;
|
||||||
aFrame->QueryInterface(NS_GET_IID(nsIMathMLFrame), (void**)&mathMLFrame);
|
aFrame->QueryInterface(NS_GET_IID(nsIMathMLFrame), (void**)&mathMLFrame);
|
||||||
|
@ -557,7 +557,7 @@ nsMathMLContainerFrame::PropagatePresentationDataFromChildAt(nsIFrame* aPa
|
||||||
PRUint32 aFlagsValues,
|
PRUint32 aFlagsValues,
|
||||||
PRUint32 aFlagsToUpdate)
|
PRUint32 aFlagsToUpdate)
|
||||||
{
|
{
|
||||||
if (!aFlagsToUpdate && !aScriptLevelIncrement)
|
if (!aParentFrame || (!aFlagsToUpdate && !aScriptLevelIncrement))
|
||||||
return;
|
return;
|
||||||
PRInt32 index = 0;
|
PRInt32 index = 0;
|
||||||
nsIFrame* childFrame = aParentFrame->GetFirstChild(nsnull);
|
nsIFrame* childFrame = aParentFrame->GetFirstChild(nsnull);
|
||||||
|
@ -582,6 +582,8 @@ nsMathMLContainerFrame::PropagatePresentationDataFromChildAt(nsIFrame* aPa
|
||||||
nsMathMLContainerFrame::PropagateScriptStyleFor(nsIFrame* aFrame,
|
nsMathMLContainerFrame::PropagateScriptStyleFor(nsIFrame* aFrame,
|
||||||
PRInt32 aParentScriptLevel)
|
PRInt32 aParentScriptLevel)
|
||||||
{
|
{
|
||||||
|
if (!aFrame)
|
||||||
|
return;
|
||||||
nsIMathMLFrame* mathMLFrame;
|
nsIMathMLFrame* mathMLFrame;
|
||||||
aFrame->QueryInterface(NS_GET_IID(nsIMathMLFrame), (void**)&mathMLFrame);
|
aFrame->QueryInterface(NS_GET_IID(nsIMathMLFrame), (void**)&mathMLFrame);
|
||||||
if (mathMLFrame) {
|
if (mathMLFrame) {
|
||||||
|
|
|
@ -189,8 +189,6 @@ XXX The winner is the outermost in conflicting settings like these:
|
||||||
nsIFrame* baseFrame = mFrames.FirstChild();
|
nsIFrame* baseFrame = mFrames.FirstChild();
|
||||||
if (baseFrame)
|
if (baseFrame)
|
||||||
overscriptFrame = baseFrame->GetNextSibling();
|
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,
|
// 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
|
// this is where we get the flag for NS_MATHML_EMBELLISH_MOVABLELIMITS). Our flags
|
||||||
|
|
|
@ -189,8 +189,6 @@ XXX The winner is the outermost setting in conflicting settings like these:
|
||||||
nsIFrame* baseFrame = mFrames.FirstChild();
|
nsIFrame* baseFrame = mFrames.FirstChild();
|
||||||
if (baseFrame)
|
if (baseFrame)
|
||||||
underscriptFrame = baseFrame->GetNextSibling();
|
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,
|
// 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
|
// this is where we get the flag for NS_MATHML_EMBELLISH_MOVABLELIMITS). Our flags
|
||||||
|
|
|
@ -193,8 +193,6 @@ nsMathMLmunderoverFrame::TransmitAutomaticData()
|
||||||
underscriptFrame = baseFrame->GetNextSibling();
|
underscriptFrame = baseFrame->GetNextSibling();
|
||||||
if (underscriptFrame)
|
if (underscriptFrame)
|
||||||
overscriptFrame = underscriptFrame->GetNextSibling();
|
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,
|
// 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
|
// this is where we get the flag for NS_MATHML_EMBELLISH_MOVABLELIMITS). Our flags
|
||||||
|
|
Загрузка…
Ссылка в новой задаче