aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/layout/text.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/layout/text.rs')
-rw-r--r--src/components/layout/text.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/components/layout/text.rs b/src/components/layout/text.rs
index e283cf432d3..f0fc612ea32 100644
--- a/src/components/layout/text.rs
+++ b/src/components/layout/text.rs
@@ -293,9 +293,8 @@ pub fn computed_style_to_font_style(style: &ComputedValues) -> FontStyle {
}
/// Returns the line block-size needed by the given computed style and font size.
-///
-/// FIXME(pcwalton): I believe this should not take a separate `font-size` parameter.
-pub fn line_height_from_style(style: &ComputedValues, font_size: Au) -> Au {
+pub fn line_height_from_style(style: &ComputedValues) -> Au {
+ let font_size = style.get_font().font_size;
let from_inline = match style.get_inheritedbox().line_height {
line_height::Normal => font_size.scale_by(1.14),
line_height::Number(l) => font_size.scale_by(l),