diff --git a/Tests/LibWeb/Ref/clip-border-radius-with-css-transform.html b/Tests/LibWeb/Ref/clip-border-radius-with-css-transform.html new file mode 100644 index 00000000000..1e843365038 --- /dev/null +++ b/Tests/LibWeb/Ref/clip-border-radius-with-css-transform.html @@ -0,0 +1,33 @@ + + +
diff --git a/Tests/LibWeb/Ref/reference/clip-border-radius-with-css-transform-ref.html b/Tests/LibWeb/Ref/reference/clip-border-radius-with-css-transform-ref.html new file mode 100644 index 00000000000..e02256dd63a --- /dev/null +++ b/Tests/LibWeb/Ref/reference/clip-border-radius-with-css-transform-ref.html @@ -0,0 +1,21 @@ + +
diff --git a/Userland/Libraries/LibWeb/Painting/ViewportPaintable.cpp b/Userland/Libraries/LibWeb/Painting/ViewportPaintable.cpp index f2757fa0e3f..5ed995f5111 100644 --- a/Userland/Libraries/LibWeb/Painting/ViewportPaintable.cpp +++ b/Userland/Libraries/LibWeb/Painting/ViewportPaintable.cpp @@ -178,9 +178,6 @@ void ViewportPaintable::refresh_clip_state() auto overflow_clip_rect = paintable_box.absolute_padding_box_rect(); clip_frame.add_clip_rect(overflow_clip_rect, paintable_box.normalized_border_radii_data(ShrinkRadiiForBorders::Yes), paintable_box.enclosing_scroll_frame()); for (auto const* block = &paintable_box.layout_box(); !block->is_viewport(); block = block->containing_block()) { - if (block->has_css_transform()) { - break; - } auto const& block_paintable_box = *block->paintable_box(); auto block_overflow_x = block_paintable_box.computed_values().overflow_x(); auto block_overflow_y = block_paintable_box.computed_values().overflow_y(); @@ -191,6 +188,9 @@ void ViewportPaintable::refresh_clip_state() if (auto css_clip_property_rect = block->paintable_box()->get_clip_rect(); css_clip_property_rect.has_value()) { clip_frame.add_clip_rect(css_clip_property_rect.value(), {}, block_paintable_box.enclosing_scroll_frame()); } + if (block->has_css_transform()) { + break; + } } } }