From c264cfec89a3679841793ed6903613c840a45ee3 Mon Sep 17 00:00:00 2001 From: "rbs%maths.uq.edu.au" Date: Fri, 11 Jan 2002 05:08:11 +0000 Subject: [PATCH] Some tweaks git-svn-id: svn://10.0.0.236/trunk@111934 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/mathml/base/src/nsMathMLChar.cpp | 6 +++--- mozilla/layout/mathml/base/src/nsMathMLContainerFrame.cpp | 2 +- mozilla/layout/mathml/base/src/nsMathMLmtableFrame.cpp | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/mozilla/layout/mathml/base/src/nsMathMLChar.cpp b/mozilla/layout/mathml/base/src/nsMathMLChar.cpp index 54188abfd9e..d1635a16f35 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLChar.cpp +++ b/mozilla/layout/mathml/base/src/nsMathMLChar.cpp @@ -132,12 +132,12 @@ CheckFontExistence(nsIPresContext* aPresContext, const nsString& aFontName) } // alert the user if some of the needed MathML fonts are not installed. -void +static void AlertMissingFonts(nsString& aMissingFonts) { nsCOMPtr wwatch(do_GetService("@mozilla.org/embedcomp/window-watcher;1")); - nsCOMPtr prompter; if (wwatch) { + nsCOMPtr prompter; wwatch->GetNewPrompter(0, getter_AddRefs(prompter)); if (prompter) { nsAutoString message; @@ -1038,7 +1038,7 @@ MathFontEnumCallback(const nsString& aFamily, PRBool aGeneric, void *aData) //#ifndef _WIN32 // XXX In principle, the mathfont-family list in the mathfont.properties file // is customizable depending on the platform. For now, this is here since there - // is no need to alter Linux users about TrueType fonts specific to Windows. + // is no need to alert Linux users about TrueType fonts specific to Windows. if (aFamily.EqualsIgnoreCase("MT Extra")) return PR_TRUE; // continue to try other fonts //#endif diff --git a/mozilla/layout/mathml/base/src/nsMathMLContainerFrame.cpp b/mozilla/layout/mathml/base/src/nsMathMLContainerFrame.cpp index d89d4fc5667..6342a4a7f4b 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLContainerFrame.cpp +++ b/mozilla/layout/mathml/base/src/nsMathMLContainerFrame.cpp @@ -504,7 +504,7 @@ nsMathMLContainerFrame::FinalizeReflow(nsIPresContext* aPresContext, NS_MATHML_WILL_STRETCH_ALL_CHILDREN_HORIZONTALLY(mEmbellishData.flags); nsBoundingMetrics defaultSize; - if (!mEmbellishData.core /* case of a bare ... itself */ + if (mEmbellishData.core == this /* case of a bare ... itself */ || stretchAll) { /* or ......, or friends */ // use our current size as computed earlier by Place() defaultSize = aDesiredSize.mBoundingMetrics; diff --git a/mozilla/layout/mathml/base/src/nsMathMLmtableFrame.cpp b/mozilla/layout/mathml/base/src/nsMathMLmtableFrame.cpp index e1528f8b2f4..02c66cbb97a 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLmtableFrame.cpp +++ b/mozilla/layout/mathml/base/src/nsMathMLmtableFrame.cpp @@ -406,8 +406,9 @@ nsMathMLmtableOuterFrame::Reflow(nsIPresContext* aPresContext, const nsStyleFont *font = NS_STATIC_CAST(const nsStyleFont*, mStyleContext->GetStyleData(eStyleStruct_Font)); + aReflowState.rendContext->SetFont(font->mFont); nsCOMPtr fm; - aPresContext->GetMetricsFor(font->mFont, getter_AddRefs(fm)); + aReflowState.rendContext->GetFontMetrics(*getter_AddRefs(fm)); nscoord axisHeight; GetAxisHeight(*aReflowState.rendContext, fm, axisHeight);