1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:28:10 +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:
Zaggy1024 2023-08-31 19:53:41 -05:00 committed by Alexander Kalenik
parent d792461714
commit 607a398917
5 changed files with 11 additions and 11 deletions

View file

@ -598,7 +598,7 @@ RefPtr<StyleValue const> ResolvedCSSStyleDeclaration::style_value_for_property(L
case PropertyID::Float:
return IdentifierStyleValue::create(to_value_id(layout_node.computed_values().float_()));
case PropertyID::FontSize:
return LengthStyleValue::create(Length::make_px(CSSPixels::nearest_value_for(layout_node.computed_values().font_size())));
return LengthStyleValue::create(Length::make_px(layout_node.computed_values().font_size()));
case PropertyID::FontVariant: {
auto font_variant = layout_node.computed_values().font_variant();
switch (font_variant) {