mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:57:44 +00:00
LibWeb: Fix off-by-one shadow position on non-integer positioned boxes
This fixes a issue due to the background/border painting using .to_rounded<int>() to get an IntRect, but shadow painting was using enclosing_int_rect(). enclosing_int_rect() uses some floors/ceils and does not always match .to_rounded<int>().
This commit is contained in:
parent
cb010fd1f8
commit
97e2e40e4c
1 changed files with 1 additions and 1 deletions
|
@ -230,7 +230,7 @@ void PaintableBox::paint_box_shadow(PaintContext& context) const
|
|||
static_cast<int>(layer.spread_distance.to_px(layout_box())),
|
||||
layer.placement == CSS::ShadowPlacement::Outer ? ShadowPlacement::Outer : ShadowPlacement::Inner);
|
||||
}
|
||||
Painting::paint_box_shadow(context, enclosing_int_rect(absolute_border_box_rect()), normalized_border_radii_data(), resolved_box_shadow_data);
|
||||
Painting::paint_box_shadow(context, absolute_border_box_rect().to_rounded<int>(), normalized_border_radii_data(), resolved_box_shadow_data);
|
||||
}
|
||||
|
||||
BorderRadiiData PaintableBox::normalized_border_radii_data() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue