mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 12:57:35 +00:00
LibWeb: Handle non-px font sizes
The previous code assumed all font sizes were in px, but now we perform the conversion. There is an existing bug with em sizes returning 0, which seems to affect other places too - see `NodeWithStyle::apply_style()`. This also implements 'larger', 'smaller' and calc() font-sizes.
This commit is contained in:
parent
c990340c5a
commit
8c39fee34d
3 changed files with 28 additions and 14 deletions
|
@ -219,7 +219,7 @@ void NodeWithStyle::apply_style(const CSS::StyleProperties& specified_style)
|
|||
{
|
||||
auto& computed_values = static_cast<CSS::MutableComputedValues&>(m_computed_values);
|
||||
|
||||
m_font = specified_style.font();
|
||||
m_font = specified_style.font(*this);
|
||||
m_line_height = specified_style.line_height(*this);
|
||||
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue