mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +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
Notes:
sideshowbarker
2024-07-19 06:43:53 +09:00
Author: https://github.com/linusg
Commit: a427821dd1
Pull-request: https://github.com/SerenityOS/serenity/pull/2189
Reviewed-by: https://github.com/awesomekling
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