From 524bc6ea75100fb3b1a3575c839aa9f0a3e409fd Mon Sep 17 00:00:00 2001 From: "rbs%maths.uq.edu.au" Date: Wed, 29 Mar 2000 08:39:50 +0000 Subject: [PATCH] [NOT PART OF THE DEFAULT BUILD] Fix compilation problems on Linux. The code now compiles there as well. --- layout/mathml/base/src/nsMathMLContainerFrame.cpp | 7 +++---- layout/mathml/base/src/nsMathMLmactionFrame.cpp | 1 - layout/mathml/base/src/nsMathMLmoFrame.cpp | 4 +--- layout/mathml/base/src/nsMathMLmsubFrame.cpp | 4 ++-- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/layout/mathml/base/src/nsMathMLContainerFrame.cpp b/layout/mathml/base/src/nsMathMLContainerFrame.cpp index b16aa34b477..3454b664652 100644 --- a/layout/mathml/base/src/nsMathMLContainerFrame.cpp +++ b/layout/mathml/base/src/nsMathMLContainerFrame.cpp @@ -486,7 +486,7 @@ nsMathMLContainerFrame::GetReflowAndBoundingMetricsFor(nsIFrame* aFra aBoundingMetrics.descent = aReflowMetrics.descent; aBoundingMetrics.ascent = aReflowMetrics.ascent; aBoundingMetrics.width = aReflowMetrics.width; -#if 1 +#if 0 printf("GetBoundingMetrics() failed for: "); /* getchar(); */ nsFrame::ListTag(stdout, aFrame); printf("\n"); @@ -711,8 +711,7 @@ nsMathMLContainerFrame::EmbellishOperator() mEmbellishData.firstChild = firstChild; // Cache also the inner-most embellished frame at the core of the hierarchy nsIMathMLFrame* aMathMLFrame = nsnull; - nsresult rv = firstChild->QueryInterface(NS_GET_IID(nsIMathMLFrame), (void**)&aMathMLFrame); - NS_ASSERTION(NS_SUCCEEDED(rv) && aMathMLFrame, "Mystery!"); + firstChild->QueryInterface(NS_GET_IID(nsIMathMLFrame), (void**)&aMathMLFrame); nsEmbellishData embellishData; aMathMLFrame->GetEmbellishData(embellishData); mEmbellishData.core = embellishData.core; @@ -985,7 +984,7 @@ nsMathMLContainerFrame::InsertScriptLevelStyleContext(nsIPresContext* aPresConte PRBool isSmaller = PR_TRUE; if (0 > gap) { isSmaller = PR_FALSE; gap = -gap; } // absolute value - PRInt32 smallestFontSize, smallestFontIndex; + PRInt32 smallestFontIndex, smallestFontSize = 0; if (isSmaller) { // find the smallest font-size in this subtree smallestFontSize = FindSmallestFontSizeFor(aPresContext, childFrame); diff --git a/layout/mathml/base/src/nsMathMLmactionFrame.cpp b/layout/mathml/base/src/nsMathMLmactionFrame.cpp index 111a066b9ca..2308387bd85 100644 --- a/layout/mathml/base/src/nsMathMLmactionFrame.cpp +++ b/layout/mathml/base/src/nsMathMLmactionFrame.cpp @@ -110,7 +110,6 @@ nsMathMLmactionFrame::Init(nsIPresContext* aPresContext, nsIStyleContext* aContext, nsIFrame* aPrevInFlow) { - nsresult rv = NS_OK; nsAutoString value, prefix; // Init our local attributes diff --git a/layout/mathml/base/src/nsMathMLmoFrame.cpp b/layout/mathml/base/src/nsMathMLmoFrame.cpp index 4db9e697821..9c8a67ea1d9 100644 --- a/layout/mathml/base/src/nsMathMLmoFrame.cpp +++ b/layout/mathml/base/src/nsMathMLmoFrame.cpp @@ -319,7 +319,7 @@ nsMathMLmoFrame::InitData(nsIPresContext* aPresContext) else { // Get our outermost embellished container and its parent nsIFrame* aParent = this; - nsIFrame* embellishAncestor = this; + embellishAncestor = this; do { embellishAncestor = aParent; aParent->GetParent(&aParent); @@ -704,8 +704,6 @@ nsMathMLmoFrame::Stretch(nsIPresContext* aPresContext, if (!NS_MATHML_OPERATOR_HAS_EMBELLISH_ANCESTOR(mFlags)) { // Get the value of 'em' - nsStyleFont font; - mStyleContext->GetStyle(eStyleStruct_Font, font); nscoord em = NSToCoordRound(float(font.mFont.size)); // Account the spacing diff --git a/layout/mathml/base/src/nsMathMLmsubFrame.cpp b/layout/mathml/base/src/nsMathMLmsubFrame.cpp index 337465f06a3..34a993a5df9 100644 --- a/layout/mathml/base/src/nsMathMLmsubFrame.cpp +++ b/layout/mathml/base/src/nsMathMLmsubFrame.cpp @@ -110,8 +110,8 @@ nsMathMLmsubFrame::Place(nsIPresContext* aPresContext, PRInt32 count = 0; nsHTMLReflowMetrics baseSize (nsnull); nsHTMLReflowMetrics subScriptSize (nsnull); - nsIFrame* baseFrame; - nsIFrame* subScriptFrame; + nsIFrame* baseFrame = nsnull; + nsIFrame* subScriptFrame = nsnull; // parameter v, Rule 18a, Appendix G of the TeXbook nscoord minSubScriptShift = 0;