LibWeb: Always round text-decoration-thickness value up to 1px

This commit is contained in:
Tim Ledbetter 2025-09-10 13:49:02 +01:00 committed by Jelle Raaijmakers
parent 405c5ffa60
commit 4559d5f6f6
Notes: github-actions[bot] 2025-09-10 13:38:27 +00:00
3 changed files with 322 additions and 1 deletions

View file

@ -1589,7 +1589,8 @@ void PaintableWithLines::resolve_paint_properties()
return max(glyph_height.scaled(0.1), 1);
},
[&](CSS::LengthPercentage const& length_percentage) {
return length_percentage.resolved(text_node, CSS::Length(1, CSS::Length::Type::Em).to_px(text_node)).to_px(*fragment.m_layout_node);
auto resolved_length = length_percentage.resolved(text_node, CSS::Length(1, CSS::Length::Type::Em).to_px(text_node)).to_px(*fragment.m_layout_node);
return max(resolved_length, 1);
});
}();
fragment.set_text_decoration_thickness(css_line_thickness);