From 0f015abd9fa1a817b449a906210f3d6c26d8c290 Mon Sep 17 00:00:00 2001 From: "rbs%maths.uq.edu.au" Date: Thu, 3 Jan 2002 23:18:01 +0000 Subject: [PATCH] Reset the stretchy flags of underscript/overscript frames when their geometry is expected to be like subscript/superscirpt frames --- layout/mathml/base/src/nsMathMLmoverFrame.cpp | 6 ++++++ layout/mathml/base/src/nsMathMLmunderFrame.cpp | 6 ++++++ layout/mathml/base/src/nsMathMLmunderoverFrame.cpp | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/layout/mathml/base/src/nsMathMLmoverFrame.cpp b/layout/mathml/base/src/nsMathMLmoverFrame.cpp index 0a650676d718..0498fbdc1854 100644 --- a/layout/mathml/base/src/nsMathMLmoverFrame.cpp +++ b/layout/mathml/base/src/nsMathMLmoverFrame.cpp @@ -208,6 +208,12 @@ XXX The winner is the outermost in conflicting settings like these: NS_MATHML_DISPLAYSTYLE | compress); } + // disable the strecth-all flag if we are going to act like an overscript + if ( NS_MATHML_IS_MOVABLELIMITS(mPresentationData.flags) && + !NS_MATHML_IS_DISPLAYSTYLE(mPresentationData.flags)) { + mEmbellishData.flags &= ~NS_MATHML_STRETCH_ALL_CHILDREN_HORIZONTALLY; + } + return rv; } diff --git a/layout/mathml/base/src/nsMathMLmunderFrame.cpp b/layout/mathml/base/src/nsMathMLmunderFrame.cpp index ee973a8b9f23..e30488d689ab 100644 --- a/layout/mathml/base/src/nsMathMLmunderFrame.cpp +++ b/layout/mathml/base/src/nsMathMLmunderFrame.cpp @@ -202,6 +202,12 @@ XXX The winner is the outermost setting in conflicting settings like these: NS_MATHML_DISPLAYSTYLE | NS_MATHML_COMPRESSED); } + // disable the strecth-all flag if we are going to act like an subscript + if ( NS_MATHML_IS_MOVABLELIMITS(mPresentationData.flags) && + !NS_MATHML_IS_DISPLAYSTYLE(mPresentationData.flags)) { + mEmbellishData.flags &= ~NS_MATHML_STRETCH_ALL_CHILDREN_HORIZONTALLY; + } + return rv; } diff --git a/layout/mathml/base/src/nsMathMLmunderoverFrame.cpp b/layout/mathml/base/src/nsMathMLmunderoverFrame.cpp index 2e61a1bbcb97..0ec4ce98bcf1 100644 --- a/layout/mathml/base/src/nsMathMLmunderoverFrame.cpp +++ b/layout/mathml/base/src/nsMathMLmunderoverFrame.cpp @@ -254,6 +254,12 @@ nsMathMLmunderoverFrame::SetInitialChildList(nsIPresContext* aPresContext, NS_MATHML_DISPLAYSTYLE | NS_MATHML_COMPRESSED); } + // disable the strecth-all flag if we are going to act like an subscript-superscript pair + if ( NS_MATHML_IS_MOVABLELIMITS(mPresentationData.flags) && + !NS_MATHML_IS_DISPLAYSTYLE(mPresentationData.flags)) { + mEmbellishData.flags &= ~NS_MATHML_STRETCH_ALL_CHILDREN_HORIZONTALLY; + } + return rv; }