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
This commit is contained in:
@@ -2130,10 +2130,12 @@ ComputeLineHeight(nsIRenderingContext* aRenderingContext,
|
||||
aRenderingContext->SetFont(font->mFont);
|
||||
nsCOMPtr<nsIFontMetrics> 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<nsIFontMetrics> fm;
|
||||
aRenderingContext->GetFontMetrics(*getter_AddRefs(fm));
|
||||
#ifdef NEW_FONT_HEIGHT_APIS
|
||||
if (fm) {
|
||||
fm->GetNormalLineHeight(lineHeight);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return lineHeight;
|
||||
|
||||
@@ -2130,10 +2130,12 @@ ComputeLineHeight(nsIRenderingContext* aRenderingContext,
|
||||
aRenderingContext->SetFont(font->mFont);
|
||||
nsCOMPtr<nsIFontMetrics> 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<nsIFontMetrics> fm;
|
||||
aRenderingContext->GetFontMetrics(*getter_AddRefs(fm));
|
||||
#ifdef NEW_FONT_HEIGHT_APIS
|
||||
if (fm) {
|
||||
fm->GetNormalLineHeight(lineHeight);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return lineHeight;
|
||||
|
||||
Reference in New Issue
Block a user