From 2e60cd080a6ba2ce411b8b62128591ba6e1bcbbd Mon Sep 17 00:00:00 2001 From: "rbs%maths.uq.edu.au" Date: Wed, 2 Jan 2002 22:42:52 +0000 Subject: [PATCH] Follow-up to MathML bug 117652 - additional tweak to the preferred stretchy size for the case where the direction of stretching varies during the descend git-svn-id: svn://10.0.0.236/trunk@111257 18797224-902f-48f8-a5cc-f745e15eee43 --- .../layout/mathml/base/src/nsMathMLContainerFrame.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/mozilla/layout/mathml/base/src/nsMathMLContainerFrame.cpp b/mozilla/layout/mathml/base/src/nsMathMLContainerFrame.cpp index 64f80e9c894..ed2d85926b9 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLContainerFrame.cpp +++ b/mozilla/layout/mathml/base/src/nsMathMLContainerFrame.cpp @@ -611,6 +611,9 @@ nsMathMLContainerFrame::Stretch(nsIPresContext* aPresContext, rv = childFrame->QueryInterface(NS_GET_IID(nsIMathMLFrame), (void**)&mathMLFrame); NS_ASSERTION(NS_SUCCEEDED(rv) && mathMLFrame, "Something is wrong somewhere"); if (NS_SUCCEEDED(rv) && mathMLFrame) { + PRBool stretchAll = + NS_MATHML_WILL_STRETCH_ALL_CHILDREN_VERTICALLY(mEmbellishData.flags) || + NS_MATHML_WILL_STRETCH_ALL_CHILDREN_HORIZONTALLY(mEmbellishData.flags); // And the trick is that the child's rect.x is still holding the descent, // and rect.y is still holding the ascent ... @@ -621,7 +624,8 @@ nsMathMLContainerFrame::Stretch(nsIPresContext* aPresContext, if (aStretchDirection != NS_STRETCH_DIRECTION_DEFAULT && aStretchDirection != mEmbellishData.direction) { // change the direction and confine the stretch to us - GetPreferredStretchSize(aPresContext, aRenderingContext, 0, + GetPreferredStretchSize(aPresContext, aRenderingContext, + stretchAll ? STRETCH_CONSIDER_EMBELLISHMENTS : 0, mEmbellishData.direction, containerSize); } @@ -638,8 +642,7 @@ nsMathMLContainerFrame::Stretch(nsIPresContext* aPresContext, // Now that this embellished child may have changed, we need to // fire the stretch on its siblings using our updated size - if (NS_MATHML_WILL_STRETCH_ALL_CHILDREN_VERTICALLY(mEmbellishData.flags) || - NS_MATHML_WILL_STRETCH_ALL_CHILDREN_HORIZONTALLY(mEmbellishData.flags)) { + if (stretchAll) { nsStretchDirection stretchDir = NS_MATHML_WILL_STRETCH_ALL_CHILDREN_VERTICALLY(mEmbellishData.flags) ?