1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 08:45:09 +00:00

LibHTML: Use floating point numbers throughout the layout tree

This commit is contained in:
Andreas Kling 2019-11-18 16:25:38 +01:00
parent da23864c8d
commit c628ebda0f
15 changed files with 59 additions and 52 deletions

View file

@ -101,10 +101,9 @@ void StyleProperties::load_font() const
FontCache::the().set({ font_family, font_weight }, *m_font);
}
int StyleProperties::line_height() const
float StyleProperties::line_height() const
{
// FIXME: Allow overriding the line-height. We currently default to 140% which seems to look nice.
return (int)(font().glyph_height() * 1.4f);
return (float)font().glyph_height() * 1.4f;
}
bool StyleProperties::operator==(const StyleProperties& other) const