summaryrefslogtreecommitdiff
path: root/layout/generic/ReflowInput.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'layout/generic/ReflowInput.cpp')
-rw-r--r--layout/generic/ReflowInput.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/layout/generic/ReflowInput.cpp b/layout/generic/ReflowInput.cpp
index f308ebcdf5..01f36cc9db 100644
--- a/layout/generic/ReflowInput.cpp
+++ b/layout/generic/ReflowInput.cpp
@@ -2813,6 +2813,17 @@ nscoord ReflowInput::GetLineHeight() const {
nsLayoutUtils::FontSizeInflationFor(mFrame));
}
+void ReflowInput::SetLineHeight(nscoord aLineHeight) {
+ MOZ_ASSERT(aLineHeight >= 0, "aLineHeight must be >= 0!");
+
+ if (mLineHeight != aLineHeight) {
+ mLineHeight = aLineHeight;
+ // Setting used line height can change a frame's block-size if mFrame's
+ // block-size behaves as auto.
+ InitResizeFlags(mFrame->PresContext(), mFrame->GetType());
+ }
+}
+
/* static */ nscoord
ReflowInput::CalcLineHeight(nsIContent* aContent,
nsStyleContext* aStyleContext,