summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-05-26 21:06:48 +0200
committerAndreas Kling <kling@serenityos.org>2020-05-26 21:09:32 +0200
commit4a9deddb4ae044ae1e59d8d63d03e964b2b4958a (patch)
treecd80550619c3271f1523250fba69d471b6829433
parent199a6b40b3e7ae997d6ecfde6276c86cc2a1dd30 (diff)
downloadserenity-4a9deddb4ae044ae1e59d8d63d03e964b2b4958a.zip
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..) :^)
-rw-r--r--Libraries/LibWeb/CSS/StyleProperties.cpp2
1 files changed, 1 insertions, 1 deletions
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;
}