mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
LibGfx: Add Rect::unite()
The existing `::unite_horizontally()` and `::unite_vertically()` tests did not properly test the edge cases where left/top in the Rect were updated, so they get re-arranged a bit.
This commit is contained in:
committed by
Jelle Raaijmakers
parent
c0e861e2fa
commit
7eb4f3da37
@@ -209,7 +209,7 @@ CSSPixelRect PaintableBox::compute_absolute_paint_rect() const
|
||||
continue;
|
||||
auto inflate = shadow.spread_distance + shadow.blur_radius;
|
||||
auto shadow_rect = rect.inflated(inflate, inflate, inflate, inflate).translated(shadow.offset_x, shadow.offset_y);
|
||||
rect = rect.united(shadow_rect);
|
||||
rect.unite(shadow_rect);
|
||||
}
|
||||
return rect;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user