From 4a9deddb4ae044ae1e59d8d63d03e964b2b4958a Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 26 May 2020 21:06:48 +0200 Subject: [PATCH] LibWeb: The line-height should not be multiplied by the glyph height This was causing very tall lines on many websites. We can now see the section header thingy on google.com (although it's broken into lines where it should not be..) :^) --- Libraries/LibWeb/CSS/StyleProperties.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/LibWeb/CSS/StyleProperties.cpp b/Libraries/LibWeb/CSS/StyleProperties.cpp index 552e58d699..c4b307803e 100644 --- a/Libraries/LibWeb/CSS/StyleProperties.cpp +++ b/Libraries/LibWeb/CSS/StyleProperties.cpp @@ -176,7 +176,7 @@ float StyleProperties::line_height() const { auto line_height_length = length_or_fallback(CSS::PropertyID::LineHeight, {}); if (line_height_length.is_absolute()) - return (float)font().glyph_height() * line_height_length.to_px(); + return (float)line_height_length.to_px(); return (float)font().glyph_height() * 1.4f; }