diff --git a/mozilla/layout/generic/nsHTMLReflowState.cpp b/mozilla/layout/generic/nsHTMLReflowState.cpp
index 8147dd73535..5f5f48ce012 100644
--- a/mozilla/layout/generic/nsHTMLReflowState.cpp
+++ b/mozilla/layout/generic/nsHTMLReflowState.cpp
@@ -2184,23 +2184,6 @@ nsHTMLReflowState::CalculateBlockSideMargins(nscoord aAvailWidth,
}
}
-PRBool
-nsHTMLReflowState::UseComputedHeight()
-{
- static PRBool useComputedHeight = PR_FALSE;
-
-#if defined(XP_UNIX) || defined(XP_WIN) || defined(XP_OS2) || defined(XP_BEOS)
- static PRBool firstTime = 1;
- if (firstTime) {
- if (getenv("GECKO_USE_COMPUTED_HEIGHT")) {
- useComputedHeight = PR_TRUE;
- }
- firstTime = 0;
- }
-#endif
- return useComputedHeight;
-}
-
#define NORMAL_LINE_HEIGHT_FACTOR 1.2f // in term of emHeight
// For "normal" we use the font's normal line height (em height + leading).
// If both internal leading and external leading specified by font itself
@@ -2278,16 +2261,11 @@ ComputeLineHeight(nsPresContext* aPresContext,
// little hack lets us override that behavior to allow for more
// precise layout in the face of imprecise fonts.
nscoord emHeight = font->mFont.size;
- if (!nsHTMLReflowState::UseComputedHeight()) {
- fm->GetEmHeight(emHeight);
- }
+ fm->GetEmHeight(emHeight);
lineHeight = NSToCoordRound(factor * emHeight);
} else {
NS_ASSERTION(eStyleUnit_Normal == unit, "bad unit");
- lineHeight = font->mFont.size;
- if (!nsHTMLReflowState::UseComputedHeight()) {
- lineHeight = GetNormalLineHeight(fm);
- }
+ lineHeight = GetNormalLineHeight(fm);
}
}
return lineHeight;
diff --git a/mozilla/layout/generic/nsHTMLReflowState.h b/mozilla/layout/generic/nsHTMLReflowState.h
index eb938dc0bef..afa22186210 100644
--- a/mozilla/layout/generic/nsHTMLReflowState.h
+++ b/mozilla/layout/generic/nsHTMLReflowState.h
@@ -385,8 +385,6 @@ struct nsHTMLReflowState {
nsIRenderingContext* aRenderingContext,
nsIFrame* aFrame);
- static PRBool UseComputedHeight();
-
void InitFrameType();
void ComputeContainingBlockRectangle(nsPresContext* aPresContext,
diff --git a/mozilla/layout/generic/nsInlineFrame.cpp b/mozilla/layout/generic/nsInlineFrame.cpp
index 7904b62d58a..7c8215bb3db 100644
--- a/mozilla/layout/generic/nsInlineFrame.cpp
+++ b/mozilla/layout/generic/nsInlineFrame.cpp
@@ -624,18 +624,6 @@ nsInlineFrame::ReflowFrames(nsPresContext* aPresContext,
aMetrics.descent += aReflowState.mComputedBorderPadding.bottom;
aMetrics.height += aReflowState.mComputedBorderPadding.top +
aReflowState.mComputedBorderPadding.bottom;
-
- // Note: we normally use the actual font height for computing the
- // line-height raw value from the style context. On systems where
- // they disagree the actual font height is more appropriate. This
- // little hack lets us override that behavior to allow for more
- // precise layout in the face of imprecise fonts.
- if (nsHTMLReflowState::UseComputedHeight()) {
- const nsStyleFont* font = GetStyleFont();
- aMetrics.height = font->mFont.size +
- aReflowState.mComputedBorderPadding.top +
- aReflowState.mComputedBorderPadding.bottom;
- }
}
// For now our overflow area is zero. The real value will be
diff --git a/mozilla/layout/generic/nsLineLayout.cpp b/mozilla/layout/generic/nsLineLayout.cpp
index 21d3e056cd0..4a4ae56c085 100644
--- a/mozilla/layout/generic/nsLineLayout.cpp
+++ b/mozilla/layout/generic/nsLineLayout.cpp
@@ -2439,13 +2439,7 @@ nsLineLayout::VerticalAlignFrames(PerSpanData* psd)
nscoord minimumLineHeight = mMinLineHeight;
nscoord fontAscent, fontHeight;
fm->GetMaxAscent(fontAscent);
- if (nsHTMLReflowState::UseComputedHeight()) {
- fontHeight = spanFrame->GetStyleFont()->mFont.size;
- }
- else
- {
- fm->GetHeight(fontHeight);
- }
+ fm->GetHeight(fontHeight);
nscoord leading = minimumLineHeight - fontHeight;
nscoord yTop = -fontAscent - leading/2;