From fe00b25319ba04b646f8de4f3d75d7d9f6cb4682 Mon Sep 17 00:00:00 2001 From: "rbs%maths.uq.edu.au" Date: Thu, 30 Dec 2004 22:49:23 +0000 Subject: [PATCH] Check the visibilty before painting the fraction line and the radical bar, b=275823, r+sr=roc --- layout/mathml/base/src/nsMathMLmfracFrame.cpp | 1 + layout/mathml/base/src/nsMathMLmrootFrame.cpp | 4 +++- layout/mathml/base/src/nsMathMLmsqrtFrame.cpp | 4 +++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/layout/mathml/base/src/nsMathMLmfracFrame.cpp b/layout/mathml/base/src/nsMathMLmfracFrame.cpp index 3edcdac2ad9c..a284adaf8219 100644 --- a/layout/mathml/base/src/nsMathMLmfracFrame.cpp +++ b/layout/mathml/base/src/nsMathMLmfracFrame.cpp @@ -233,6 +233,7 @@ nsMathMLmfracFrame::Paint(nsPresContext* aPresContext, aDirtyRect, aWhichLayer, this); } else if ((NS_FRAME_PAINT_LAYER_FOREGROUND == aWhichLayer) && + mStyleContext->GetStyleVisibility()->IsVisible() && !NS_MATHML_HAS_ERROR(mPresentationData.flags) && !mLineRect.IsEmpty()) { // paint the fraction line with the current text color diff --git a/layout/mathml/base/src/nsMathMLmrootFrame.cpp b/layout/mathml/base/src/nsMathMLmrootFrame.cpp index ebed508ebcf3..284167bfae32 100644 --- a/layout/mathml/base/src/nsMathMLmrootFrame.cpp +++ b/layout/mathml/base/src/nsMathMLmrootFrame.cpp @@ -146,7 +146,9 @@ nsMathMLmrootFrame::Paint(nsPresContext* aPresContext, mSqrChar.Paint(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer, this); - if (NS_FRAME_PAINT_LAYER_FOREGROUND == aWhichLayer && !mBarRect.IsEmpty()) { + if (NS_FRAME_PAINT_LAYER_FOREGROUND == aWhichLayer && + mStyleContext->GetStyleVisibility()->IsVisible() && + !mBarRect.IsEmpty()) { // paint the overline bar const nsStyleColor* color = GetStyleColor(); aRenderingContext.SetColor(color->mColor); diff --git a/layout/mathml/base/src/nsMathMLmsqrtFrame.cpp b/layout/mathml/base/src/nsMathMLmsqrtFrame.cpp index f11f346d741b..836be349bccd 100644 --- a/layout/mathml/base/src/nsMathMLmsqrtFrame.cpp +++ b/layout/mathml/base/src/nsMathMLmsqrtFrame.cpp @@ -156,7 +156,9 @@ nsMathMLmsqrtFrame::Paint(nsPresContext* aPresContext, mSqrChar.Paint(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer, this); - if (NS_FRAME_PAINT_LAYER_FOREGROUND == aWhichLayer && !mBarRect.IsEmpty()) { + if (NS_FRAME_PAINT_LAYER_FOREGROUND == aWhichLayer && + mStyleContext->GetStyleVisibility()->IsVisible() && + !mBarRect.IsEmpty()) { // paint the overline bar const nsStyleColor* color = GetStyleColor(); aRenderingContext.SetColor(color->mColor);