diff options
Diffstat (limited to 'layout/generic/ReflowInput.cpp')
-rw-r--r-- | layout/generic/ReflowInput.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/layout/generic/ReflowInput.cpp b/layout/generic/ReflowInput.cpp index 0c3fef3825..f308ebcdf5 100644 --- a/layout/generic/ReflowInput.cpp +++ b/layout/generic/ReflowInput.cpp @@ -2798,15 +2798,19 @@ ComputeLineHeight(nsStyleContext* aStyleContext, return GetNormalLineHeight(fm); } -nscoord -ReflowInput::CalcLineHeight() const -{ +nscoord ReflowInput::GetLineHeight() const { + if (mLineHeight != NS_AUTOHEIGHT) { + return mLineHeight; + } + nscoord blockBSize = nsLayoutUtils::IsNonWrapperBlock(mFrame) ? ComputedBSize() : (mCBReflowInput ? mCBReflowInput->ComputedBSize() : NS_AUTOHEIGHT); - return CalcLineHeight(mFrame->GetContent(), mFrame->StyleContext(), blockBSize, - nsLayoutUtils::FontSizeInflationFor(mFrame)); + mLineHeight = CalcLineHeight(mFrame->GetContent(), + mFrame->StyleContext(), + blockBSize, + nsLayoutUtils::FontSizeInflationFor(mFrame)); } /* static */ nscoord |