mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:07:45 +00:00
LibWeb: Store computed CSS font size as CSSPixels
The value is originally set using a `CSSPixels` value converted to double, then when it is used it is always converted back to a `CSSPixels` again. Let's just store it as that instead.
This commit is contained in:
parent
d792461714
commit
607a398917
5 changed files with 11 additions and 11 deletions
|
@ -321,7 +321,7 @@ void NodeWithStyle::apply_style(const CSS::StyleProperties& computed_style)
|
|||
// m_font is used by Length::to_px() when resolving sizes against this layout node.
|
||||
// That's why it has to be set before everything else.
|
||||
m_font = computed_style.computed_font();
|
||||
computed_values.set_font_size(computed_style.property(CSS::PropertyID::FontSize)->as_length().length().to_px(*this).to_double());
|
||||
computed_values.set_font_size(computed_style.property(CSS::PropertyID::FontSize)->as_length().length().to_px(*this));
|
||||
computed_values.set_font_weight(round_to<int>(computed_style.property(CSS::PropertyID::FontWeight)->as_number().number()));
|
||||
m_line_height = computed_style.line_height(*this);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue