From 079260ab0446ba4fbf954f4e109e8092a140023d Mon Sep 17 00:00:00 2001 From: "cls%seawood.org" Date: Wed, 17 May 2000 05:07:26 +0000 Subject: [PATCH] Fix for BeOS and other platforms that don't use the NEW_FONT_HEIGHT_APIS. git-svn-id: svn://10.0.0.236/trunk@70296 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/generic/nsHTMLReflowState.cpp | 4 ++++ mozilla/layout/html/base/src/nsHTMLReflowState.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/mozilla/layout/generic/nsHTMLReflowState.cpp b/mozilla/layout/generic/nsHTMLReflowState.cpp index b718325833b..9636fbb8038 100644 --- a/mozilla/layout/generic/nsHTMLReflowState.cpp +++ b/mozilla/layout/generic/nsHTMLReflowState.cpp @@ -2130,10 +2130,12 @@ ComputeLineHeight(nsIRenderingContext* aRenderingContext, aRenderingContext->SetFont(font->mFont); nsCOMPtr fm; aRenderingContext->GetFontMetrics(*getter_AddRefs(fm)); +#ifdef NEW_FONT_HEIGHT_APIS if (fm) { fm->GetEmHeight(emHeight); fm->GetNormalLineHeight(normalLineHeight); } +#endif float factor; if (eStyleUnit_Factor == unit) { factor = text->mLineHeight.GetFactorValue(); @@ -2183,9 +2185,11 @@ nsHTMLReflowState::CalcLineHeight(nsIPresContext* aPresContext, aRenderingContext->SetFont(font->mFont); nsCOMPtr fm; aRenderingContext->GetFontMetrics(*getter_AddRefs(fm)); +#ifdef NEW_FONT_HEIGHT_APIS if (fm) { fm->GetNormalLineHeight(lineHeight); } +#endif } } return lineHeight; diff --git a/mozilla/layout/html/base/src/nsHTMLReflowState.cpp b/mozilla/layout/html/base/src/nsHTMLReflowState.cpp index b718325833b..9636fbb8038 100644 --- a/mozilla/layout/html/base/src/nsHTMLReflowState.cpp +++ b/mozilla/layout/html/base/src/nsHTMLReflowState.cpp @@ -2130,10 +2130,12 @@ ComputeLineHeight(nsIRenderingContext* aRenderingContext, aRenderingContext->SetFont(font->mFont); nsCOMPtr fm; aRenderingContext->GetFontMetrics(*getter_AddRefs(fm)); +#ifdef NEW_FONT_HEIGHT_APIS if (fm) { fm->GetEmHeight(emHeight); fm->GetNormalLineHeight(normalLineHeight); } +#endif float factor; if (eStyleUnit_Factor == unit) { factor = text->mLineHeight.GetFactorValue(); @@ -2183,9 +2185,11 @@ nsHTMLReflowState::CalcLineHeight(nsIPresContext* aPresContext, aRenderingContext->SetFont(font->mFont); nsCOMPtr fm; aRenderingContext->GetFontMetrics(*getter_AddRefs(fm)); +#ifdef NEW_FONT_HEIGHT_APIS if (fm) { fm->GetNormalLineHeight(lineHeight); } +#endif } } return lineHeight;