🐛 Fix nested frames border clipping

This commit is contained in:
Alejandro Alonso 2026-01-14 07:10:26 +01:00
parent d593e299e3
commit c60d74df62
3 changed files with 1990 additions and 1078 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

@ -1212,7 +1212,12 @@ impl RenderState {
}
#[inline]
pub fn render_shape_exit(&mut self, element: &Shape, visited_mask: bool) {
pub fn render_shape_exit(
&mut self,
element: &Shape,
visited_mask: bool,
clip_bounds: Option<ClipStack>,
) {
if visited_mask {
// Because masked groups needs two rendering passes (first drawing
// the content and then drawing the mask), we need to do an
@ -1268,7 +1273,7 @@ impl RenderState {
element_strokes.to_mut().clip_content = false;
self.render_shape(
&element_strokes,
None,
clip_bounds,
SurfaceId::Fills,
SurfaceId::Strokes,
SurfaceId::InnerShadows,
@ -1528,7 +1533,7 @@ impl RenderState {
if visited_children {
// Skip render_shape_exit for flattened containers
if !element.can_flatten() {
self.render_shape_exit(element, visited_mask);
self.render_shape_exit(element, visited_mask, clip_bounds);
}
continue;
}