diff --git a/Libraries/LibWeb/Layout/LayoutBox.cpp b/Libraries/LibWeb/Layout/LayoutBox.cpp index 7ae34fad68..3de1fa3584 100644 --- a/Libraries/LibWeb/Layout/LayoutBox.cpp +++ b/Libraries/LibWeb/Layout/LayoutBox.cpp @@ -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);