1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:08:10 +00:00

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..) :^)
This commit is contained in:
Andreas Kling 2020-05-26 21:06:48 +02:00
parent 199a6b40b3
commit 4a9deddb4a

View file

@ -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;
}