diff --git a/Tests/LibWeb/Ref/corner-clip-inside-scrollable.html b/Tests/LibWeb/Ref/corner-clip-inside-scrollable.html new file mode 100644 index 0000000000..1cb355961b --- /dev/null +++ b/Tests/LibWeb/Ref/corner-clip-inside-scrollable.html @@ -0,0 +1,38 @@ + + + +
+
+
+
+
+ diff --git a/Tests/LibWeb/Ref/reference/corner-clip-inside-scrollable-ref.html b/Tests/LibWeb/Ref/reference/corner-clip-inside-scrollable-ref.html new file mode 100644 index 0000000000..864eb34af3 --- /dev/null +++ b/Tests/LibWeb/Ref/reference/corner-clip-inside-scrollable-ref.html @@ -0,0 +1,27 @@ + + +
+
+
+
diff --git a/Userland/Libraries/LibWeb/Painting/ClipFrame.h b/Userland/Libraries/LibWeb/Painting/ClipFrame.h index 43e34b70b1..38aa3a5e3f 100644 --- a/Userland/Libraries/LibWeb/Painting/ClipFrame.h +++ b/Userland/Libraries/LibWeb/Painting/ClipFrame.h @@ -28,6 +28,7 @@ struct ClipFrame : public RefCounted { } m_border_radii_clips.append(border_radii_clip); } + void clear_border_radii_clips() { m_border_radii_clips.clear(); } CSSPixelRect rect() const { return m_rect; } void set_rect(CSSPixelRect rect) { m_rect = rect; } diff --git a/Userland/Libraries/LibWeb/Painting/ViewportPaintable.cpp b/Userland/Libraries/LibWeb/Painting/ViewportPaintable.cpp index b0e3056bc9..7f92c60376 100644 --- a/Userland/Libraries/LibWeb/Painting/ViewportPaintable.cpp +++ b/Userland/Libraries/LibWeb/Painting/ViewportPaintable.cpp @@ -143,6 +143,7 @@ void ViewportPaintable::refresh_clip_state() // Start from CSS clip property if it exists. Optional clip_rect = paintable_box.get_clip_rect(); + clip_frame.clear_border_radii_clips(); if (overflow_x != CSS::Overflow::Visible && overflow_y != CSS::Overflow::Visible) { auto overflow_clip_rect = paintable_box.compute_absolute_padding_rect_with_css_transform_applied(); for (auto const* block = &paintable_box.layout_box(); !block->is_viewport(); block = block->containing_block()) {