mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 04:38:11 +00:00
LibWeb: Don't paint borders with width <= 0px
Previously we would only check if the border width property is empty and skip drawing in that case, and enforcing a minimum width of 1px otherwise - but "border: 0;" should not paint a border :^)
This commit is contained in:
parent
8edf2bbcbd
commit
a427821dd1
1 changed files with 2 additions and 0 deletions
|
@ -44,6 +44,8 @@ void LayoutBox::paint_border(RenderingContext& context, Edge edge, const Gfx::Fl
|
|||
|
||||
auto border_style = style().property(style_property_id);
|
||||
float width = border_width.value()->to_length().to_px();
|
||||
if (width <= 0)
|
||||
return;
|
||||
|
||||
int int_width = max((int)width, 1);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue