diff options
author | Glenn Watson <gw@intuitionlibrary.com> | 2014-07-22 08:33:05 +1000 |
---|---|---|
committer | Glenn Watson <gw@intuitionlibrary.com> | 2014-07-22 08:33:05 +1000 |
commit | 383ce249dcf668a83099be5b82c5022b64dd0506 (patch) | |
tree | d930790f1a3bf14be391bf98542ddef1c48b47f5 /src/components/layout/text.rs | |
parent | 3670ee6f1fc5066101cc5a357443494552ea37f2 (diff) | |
download | servo-383ce249dcf668a83099be5b82c5022b64dd0506.tar.gz servo-383ce249dcf668a83099be5b82c5022b64dd0506.zip |
Change calculate_line_height to use font-size from style.
Diffstat (limited to 'src/components/layout/text.rs')
-rw-r--r-- | src/components/layout/text.rs | 5 |
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), |